{"openapi":"3.0.0","info":{"title":"Findable API","description":"External API for partner integration and document platform services","version":"1.0.0"},"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"x-api-key","in":"header"},"subcontractorToken":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{}},"paths":{"/auth/login":{"get":{"summary":"Initiate user authentication","tags":["Auth"],"description":"Redirects user to WorkOS authentication URL to begin the login process","parameters":[{"schema":{"type":"string"},"in":"query","name":"redirectUri","required":false},{"schema":{"type":"boolean"},"in":"query","name":"useRecentSso","required":false,"description":"Use the most recently successful company SSO organisation when available."},{"schema":{"type":"string"},"in":"query","name":"email","required":false,"description":"Work email entered on the app-owned login page. Used to stop uninvited users before hosted AuthKit."},{"schema":{"type":"string","enum":["authkit","GoogleOAuth","MicrosoftOAuth"],"deprecated":true},"in":"query","name":"provider","required":false,"description":"Legacy compatibility parameter; ignored."},{"schema":{"type":"boolean","deprecated":true},"in":"query","name":"sso","required":false,"description":"Legacy compatibility parameter; ignored."}],"security":[],"responses":{"200":{"description":"Default Response"}}}},"/auth/callback":{"get":{"summary":"Handle authentication callback","tags":["Auth"],"description":"Processes the OAuth callback from WorkOS, authenticates the user, and redirects to the appropriate URL","parameters":[{"schema":{"type":"string"},"in":"query","name":"code","required":false},{"schema":{"type":"string","nullable":true},"in":"query","name":"state","required":false},{"schema":{"type":"string"},"in":"query","name":"error","required":false},{"schema":{"type":"string"},"in":"query","name":"error_description","required":false}],"security":[],"responses":{"200":{"description":"Default Response"}}}},"/auth/me":{"get":{"summary":"Get current authenticated user","tags":["Auth"],"description":"Retrieves the metadata for the currently authenticated user based on their session","security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/auth/logout":{"get":{"summary":"Log out user","tags":["Auth"],"description":"Logs out the current user by clearing their session cookie and redirecting to WorkOS logout URL","parameters":[{"schema":{"type":"string","nullable":true},"in":"query","name":"redirectUri","required":false}],"security":[],"responses":{"200":{"description":"Default Response"}}}},"/integrations/google-drive/oauth/callback":{"get":{"summary":"Google Drive OAuth callback","tags":["Google Drive"],"description":"Handles the OAuth redirect from Google, stores the refresh token, and redirects back to the app.","parameters":[{"schema":{"type":"string"},"in":"query","name":"code","required":false},{"schema":{"type":"string"},"in":"query","name":"state","required":false},{"schema":{"type":"string"},"in":"query","name":"error","required":false}],"security":[],"responses":{"200":{"description":"Default Response"}}}},"/construction/public/delivery/{projectId}/{subcontractorId}":{"get":{"summary":"Get project deliveries for subcontractor","tags":["Construction"],"description":"Retrieve all deliveries for a specific subcontractor in a project.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"subcontractorId","required":true}],"security":[{"subcontractorToken":[]}],"responses":{"200":{"description":"Default Response"}}}},"/construction/public/project/{projectId}/{subcontractorId}":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"subcontractorId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/public/subcontractor/{projectId}/{subcontractorId}":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"subcontractorId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/public/upload/{projectId}/{subcontractorId}":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["buildingId","filename"],"properties":{"buildingId":{"type":"string"},"filename":{"type":"string"},"projectId":{"type":"string"},"packageId":{"type":"string"},"uploadedBy":{"type":"string"},"parentFolderId":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string"},"in":"path","name":"subcontractorId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/public/documents/{projectId}/{subcontractorId}/{documentId}":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"subcontractorId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}},"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingCategory":{"nullable":true,"type":"string","maxLength":1000},"discipline":{"nullable":true,"type":"string","maxLength":1000},"drawingCode":{"nullable":true,"type":"string","maxLength":1000},"drawingDate":{"nullable":true,"type":"string","maxLength":1000},"filename":{"type":"string","minLength":1,"maxLength":2000},"filenameDescriptive":{"nullable":true,"type":"string","maxLength":1000},"floor":{"nullable":true,"type":"string","maxLength":1000},"informationTypes":{"nullable":true,"maxItems":100,"type":"array","items":{"type":"string","maxLength":500}},"progressStatus":{"nullable":true,"type":"string","enum":["NO_DOCUMENTS","IN_PROGRESS","READY_TO_REVIEW","IN_REVIEW","DONE","CORRUPT"]},"roomLocations":{"nullable":true,"maxItems":100,"type":"array","items":{"type":"string","maxLength":500}},"serialNumber":{"nullable":true,"type":"string","maxLength":1000},"tags":{"nullable":true,"maxItems":100,"type":"array","items":{"type":"string","maxLength":500}},"tfmCode":{"nullable":true,"type":"string","maxLength":1000}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"subcontractorId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string"},"in":"query","name":"updatedBy","required":false},{"schema":{"type":"string"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string"},"in":"path","name":"subcontractorId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/public/documents/{projectId}/{subcontractorId}/{documentId}/get-signed-url":{"get":{"parameters":[{"schema":{},"in":"query","name":"useGeneratedFile","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"subcontractorId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/admin/email":{"post":{"summary":"Send admin email","tags":["Construction"],"description":"Send an administrative email through the construction service.","security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/construction/admin/projects/{id}":{"delete":{"summary":"Hard delete project","tags":["Construction"],"description":"Permanently delete a construction project from the system.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/buildings/customer/{customerId}":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/buildings/projects/{projectId}":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/deliveries/project/{projectId}":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/deliveries/":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["customerId","projectId","buildingCategory","fullCategory"],"additionalProperties":false,"properties":{"customerId":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"projectId":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"buildingCategory":{"type":"string","pattern":"^(\\d{3}|[2-7]\\d{3}|MSC)$"},"fullCategory":{"type":"string","pattern":"^(\\d{3}|[2-7]\\d{3}|MSC)$"},"serialNumber":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":2000},"discipline":{"type":"string","maxLength":255},"contactPerson":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","maxLength":255},"email":{"type":"string","maxLength":255},"phone":{"type":"string","maxLength":100,"nullable":true}}},"informationTypes":{"type":"array","maxItems":200,"items":{"type":"object","required":["informationType"],"additionalProperties":false,"properties":{"informationType":{"type":"string","maxLength":255},"approvalStatus":{"type":"string","enum":["APPROVED","DECLINED",null],"nullable":true},"comment":{"type":"string","maxLength":2000,"nullable":true},"secondaryComment":{"type":"string","maxLength":2000,"nullable":true},"verifiedBy":{"type":"string","maxLength":255,"nullable":true},"verifiedAt":{"type":"string","maxLength":64,"nullable":true}}}},"informationTypesExpected":{"type":"array","maxItems":200,"items":{"type":"string","maxLength":255}}}}}}},"responses":{"200":{"description":"Default Response"}}}},"/construction/deliveries/{id}":{"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"buildingCategory":{"type":"string","pattern":"^(\\d{3}|[2-7]\\d{3}|MSC)$"},"fullCategory":{"type":"string","pattern":"^(\\d{3}|[2-7]\\d{3}|MSC)$"},"serialNumber":{"type":"string","minLength":1,"maxLength":100},"discipline":{"type":"string","maxLength":255},"description":{"type":"string","maxLength":2000},"subContractorId":{"type":"string","maxLength":64,"nullable":true},"comment":{"type":"string","maxLength":2000},"secondaryComment":{"type":"string","maxLength":2000},"contactPerson":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","maxLength":255},"email":{"type":"string","maxLength":255},"phone":{"type":"string","maxLength":100,"nullable":true}}},"informationTypes":{"type":"array","maxItems":200,"items":{"type":"object","required":["informationType"],"additionalProperties":false,"properties":{"informationType":{"type":"string","maxLength":255},"approvalStatus":{"type":"string","enum":["APPROVED","DECLINED",null],"nullable":true},"comment":{"type":"string","maxLength":2000,"nullable":true},"secondaryComment":{"type":"string","maxLength":2000,"nullable":true},"verifiedBy":{"type":"string","maxLength":255,"nullable":true},"verifiedAt":{"type":"string","maxLength":64,"nullable":true}}}},"informationTypesExpected":{"type":"array","maxItems":200,"items":{"type":"string","maxLength":255}}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["projectId"],"properties":{"projectId":{"type":"string","minLength":36,"maxLength":36}}}}}},"parameters":[{"schema":{"type":"string","minLength":36,"maxLength":36},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/deliveries/copy-deliveries":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/construction/deliveries/send-subcontractor-email":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/construction/deliveries/preview":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/construction/documents/{documentId}":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}},"put":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/documents/{documentId}/get-signed-url":{"get":{"parameters":[{"schema":{"type":"boolean"},"in":"query","name":"useGeneratedFile","required":false},{"schema":{"type":"string"},"in":"path","name":"documentId","required":true},{"schema":{"type":"boolean"},"in":"path","name":"useGeneratedFile","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/documents/{documentId}/dwg-viewer":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/documents/project/{projectId}":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/documents/batch":{"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["documents"],"properties":{"documents":{"type":"array","minItems":1,"maxItems":500,"items":{"type":"object"}}}}}}},"responses":{"200":{"description":"Default Response"}}}},"/construction/zip/{buildingId}":{"post":{"parameters":[{"schema":{"type":"string"},"in":"query","name":"excludeFilesBeforeDate","required":false},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/zip/{buildingId}/subcontractor/{subcontractorId}":{"post":{"parameters":[{"schema":{"type":"string"},"in":"query","name":"excludeFilesBeforeDate","required":false},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string"},"in":"path","name":"subcontractorId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/zip/{buildingId}/latest":{"get":{"parameters":[{"schema":{"type":"string"},"in":"query","name":"excludeFilesBeforeDate","required":false},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/customers/{customerId}/projects/{projectId}":{"get":{"summary":"Get construction project","tags":["Construction"],"description":"Retrieve a specific construction project by customer and project ID.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}},"put":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/customers/{customerId}/projects":{"get":{"summary":"Get customer construction projects","tags":["Construction"],"description":"Retrieve all construction projects for a specific customer.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}},"post":{"summary":"Create construction project","tags":["Construction"],"description":"Create a new construction project for a customer.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/construction/customers/{customerId}/projects/migration-target":{"get":{"summary":"Get construction customer migration target","tags":["Construction"],"description":"The doc-platform customer every live project of this construction customer was migrated to, or null.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/construction/customers/{customerId}/projects/{projectId}/workos/users/{userId}/role":{"put":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","pattern":"^user_[a-zA-Z0-9]{26}$"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/customers/{customerId}/workos/users/{userId}/projects/roles":{"put":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^user_[a-zA-Z0-9]{26}$"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/customers/{customerId}/projects/{projectId}/preview-filenames":{"get":{"summary":"Preview bulk filename updates","tags":["Construction"],"description":"Preview what the new filenames would be for documents in a construction project without making changes.","parameters":[{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"useLocationCode","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"useInformationType","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"useTFMCode","required":false},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/construction/customers/{customerId}/projects/{projectId}/update-filenames":{"post":{"summary":"Bulk update filenames","tags":["Construction"],"description":"Update filenames for all eligible documents in a construction project.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/construction/customers/{customerId}/projects/{projectId}/bulk-update-metadata":{"post":{"summary":"Bulk update document metadata","tags":["Construction"],"description":"Update building category and/or information types for multiple documents in a construction project.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/construction/customers/":{"get":{"summary":"Get customers","tags":["Construction"],"description":"Retrieve all customers accessible to the authenticated user.","security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/construction/customers/{customerId}":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/customers/{customerId}/workos/users":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}},"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","role"],"properties":{"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["ADMIN","OWNER","WRITE_ACCESS","READ_ACCESS","NO_ACCESS"]},"locale":{"type":"string","enum":["en","no","fr","sv","fi","da"]},"origin":{"type":"string","enum":["construction","document-platform"]}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/customers/{customerId}/workos/users/{userId}/role":{"put":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^user_[a-zA-Z0-9]{26}$"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/customers/{customerId}/workos/users/{userId}":{"delete":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^user_[a-zA-Z0-9]{26}$"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/subcontractorsprojects/{projectId}/{subcontractorId}":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"subcontractorId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/subcontractors/projects/{projectId}":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}},"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","email","projectId","customerId"],"properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email"},"phone":{"type":"string","nullable":true},"deadlineDate":{"type":"string"},"contactPersons":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string","nullable":true}}}},"customerId":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/subcontractors/projects/{projectId}/{subcontractorId}":{"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"contactPersons":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string","nullable":true}}}},"deadlineDate":{"type":"string"},"lastEmailSentAt":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string"},"in":"path","name":"subcontractorId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"subcontractorId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/dashboard/cs-overview/":{"get":{"summary":"Get the Attio customer relationship overview","tags":["Dashboard"],"description":"Returns lifecycle, ownership, contact coverage, and upcoming commercial activity for Findable customers linked to Attio.","security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","enum":["attio"]},"accounts":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string"},"customerName":{"type":"string"},"ownerEmail":{"nullable":true,"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"ownerName":{"type":"string"},"lifecycleStage":{"type":"string"},"webUrl":{"nullable":true,"type":"string","format":"uri"},"contact":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["contacted"]},"daysSinceContact":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastContactAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["status","daysSinceContact","lastContactAt"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["never"]}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["unavailable"]}},"required":["status"],"additionalProperties":false}]}},"required":["customerId","customerName","ownerEmail","ownerName","lifecycleStage","webUrl","contact"],"additionalProperties":false}},"commercialDeals":{"type":"array","items":{"type":"object","properties":{"dealId":{"type":"string"},"dealName":{"type":"string"},"customerId":{"nullable":true,"type":"string"},"customerName":{"nullable":true,"type":"string"},"motion":{"type":"string","enum":["expansion","renewal"]},"amount":{"type":"number","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"closeDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"stageName":{"type":"string"},"ownerName":{"nullable":true,"type":"string"},"daysUntilClose":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ownerEmail":{"nullable":true,"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"lifecycleStage":{"nullable":true,"type":"string"},"webUrl":{"nullable":true,"type":"string","format":"uri"}},"required":["dealId","dealName","customerId","customerName","motion","amount","currency","closeDate","stageName","ownerName","daysUntilClose","ownerEmail","lifecycleStage","webUrl"],"additionalProperties":false}},"impact":{"type":"object","properties":{"period":{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"endsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"label":{"type":"string"}},"required":["startsAt","endsAt","label"],"additionalProperties":false},"stats":{"type":"object","properties":{"wins":{"type":"integer","minimum":0,"maximum":9007199254740991},"customersHelped":{"type":"integer","minimum":0,"maximum":9007199254740991},"contributors":{"type":"integer","minimum":0,"maximum":9007199254740991},"customerConfirmed":{"type":"integer","minimum":0,"maximum":9007199254740991},"teamGoal":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["wins","customersHelped","contributors","customerConfirmed","teamGoal"],"additionalProperties":false},"wins":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"source":{"type":"string","enum":["attio_win","automatic"]},"headline":{"type":"string","minLength":1},"summary":{"type":"string","minLength":1},"customerId":{"nullable":true,"type":"string"},"customerName":{"nullable":true,"type":"string"},"category":{"type":"string","enum":["customer_love","adoption","product_impact","delivery","collaboration","renewal","expansion","new_customer"]},"occurredAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"contributors":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"nullable":true,"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"],"additionalProperties":false}},"customerConfirmed":{"type":"boolean"},"crossTeam":{"type":"boolean"},"points":{"type":"integer","minimum":1,"maximum":4},"evidenceUrl":{"nullable":true,"type":"string","format":"uri"}},"required":["id","source","headline","summary","customerId","customerName","category","occurredAt","contributors","customerConfirmed","crossTeam","points","evidenceUrl"],"additionalProperties":false}},"leaderboard":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"nullable":true,"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"wins":{"type":"integer","minimum":0,"maximum":9007199254740991},"points":{"type":"integer","minimum":0,"maximum":9007199254740991},"crossTeamWins":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","email","wins","points","crossTeamWins"],"additionalProperties":false}},"currentStreakDays":{"type":"integer","minimum":0,"maximum":9007199254740991},"crew":{"type":"object","properties":{"stats":{"type":"object","properties":{"peopleThisWeek":{"type":"integer","minimum":0,"maximum":9007199254740991},"peopleThisMonth":{"type":"integer","minimum":0,"maximum":9007199254740991},"customersHeardFrom":{"type":"integer","minimum":0,"maximum":9007199254740991},"activeCustomers":{"type":"integer","minimum":0,"maximum":9007199254740991},"conversations":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["peopleThisWeek","peopleThisMonth","customersHeardFrom","activeCustomers","conversations"],"additionalProperties":false},"people":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"email":{"nullable":true,"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"avatarUrl":{"nullable":true,"type":"string","format":"uri"},"activeThisWeek":{"type":"boolean"},"lastTouchAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"customers":{"type":"integer","minimum":0,"maximum":9007199254740991},"conversations":{"type":"object","properties":{"meetings":{"type":"integer","minimum":0,"maximum":9007199254740991},"emails":{"type":"integer","minimum":0,"maximum":9007199254740991},"replies":{"type":"integer","minimum":0,"maximum":9007199254740991},"intercom":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["meetings","emails","replies","intercom"],"additionalProperties":false},"badges":{"type":"array","items":{"type":"string","enum":["bridge_builder","quick_helper","high_five","reconnector","on_a_roll"]}}},"required":["key","name","email","avatarUrl","activeThisWeek","lastTouchAt","customers","conversations","badges"],"additionalProperties":false}},"recentTouches":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"personName":{"type":"string","minLength":1},"customerName":{"type":"string","minLength":1},"channel":{"type":"string","enum":["meeting","email","intercom"]},"kind":{"type":"string","enum":["meeting","reply","outbound"]},"occurredAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","personName","customerName","channel","kind","occurredAt"],"additionalProperties":false}},"daily":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"conversations":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["date","conversations"],"additionalProperties":false}},"sources":{"type":"object","properties":{"meeting":{"type":"object","properties":{"status":{"type":"string","enum":["available","partial","unavailable"]},"reason":{"nullable":true,"type":"string","enum":["missing_scope","not_configured","error"]}},"required":["status","reason"],"additionalProperties":false},"email":{"type":"object","properties":{"status":{"type":"string","enum":["available","partial","unavailable"]},"reason":{"nullable":true,"type":"string","enum":["missing_scope","not_configured","error"]}},"required":["status","reason"],"additionalProperties":false},"intercom":{"type":"object","properties":{"status":{"type":"string","enum":["available","partial","unavailable"]},"reason":{"nullable":true,"type":"string","enum":["missing_scope","not_configured","error"]}},"required":["status","reason"],"additionalProperties":false}},"required":["meeting","email","intercom"],"additionalProperties":false}},"required":["stats","people","recentTouches","daily","sources"],"additionalProperties":false}},"required":["period","stats","wins","leaderboard","currentStreakDays"],"additionalProperties":false},"activityWindowDays":{"type":"number","enum":[7]},"contactThresholdDays":{"type":"number","enum":[30]},"overall":{"type":"object","properties":{"totalAccounts":{"type":"integer","minimum":0,"maximum":9007199254740991},"assignedAccounts":{"type":"integer","minimum":0,"maximum":9007199254740991},"unassignedAccounts":{"type":"integer","minimum":0,"maximum":9007199254740991},"lifecycleBreakdown":{"type":"array","items":{"type":"object","properties":{"lifecycleStage":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["lifecycleStage","count"],"additionalProperties":false}},"contactCoverage":{"type":"object","properties":{"status":{"type":"string","enum":["available","partial","unavailable"]},"contactedAccounts":{"type":"integer","minimum":0,"maximum":9007199254740991},"neverContactedAccounts":{"type":"integer","minimum":0,"maximum":9007199254740991},"unavailableAccounts":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["status","contactedAccounts","neverContactedAccounts","unavailableAccounts"],"additionalProperties":false},"needsContact":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["available"]},"value":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["status","value"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["partial"]},"value":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["status","value"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["unavailable"]},"value":{"type":"string","nullable":true,"enum":[null]}},"required":["status","value"],"additionalProperties":false}]}},"required":["totalAccounts","assignedAccounts","unassignedAccounts","lifecycleBreakdown","contactCoverage","needsContact"],"additionalProperties":false},"owners":{"type":"array","items":{"type":"object","properties":{"ownerEmail":{"nullable":true,"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"ownerName":{"type":"string"},"accountCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"lifecycleBreakdown":{"type":"array","items":{"type":"object","properties":{"lifecycleStage":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["lifecycleStage","count"],"additionalProperties":false}},"emailedAccounts":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["available"]},"value":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["status","value"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["partial"]},"value":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["status","value"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["unavailable"]},"value":{"type":"string","nullable":true,"enum":[null]}},"required":["status","value"],"additionalProperties":false}]},"meetings":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["available"]},"value":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["status","value"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["partial"]},"value":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["status","value"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["unavailable"]},"value":{"type":"string","nullable":true,"enum":[null]}},"required":["status","value"],"additionalProperties":false}]},"contactCoverage":{"type":"object","properties":{"status":{"type":"string","enum":["available","partial","unavailable"]},"contactedAccounts":{"type":"integer","minimum":0,"maximum":9007199254740991},"neverContactedAccounts":{"type":"integer","minimum":0,"maximum":9007199254740991},"unavailableAccounts":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["status","contactedAccounts","neverContactedAccounts","unavailableAccounts"],"additionalProperties":false},"needsContact":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["available"]},"value":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["status","value"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["partial"]},"value":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["status","value"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["unavailable"]},"value":{"type":"string","nullable":true,"enum":[null]}},"required":["status","value"],"additionalProperties":false}]}},"required":["ownerEmail","ownerName","accountCount","lifecycleBreakdown","emailedAccounts","meetings","contactCoverage","needsContact"],"additionalProperties":false}},"accountsNeedingContact":{"maxItems":10,"type":"array","items":{"oneOf":[{"type":"object","properties":{"customerId":{"type":"string"},"customerName":{"type":"string"},"ownerEmail":{"nullable":true,"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"ownerName":{"type":"string"},"lifecycleStage":{"type":"string"},"contactStatus":{"type":"string","enum":["contacted"]},"daysSinceContact":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastContactAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["customerId","customerName","ownerEmail","ownerName","lifecycleStage","contactStatus","daysSinceContact","lastContactAt"],"additionalProperties":false},{"type":"object","properties":{"customerId":{"type":"string"},"customerName":{"type":"string"},"ownerEmail":{"nullable":true,"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"ownerName":{"type":"string"},"lifecycleStage":{"type":"string"},"contactStatus":{"type":"string","enum":["never"]},"daysSinceContact":{"type":"string","nullable":true,"enum":[null]},"lastContactAt":{"type":"string","nullable":true,"enum":[null]}},"required":["customerId","customerName","ownerEmail","ownerName","lifecycleStage","contactStatus","daysSinceContact","lastContactAt"],"additionalProperties":false}]}},"upcomingDeals":{"type":"array","items":{"type":"object","properties":{"dealId":{"type":"string"},"dealName":{"type":"string"},"customerId":{"nullable":true,"type":"string"},"customerName":{"nullable":true,"type":"string"},"motion":{"type":"string","enum":["expansion","renewal"]},"amount":{"type":"number","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"closeDate":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"stageName":{"type":"string"},"ownerName":{"nullable":true,"type":"string"},"daysUntilClose":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["dealId","dealName","customerId","customerName","motion","amount","currency","closeDate","stageName","ownerName","daysUntilClose"],"additionalProperties":false}},"lastUpdated":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"activityAsOf":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["source","accounts","commercialDeals","impact","activityWindowDays","contactThresholdDays","overall","owners","accountsNeedingContact","upcomingDeals","lastUpdated","activityAsOf"],"additionalProperties":false}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["CRM_DATA_UNAVAILABLE"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}}},"/dashboard/customer-momentum/":{"get":{"summary":"Get customer product momentum","tags":["Dashboard"],"description":"Returns the nightly Attio product-usage projection, adoption cohorts, and an explicit customer attention queue.","security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","enum":["attio-product-usage"]},"windowDays":{"type":"number","enum":[30]},"staleAfterHours":{"type":"number","enum":[36]},"overall":{"type":"object","properties":{"totalAccounts":{"type":"integer","minimum":0,"maximum":9007199254740991},"establishedAccounts":{"type":"integer","minimum":0,"maximum":9007199254740991},"measuredEstablishedAccounts":{"type":"integer","minimum":0,"maximum":9007199254740991},"activeAccounts":{"type":"integer","minimum":0,"maximum":9007199254740991},"activeRate":{"type":"number","minimum":0,"maximum":1},"needsAttentionAccounts":{"type":"integer","minimum":0,"maximum":9007199254740991},"onboardingAccounts":{"type":"integer","minimum":0,"maximum":9007199254740991},"unknownAccounts":{"type":"integer","minimum":0,"maximum":9007199254740991},"multiUserAccounts":{"type":"integer","minimum":0,"maximum":9007199254740991},"healthyAccounts":{"type":"integer","minimum":0,"maximum":9007199254740991},"documentsProcessed30d":{"type":"number","minimum":0},"extractVolume30d":{"type":"number","minimum":0},"askQueries30d":{"type":"number","minimum":0},"activeUsers30d":{"type":"number","minimum":0}},"required":["totalAccounts","establishedAccounts","measuredEstablishedAccounts","activeAccounts","activeRate","needsAttentionAccounts","onboardingAccounts","unknownAccounts","multiUserAccounts","healthyAccounts","documentsProcessed30d","extractVolume30d","askQueries30d","activeUsers30d"],"additionalProperties":false},"healthDistribution":{"type":"object","properties":{"healthy":{"type":"integer","minimum":0,"maximum":9007199254740991},"neutral":{"type":"integer","minimum":0,"maximum":9007199254740991},"atRisk":{"type":"integer","minimum":0,"maximum":9007199254740991},"unknown":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["healthy","neutral","atRisk","unknown"],"additionalProperties":false},"accounts":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string"},"customerName":{"type":"string"},"companyRecordId":{"type":"string"},"ownerEmail":{"nullable":true,"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"ownerName":{"type":"string"},"lifecycleStage":{"type":"string"},"webUrl":{"nullable":true,"type":"string","format":"uri"},"status":{"type":"string","enum":["active","needs_attention","onboarding","unknown"]},"healthStatus":{"type":"string","enum":["healthy","neutral","atRisk","unknown"]},"reasons":{"type":"array","items":{"type":"string","enum":["no_recent_activity","low_user_activation","low_building_penetration","single_active_user","usage_data_stale","usage_data_unavailable"]}},"isOnboarding":{"type":"boolean"},"metrics":{"type":"object","properties":{"assetsLive":{"nullable":true,"type":"number","minimum":0},"documentsProcessed30d":{"nullable":true,"type":"number","minimum":0},"extractVolume30d":{"nullable":true,"type":"number","minimum":0},"askQueries30d":{"nullable":true,"type":"number","minimum":0},"activeUsers30d":{"nullable":true,"type":"number","minimum":0},"totalUsers":{"nullable":true,"type":"number","minimum":0},"userActivation":{"nullable":true,"type":"number","minimum":0,"maximum":1},"buildingPenetration":{"nullable":true,"type":"number","minimum":0},"lastActiveAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"syncedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["assetsLive","documentsProcessed30d","extractVolume30d","askQueries30d","activeUsers30d","totalUsers","userActivation","buildingPenetration","lastActiveAt","syncedAt"],"additionalProperties":false}},"required":["customerId","customerName","companyRecordId","ownerEmail","ownerName","lifecycleStage","webUrl","status","healthStatus","reasons","isOnboarding","metrics"],"additionalProperties":false}},"lastUpdated":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["source","windowDays","staleAfterHours","overall","healthDistribution","accounts","lastUpdated"],"additionalProperties":false}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["CUSTOMER_MOMENTUM_UNAVAILABLE"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}}},"/dashboard/sales-overview/":{"get":{"summary":"Get the Attio sales overview","tags":["Dashboard"],"description":"Retrieve current-quarter Attio totals, current-stage distribution, owner performance, and original-currency pipeline values.","security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","enum":["attio"]},"period":{"type":"object","properties":{"label":{"type":"string"},"startsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"endsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["label","startsAt","endsAt"]},"totals":{"type":"object","properties":{"won":{"type":"integer","minimum":0,"maximum":9007199254740991},"open":{"type":"integer","minimum":0,"maximum":9007199254740991},"lost":{"type":"integer","minimum":0,"maximum":9007199254740991},"unknown":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"winRate":{"type":"number","minimum":0,"maximum":100},"openPipelineByCurrency":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code for this amount"},"amount":{"type":"number","minimum":0,"description":"Amount in the matching currency"}},"required":["currency","amount"]}},"pipelineAddedThisWeekByCurrency":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code for this amount"},"amount":{"type":"number","minimum":0,"description":"Amount in the matching currency"}},"required":["currency","amount"]}}},"required":["won","open","lost","unknown","total","winRate","openPipelineByCurrency","pipelineAddedThisWeekByCurrency"]},"owners":{"type":"array","items":{"type":"object","properties":{"ownerEmail":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","nullable":true},"ownerName":{"type":"string"},"rank":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"won":{"type":"integer","minimum":0,"maximum":9007199254740991},"open":{"type":"integer","minimum":0,"maximum":9007199254740991},"lost":{"type":"integer","minimum":0,"maximum":9007199254740991},"unknown":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"winRate":{"type":"number","minimum":0,"maximum":100},"openPipelineByCurrency":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code for this amount"},"amount":{"type":"number","minimum":0,"description":"Amount in the matching currency"}},"required":["currency","amount"]}}},"required":["ownerEmail","ownerName","rank","won","open","lost","unknown","total","winRate","openPipelineByCurrency"]}},"stages":{"type":"array","items":{"type":"object","properties":{"stageId":{"type":"string"},"stageName":{"type":"string"},"displayOrder":{"type":"integer","minimum":0,"maximum":9007199254740991,"nullable":true},"status":{"type":"string","enum":["won","open","lost","unknown"]},"dealsInStage":{"type":"integer","minimum":0,"maximum":9007199254740991},"valueByCurrency":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code for this amount"},"amount":{"type":"number","minimum":0,"description":"Amount in the matching currency"}},"required":["currency","amount"]}}},"required":["stageId","stageName","displayOrder","status","dealsInStage","valueByCurrency"]}},"lastUpdated":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["source","period","totals","owners","stages","lastUpdated"]}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/dashboard/sales-bell/":{"get":{"summary":"Get sales bell data for celebration display","tags":["Dashboard"],"description":"Retrieve every Attio closed-won deal this quarter across all classified and unclassified motions, with a per-rep leaderboard.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"deals":{"type":"array","items":{"type":"object","properties":{"dealId":{"type":"string","description":"CRM deal record ID"},"dealName":{"type":"string","description":"Deal name"},"companyName":{"description":"Company/customer name","type":"string","nullable":true},"amount":{"type":"number","description":"Original deal value (ARR) in deal currency"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code for the original deal amount"},"amountInEur":{"description":"Deal value converted to EUR for display; null when conversion is unavailable","type":"number","minimum":0,"nullable":true},"closedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Close date (ISO datetime)"},"ownerEmail":{"description":"Stable sales-rep email used for CRM-independent grouping","type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","nullable":true},"ownerName":{"description":"Sales rep who closed the deal","type":"string","nullable":true},"ownerAvatarUrl":{"description":"Attio profile picture of the sales rep; null when they have none","type":"string","nullable":true},"motion":{"type":"string","enum":["new_logo","expansion","renewal","unclassified"],"description":"Stable commercial motion classification"}},"required":["dealId","dealName","companyName","amount","currency","amountInEur","closedAt","ownerEmail","ownerName","ownerAvatarUrl","motion"]},"description":"Closed-won deals this quarter, sorted by closedAt desc"},"leaderboard":{"type":"array","items":{"type":"object","properties":{"ownerEmail":{"description":"Stable sales-rep email; null only for unassigned deals","type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","nullable":true},"ownerName":{"type":"string","description":"Sales rep name"},"ownerAvatarUrl":{"description":"Attio profile picture of the sales rep; null when they have none","type":"string","nullable":true},"wins":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of closed-won deals this quarter"},"totalValue":{"type":"number","minimum":0,"description":"Legacy raw ARR sum kept for backwards compatibility"},"totalValueEur":{"description":"ARR closed by this rep converted to EUR for display; null when isEurConversionAvailable is false","type":"number","minimum":0,"nullable":true},"valueByCurrency":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code for this amount"},"amount":{"type":"number","minimum":0,"description":"Amount in the matching currency"}},"required":["currency","amount"]},"description":"Original ARR closed by this rep, grouped by deal currency"}},"required":["ownerEmail","ownerName","ownerAvatarUrl","wins","totalValue","totalValueEur","valueByCurrency"]},"description":"Per-rep wins and value, sorted by EUR value desc (wins when not convertible)"},"quarterName":{"type":"string","description":"Quarter label (e.g. \"Q1 2026\")"},"quarterStartsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Start of the current quarter (UTC)"},"totalClosedWon":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Total closed-won deals this quarter"},"totalClosedWonValue":{"type":"number","minimum":0,"description":"Legacy raw ARR sum kept for backwards compatibility"},"totalClosedWonValueEur":{"description":"Total ARR closed this quarter converted to EUR for display; null when isEurConversionAvailable is false","type":"number","minimum":0,"nullable":true},"totalClosedWonValueByCurrency":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code for this amount"},"amount":{"type":"number","minimum":0,"description":"Amount in the matching currency"}},"required":["currency","amount"]},"description":"Original total ARR closed this quarter, grouped by deal currency"},"isEurConversionAvailable":{"type":"boolean","description":"Whether every non-zero deal amount in the response could be converted to EUR"},"motionBreakdown":{"type":"array","items":{"type":"object","properties":{"motion":{"type":"string","enum":["new_logo","expansion","renewal","unclassified"]},"wins":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Closed-won deals with this motion"},"valueEur":{"description":"ARR in EUR; null when isEurConversionAvailable is false","type":"number","minimum":0,"nullable":true},"valueByCurrency":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code for this amount"},"amount":{"type":"number","minimum":0,"description":"Amount in the matching currency"}},"required":["currency","amount"]},"description":"ARR grouped by deal currency"}},"required":["motion","wins","valueEur","valueByCurrency"]},"description":"Closed-won deals this quarter per motion, in fixed motion order"},"previousQuarter":{"type":"object","properties":{"quarterName":{"type":"string","description":"Quarter label (e.g. \"Q2 2026\")"},"totalClosedWon":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Closed-won deals by the same day offset into that quarter"},"totalClosedWonValueEur":{"description":"ARR closed by the same day offset, in EUR; null when not convertible","type":"number","minimum":0,"nullable":true}},"required":["quarterName","totalClosedWon","totalClosedWonValueEur"],"description":"Last quarter at the same point, for the \"vs last quarter\" comparison"},"lastUpdated":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Timestamp of data fetch"}},"required":["deals","leaderboard","quarterName","quarterStartsAt","totalClosedWon","totalClosedWonValue","totalClosedWonValueEur","totalClosedWonValueByCurrency","isEurConversionAvailable","motionBreakdown","previousQuarter","lastUpdated"]}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/dashboard/sales-bell/recent":{"get":{"summary":"Check for recently closed-won deals","tags":["Dashboard"],"description":"Lightweight endpoint for near-real-time bell detection. Returns CRM deals that entered a configured won stage since the `since` watermark (minus a 15-minute overlap; default and minimum window 15 minutes, at most 24 hours).","parameters":[{"schema":{"type":"string","format":"date-time"},"in":"query","name":"since","required":false,"description":"When this display last checked (the previous lastChecked)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"deals":{"type":"array","items":{"type":"object","properties":{"dealId":{"type":"string","description":"CRM deal record ID"},"dealName":{"type":"string","description":"Deal name"},"companyName":{"description":"Company/customer name","type":"string","nullable":true},"amount":{"type":"number","description":"Original deal value (ARR) in deal currency"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code for the original deal amount"},"amountInEur":{"description":"Deal value converted to EUR for display; null when conversion is unavailable","type":"number","minimum":0,"nullable":true},"closedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Close date (ISO datetime)"},"ownerEmail":{"description":"Stable sales-rep email used for CRM-independent grouping","type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","nullable":true},"ownerName":{"description":"Sales rep who closed the deal","type":"string","nullable":true},"ownerAvatarUrl":{"description":"Attio profile picture of the sales rep; null when they have none","type":"string","nullable":true},"motion":{"type":"string","enum":["new_logo","expansion","renewal","unclassified"],"description":"Stable commercial motion classification"}},"required":["dealId","dealName","companyName","amount","currency","amountInEur","closedAt","ownerEmail","ownerName","ownerAvatarUrl","motion"]},"description":"Deals that entered a won stage since the requested watermark"},"isEurConversionAvailable":{"type":"boolean","description":"Whether every non-zero deal amount in the response could be converted to EUR"},"lastChecked":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Timestamp of this check"}},"required":["deals","isEurConversionAvailable","lastChecked"]}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/dashboard/dinner/":{"get":{"summary":"Get dinner leaderboard","tags":["Dashboard"],"description":"Retrieve dinner reaction leaderboard from Slack. Public endpoint for office displays.","security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"lastUpdated":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Timestamp of data fetch"},"period":{"type":"object","properties":{"label":{"type":"string","description":"Human-readable label, e.g. \"May–Jul 2026\""},"startsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Inclusive ISO start of the window"},"endsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Inclusive ISO end of the window"}},"required":["label","startsAt","endsAt"],"description":"The quarter window this leaderboard covers"},"users":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","description":"Slack user ID"},"displayName":{"type":"string","description":"User display name"},"profileImage":{"description":"Slack profile image URL","type":"string"},"totalReactions":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Total dinner reactions"},"rank":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Leaderboard rank (1 = most dinners)"}},"required":["userId","displayName","totalReactions","rank"]},"description":"Active users sorted by reactions"},"missingUsers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","description":"Slack user ID"},"displayName":{"type":"string","description":"User display name"},"profileImage":{"description":"Slack profile image URL","type":"string"},"daysSinceLastReaction":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Days since last dinner reaction"},"lastReactionDate":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO date of last reaction"}},"required":["userId","displayName","daysSinceLastReaction","lastReactionDate"]},"description":"Users who haven't reacted recently"}},"required":["lastUpdated","period","users","missingUsers"]}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/dashboard/dinner/history":{"get":{"summary":"Get historic dinner stats","tags":["Dashboard"],"description":"Attendance per month, record turnout, live streaks and past-quarter podiums, derived from Slack history. Cached server-side for an hour.","security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"lastUpdated":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Timestamp of data fetch"},"totals":{"type":"object","properties":{"dinners":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Dinners found in the window"},"months":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Months the window spans"}},"required":["dinners","months"],"description":"Size of the window this response was computed from"},"monthly":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string","description":"Calendar month as YYYY-MM"},"dinners":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Dinners offered in this month"},"totalAttendance":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Sum of attendees across every dinner in this month"},"avgAttendance":{"type":"number","minimum":0,"description":"Average people per dinner, rounded to one decimal"}},"required":["month","dinners","totalAttendance","avgAttendance"]},"description":"Attendance per month, oldest first"},"record":{"description":"Best-attended dinner, or null when no dinners were found","type":"object","properties":{"date":{"type":"string","description":"Date of the dinner as YYYY-MM-DD"},"attendance":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"People who joined that dinner"},"names":{"type":"array","items":{"type":"string"},"description":"Display names of everyone who joined"}},"required":["date","attendance","names"],"nullable":true},"streaks":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","description":"Slack user ID"},"displayName":{"type":"string","description":"User display name"},"profileImage":{"description":"Slack profile image URL","type":"string"},"streak":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Consecutive dinners attended, ending at the most recent dinner"}},"required":["userId","displayName","streak"]},"description":"Live streaks, longest first; empty when the latest dinner had nobody"},"hallOfFame":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","description":"Quarter label, e.g. \"May–Jul 2026\""},"dinners":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Dinners offered that quarter"},"winners":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","description":"Slack user ID"},"displayName":{"type":"string","description":"User display name"},"profileImage":{"description":"Slack profile image URL","type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Dinners attended that quarter"}},"required":["userId","displayName","count"]},"description":"Top three by dinners attended, best first"}},"required":["label","dinners","winners"]},"description":"Completed quarters, newest first; excludes the running quarter"}},"required":["lastUpdated","totals","monthly","record","streaks","hallOfFame"]}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/dashboard/processing-health/":{"get":{"summary":"Get global processing health metrics","tags":["Dashboard"],"description":"Retrieve aggregated processing health data across all customers and buildings. Includes document status, indexing status, metadata completeness, and per-customer breakdown. Public endpoint for office displays.","parameters":[{"schema":{"type":"number","minimum":1,"maximum":90},"in":"query","name":"daysBack","required":false,"description":"Number of days to analyse (default: 14, max 90)"}],"security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"globalMetrics":{"type":"object","properties":{"totalDocuments":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalBuildings":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalCustomers":{"type":"integer","minimum":0,"maximum":9007199254740991},"problematicTotal":{"type":"integer","minimum":0,"maximum":9007199254740991},"statusBreakdown":{"type":"object","properties":{"complete":{"type":"integer","minimum":0,"maximum":9007199254740991},"processing":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"stale":{"type":"integer","minimum":0,"maximum":9007199254740991},"notProcessed":{"type":"integer","minimum":0,"maximum":9007199254740991},"paused":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["complete","processing","failed","stale","notProcessed","paused"]},"indexingBreakdown":{"type":"object","properties":{"searchIndexed":{"type":"integer","minimum":0,"maximum":9007199254740991},"searchNotIndexed":{"type":"integer","minimum":0,"maximum":9007199254740991},"embeddingsIndexed":{"type":"integer","minimum":0,"maximum":9007199254740991},"embeddingsNotIndexed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["searchIndexed","searchNotIndexed","embeddingsIndexed","embeddingsNotIndexed"]},"metadataBreakdown":{"type":"object","properties":{"fullyProcessed":{"type":"integer","minimum":0,"maximum":9007199254740991},"missingMetadata":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["fullyProcessed","missingMetadata"]},"queueMetrics":{"type":"object","properties":{"totalInQueue":{"type":"integer","minimum":0,"maximum":9007199254740991},"averageProcessingTimeMinutes":{"type":"number","minimum":0,"nullable":true},"throughputPerHour":{"type":"number","minimum":0,"nullable":true}},"required":["totalInQueue","averageProcessingTimeMinutes","throughputPerHour"]}},"required":["totalDocuments","totalBuildings","totalCustomers","problematicTotal","statusBreakdown","indexingBreakdown","metadataBreakdown","queueMetrics"]},"customerBreakdown":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerName":{"type":"string"},"totalDocuments":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalBuildings":{"type":"integer","minimum":0,"maximum":9007199254740991},"completionRate":{"type":"number","minimum":0,"maximum":100},"issuesCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"pausedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"queueDepth":{"type":"integer","minimum":0,"maximum":9007199254740991},"truncatedBuildingCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"partial":{"type":"boolean"}},"required":["customerId","customerName","totalDocuments","totalBuildings","completionRate","issuesCount","pausedCount","queueDepth","truncatedBuildingCount","partial"]}},"generatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"timeRangeDays":{"type":"integer","minimum":1,"maximum":9007199254740991},"partial":{"type":"boolean"},"failedCustomerIds":{"type":"array","items":{"type":"string"}},"truncatedBuildingCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"cached":{"type":"boolean"}},"required":["globalMetrics","customerBreakdown","generatedAt","timeRangeDays","partial","failedCustomerIds","truncatedBuildingCount","cached"]}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/dashboard/engineering/":{"get":{"summary":"Get engineering ownership area dashboard","tags":["Dashboard"],"description":"Retrieve open Linear work grouped by the Tech ownership-area labels. Public endpoint for office displays.","security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"areas":{"type":"array","items":{"type":"object","properties":{"area":{"type":"string","description":"Ownership area name"},"scope":{"type":"string","description":"Short human-readable scope"},"tone":{"type":"string","enum":["product","data","platform","security","integrations","business","sideQuest"],"description":"Display tone key"},"totalOpen":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Open Linear issues in this area"},"inProgress":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Started/review issues"},"backlog":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Backlog issues"},"todo":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Todo/triage issues"},"completedLast7Days":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Issues completed in the last 7 days"},"completedLast30Days":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Issues completed in the last 30 days"},"throughput":{"type":"array","items":{"type":"object","properties":{"weekStart":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"UTC Monday that starts the weekly bucket"},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Issues completed during the week"}},"required":["weekStart","completed"]},"description":"Weekly completion counts, oldest bucket first"},"now":{"type":"array","items":{"type":"object","properties":{"identifier":{"type":"string","description":"Linear issue identifier, e.g. T-9325"},"title":{"type":"string","description":"Linear issue title"},"url":{"type":"string","format":"uri","description":"Linear issue URL"},"state":{"type":"string","description":"Current workflow state name"},"priority":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Linear priority number"},"projectName":{"description":"Linked Linear project name, if any","type":"string","nullable":true},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Last Linear update timestamp"}},"required":["identifier","title","url","state","priority","projectName","updatedAt"]},"description":"Representative active issues for the display"},"next":{"type":"array","items":{"type":"object","properties":{"identifier":{"type":"string","description":"Linear issue identifier, e.g. T-9325"},"title":{"type":"string","description":"Linear issue title"},"url":{"type":"string","format":"uri","description":"Linear issue URL"},"state":{"type":"string","description":"Current workflow state name"},"priority":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Linear priority number"},"projectName":{"description":"Linked Linear project name, if any","type":"string","nullable":true},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Last Linear update timestamp"}},"required":["identifier","title","url","state","priority","projectName","updatedAt"]},"description":"Representative next/backlog issues for the display"},"projects":{"type":"array","items":{"type":"string"},"description":"Most common active project names"}},"required":["area","scope","tone","totalOpen","inProgress","backlog","todo","completedLast7Days","completedLast30Days","throughput","now","next","projects"]},"description":"Area summaries in display order"},"totals":{"type":"object","properties":{"openIssues":{"type":"integer","minimum":0,"maximum":9007199254740991},"inProgress":{"type":"integer","minimum":0,"maximum":9007199254740991},"backlog":{"type":"integer","minimum":0,"maximum":9007199254740991},"todo":{"type":"integer","minimum":0,"maximum":9007199254740991},"completedLast7Days":{"type":"integer","minimum":0,"maximum":9007199254740991},"completedLast30Days":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["openIssues","inProgress","backlog","todo","completedLast7Days","completedLast30Days"]},"throughput":{"type":"array","items":{"type":"object","properties":{"weekStart":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"UTC Monday that starts the weekly bucket"},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Issues completed during the week"}},"required":["weekStart","completed"]},"description":"Team-wide weekly completion counts, oldest bucket first"},"throughputAvailable":{"type":"boolean","description":"False when the completed-issue fetch failed, so zero counts mean \"unknown\" rather than \"nothing shipped\""},"sourceStatus":{"type":"string","enum":["live","missing_linear_token"],"description":"Linear data status"},"lastUpdated":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Timestamp this snapshot was produced"}},"required":["areas","totals","throughput","throughputAvailable","sourceStatus","lastUpdated"]}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/photos/{file}":{"get":{"summary":"Serve a workout proof photo","tags":["Dashboard"],"security":[],"parameters":[{"schema":{"type":"string"},"in":"path","name":"file","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/chat/action-plans":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"threadId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"pendingPlanId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"threadId":{"type":"string","minLength":1,"maxLength":128},"summary":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"changes":{"maxItems":30,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":200},"before":{"type":"string","maxLength":4000},"after":{"type":"string","maxLength":4000}},"required":["label"],"additionalProperties":false}},"affectedCount":{"type":"integer","minimum":1,"maximum":100}},"required":["title","changes","affectedCount"],"additionalProperties":false},"expiresAt":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"state":{"type":"string","enum":["pending","approved","rejected","consumed"]}},"required":["pendingPlanId","threadId","summary","expiresAt","state"],"additionalProperties":false}}}}}}}},"/customers/{customerId}/chat/action-plans/{pendingPlanId}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"threadId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"pendingPlanId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["pending","approved","rejected","consumed"]}},"required":["state"],"additionalProperties":false}}}}}}},"/customers/{customerId}/chat/action-plans/{pendingPlanId}/approve":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"threadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["threadId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"pendingPlanId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"approval_receipt":{"type":"string","minLength":43,"maxLength":128}},"required":["approval_receipt"],"additionalProperties":false}}}}}}},"/customers/{customerId}/chat/action-plans/{pendingPlanId}/reject":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"threadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["threadId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"pendingPlanId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"rejected":{"type":"boolean","enum":[true]}},"required":["rejected"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/famac":{"get":{"summary":"Get FAMAC buildings","tags":["Document Platform"],"description":"Retrieve buildings from FAMAC integration for dropdown selection","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden — FAMAC API key missing required scope(s)","content":{"application/json":{"schema":{"description":"Forbidden — FAMAC API key missing required scope(s)","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"missingScopes":{"type":"array","items":{"type":"string"}}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/famac":{"get":{"summary":"Get FAMAC buildings for a building integration","tags":["Document Platform"],"description":"Retrieve buildings from FAMAC for a concrete Findable building picker","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden — FAMAC API key missing required scope(s)","content":{"application/json":{"schema":{"description":"Forbidden — FAMAC API key missing required scope(s)","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"missingScopes":{"type":"array","items":{"type":"string"}}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/famac/start-sync":{"post":{"summary":"Start FAMAC sync (Temporal)","tags":["Document Platform"],"description":"Start a durable FAMAC sync workflow via Temporal. The sync runs on CloudFleet and survives browser closes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filter":{"type":"object","properties":{"type":{"type":"string","enum":["all","filtered"]},"buildingCategories":{"type":"array","items":{"type":"string"}},"folderIds":{"type":"array","items":{"type":"string"}},"fileArchiveCategories":{"type":"array","items":{"type":"string"}}}}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/famac/temporal-sync-status":{"get":{"summary":"Get FAMAC sync progress (Temporal)","tags":["Document Platform"],"description":"Query the progress of a running FAMAC sync workflow from Temporal.","parameters":[{"schema":{"type":"string"},"in":"query","name":"workflowId","required":false},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/famac/cancel-sync":{"post":{"summary":"Cancel FAMAC sync (Temporal)","tags":["Document Platform"],"description":"Cancel a running FAMAC sync workflow. The current batch will finish before stopping.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["workflowId"],"properties":{"workflowId":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/dalux":{"get":{"summary":"Get Dalux buildings","tags":["Document Platform"],"description":"Retrieve buildings from Dalux integration","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/dalux/test-connection":{"post":{"summary":"Test Dalux API connection","tags":["Document Platform"],"description":"Test the connection to Dalux API using customer credentials","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/dalux/projects":{"get":{"summary":"Get Dalux projects","tags":["Document Platform"],"description":"Retrieve projects from Dalux integration","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/dalux":{"get":{"summary":"Get Dalux buildings for a building integration","tags":["Document Platform"],"description":"Retrieve Dalux buildings for a concrete Findable building picker","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/dalux/projects":{"get":{"summary":"Get Dalux projects for a building integration","tags":["Document Platform"],"description":"Retrieve Dalux projects for a concrete Findable building picker","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/dalux/category-mappings":{"get":{"tags":["dalux","admin"],"description":"Get hardcoded category mappings for Dalux integration (NS 3451 codes to Dalux categories)","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/dalux/documents":{"get":{"summary":"Get Dalux documents","tags":["Document Platform"],"description":"Retrieve documents from Dalux with optional filtering","parameters":[{"schema":{"type":"string"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"string"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string"},"in":"query","name":"name","required":false},{"schema":{"type":"string"},"in":"query","name":"tags","required":false},{"schema":{"type":"string"},"in":"query","name":"mimeType","required":false},{"schema":{"type":"string"},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"offset","required":false},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/dalux/documents/search":{"get":{"summary":"Search Dalux documents","tags":["Document Platform"],"description":"Search documents in Dalux by name with optional filters","parameters":[{"schema":{"type":"string"},"in":"query","name":"q","required":true},{"schema":{"type":"string"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"string"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string"},"in":"query","name":"tags","required":false},{"schema":{"type":"string"},"in":"query","name":"mimeType","required":false},{"schema":{"type":"string"},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"offset","required":false},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/dalux/documents/{documentId}":{"get":{"summary":"Get Dalux document","tags":["Document Platform"],"description":"Retrieve a specific document from Dalux","parameters":[{"schema":{"type":"string"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"patch":{"summary":"Update Dalux document","tags":["Document Platform"],"description":"Update metadata for a document in Dalux. Per Dalux API 2.0 spec, only filename and userDefinedFields can be modified.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string"},"userDefinedFields":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object"}}}}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Delete Dalux document","tags":["Document Platform"],"description":"Delete a document from Dalux","parameters":[{"schema":{"type":"string"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/dalux/prepare-sync":{"post":{"summary":"Prepare Dalux sync","tags":["Document Platform"],"description":"Prepare synchronization with Dalux system for a building","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/dalux/preview-sync":{"get":{"summary":"Preview Dalux sync (dry run)","tags":["Document Platform"],"description":"Preview what documents will be synced to Dalux with their mapped metadata. This is a read-only operation that does not modify any data. Use this to review mappings before executing the actual sync.","parameters":[{"schema":{"type":"string","default":"1"},"in":"query","name":"page","required":false,"description":"Page number (1-indexed)"},{"schema":{"type":"string","default":"25"},"in":"query","name":"pageSize","required":false,"description":"Number of documents per page (max 50)"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/dalux/sync-batch":{"post":{"summary":"Sync document batch to Dalux","tags":["Document Platform"],"description":"Synchronize a batch of documents to Dalux system","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string"}}},"required":["documentIds"]}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/dalux/cancel-sync":{"post":{"summary":"Cancel Dalux sync","tags":["Document Platform"],"description":"Cancel an ongoing synchronization with Dalux system","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/dalux/resync-metadata":{"post":{"summary":"Resync document metadata to Dalux","tags":["Document Platform"],"description":"Re-sync metadata for documents that have already been uploaded to Dalux. Updates tags, description, name, and custom fields based on current Findable data. If documentIds is empty or not provided, resyncs all uploaded documents in the building.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string"},"description":"Optional array of specific document IDs to resync. If empty, resyncs all."}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/dalux/sync-status":{"get":{"summary":"Get Dalux sync status","tags":["Document Platform"],"description":"Get the current synchronization status and progress with Dalux","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/dalux/start-import":{"post":{"summary":"Start Dalux import","tags":["Document Platform"],"description":"Start a Dalux import (import-only) as a Temporal workflow. Imports all documents from the linked Dalux building into Findable. The import runs on the integration-sync-worker and survives browser closes.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/dalux/import-status":{"get":{"summary":"Get Dalux import progress","tags":["Document Platform"],"description":"Query the progress of a running Dalux import workflow.","parameters":[{"schema":{"type":"string"},"in":"query","name":"workflowId","required":false},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/dalux/cancel-import":{"post":{"summary":"Cancel Dalux import","tags":["Document Platform"],"description":"Cancel a running Dalux import workflow. The current batch will finish before stopping.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["workflowId"],"properties":{"workflowId":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/google-drive/folders":{"get":{"summary":"List Google Drive folders","tags":["Document Platform"],"description":"List Drive folders for the folder picker.","parameters":[{"schema":{"type":"string"},"in":"query","name":"parentId","required":false},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/google-drive":{"post":{"summary":"Link a Google Drive folder to a building","tags":["Document Platform"],"description":"Store the Google Drive folder this building imports from (empty folderId unlinks).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["folderId"],"properties":{"folderId":{"type":"string"},"folderName":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/google-drive/start-import":{"post":{"summary":"Start Google Drive import","tags":["Document Platform"],"description":"Start a Google Drive import (import-only) as a Temporal workflow. Imports documents from the linked Drive folder into Findable. Runs on the integration-sync-worker and survives browser closes.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/google-drive/import-status":{"get":{"summary":"Get Google Drive import progress","tags":["Document Platform"],"description":"Query the progress of a running Google Drive import workflow.","parameters":[{"schema":{"type":"string"},"in":"query","name":"workflowId","required":false},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/google-drive/cancel-import":{"post":{"summary":"Cancel Google Drive import","tags":["Document Platform"],"description":"Cancel a running Google Drive import workflow. The current batch finishes before stopping.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["workflowId"],"properties":{"workflowId":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/dalux-box/test-connection":{"post":{"summary":"Test the Dalux Box connection","tags":["Document Platform"],"description":"Call the Dalux Build API with the organisation's stored key and report how many Dalux Box projects it can see.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"connected":{"type":"boolean"},"projectCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"message":{"type":"string"}},"required":["connected"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/dalux-box/projects":{"get":{"summary":"List Dalux Box projects","tags":["Document Platform"],"description":"List the Dalux Box projects the API identity can see, for the building editor picker.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"number":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/dalux-box/projects/{projectId}/file-areas":{"get":{"summary":"List Dalux Box file areas","tags":["Document Platform"],"description":"List the file areas of a Dalux Box project.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"projectId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/dalux-box/projects/{projectId}/file-areas/{fileAreaId}/folders":{"get":{"summary":"List Dalux Box folders","tags":["Document Platform"],"description":"List every folder in a Dalux Box file area as a flat list (id, name, parentId); the picker builds the tree.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"fileAreaId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parentId":{"nullable":true,"type":"string"}},"required":["id","name","parentId"],"additionalProperties":false}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/dalux-box":{"put":{"summary":"Link a building to Dalux Box","tags":["Document Platform"],"description":"Link the building to a Dalux Box project and file area, optionally narrowed to folders (with their subfolders). Checked against Dalux first.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"fileAreaId":{"type":"string","minLength":1},"folderIds":{"maxItems":500,"type":"array","items":{"type":"string","minLength":1}}},"required":["projectId","fileAreaId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"daluxBoxProjectId":{"nullable":true,"type":"string"},"daluxBoxProjectName":{"nullable":true,"type":"string"},"daluxBoxFileAreaId":{"nullable":true,"type":"string"},"daluxBoxFileAreaName":{"nullable":true,"type":"string"},"daluxBoxFolderIds":{"nullable":true,"type":"array","items":{"type":"string"}}},"required":["success","daluxBoxProjectId","daluxBoxProjectName","daluxBoxFileAreaId","daluxBoxFileAreaName","daluxBoxFolderIds"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Unlink a building from Dalux Box","tags":["Document Platform"],"description":"Remove the Dalux Box link. Documents already imported stay in the building.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"daluxBoxProjectId":{"nullable":true,"type":"string"},"daluxBoxProjectName":{"nullable":true,"type":"string"},"daluxBoxFileAreaId":{"nullable":true,"type":"string"},"daluxBoxFileAreaName":{"nullable":true,"type":"string"},"daluxBoxFolderIds":{"nullable":true,"type":"array","items":{"type":"string"}}},"required":["success","daluxBoxProjectId","daluxBoxProjectName","daluxBoxFileAreaId","daluxBoxFileAreaName","daluxBoxFolderIds"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/dalux-box/start-import":{"post":{"summary":"Start Dalux Box import","tags":["Document Platform"],"description":"Start a Dalux Box import as a Temporal workflow: the latest revision of every file in the linked file area (or folders) that is not imported yet.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/dalux-box/import-status":{"get":{"summary":"Get Dalux Box import progress","tags":["Document Platform"],"description":"Query the progress of a running Dalux Box import workflow.","parameters":[{"schema":{"type":"string"},"in":"query","name":"workflowId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/dalux-box/cancel-import":{"post":{"summary":"Cancel Dalux Box import","tags":["Document Platform"],"description":"Cancel a running Dalux Box import workflow. The current batch finishes before stopping.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowId":{"type":"string","minLength":1}},"required":["workflowId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/interaxo/test-connection":{"post":{"summary":"Test Interaxo API connection","tags":["Document Platform"],"description":"Exchange the configured customer credentials for an access token and confirm we can read the customer’s communities.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/interaxo/communities":{"get":{"summary":"List Interaxo communities","tags":["Document Platform"],"description":"List the Interaxo communities visible to the customer’s Findable API user. Typically one per customer.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/interaxo/communities/{communityId}/workspaces":{"get":{"summary":"List Interaxo workspaces in a community","tags":["Document Platform"],"description":"List the workspaces inside an Interaxo community. Used by the building-edit room picker.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/interaxo/communities/{communityId}/rooms/{roomId}/folders":{"get":{"summary":"List Interaxo folders under a room or folder","tags":["Document Platform"],"description":"Depth-1 list of `simple-folder` children. Pass `?parentId=` to walk a sub-tree; omit it to start from the room root.","parameters":[{"schema":{"type":"string"},"in":"query","name":"parentId","required":false},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/interaxo/communities/{communityId}/rooms":{"get":{"summary":"List Interaxo rooms in a community","tags":["Document Platform"],"description":"List the rooms visible to the customer’s Findable API user. Pass `?workspaceId=` to scope to one workspace.","parameters":[{"schema":{"type":"string"},"in":"query","name":"workspaceId","required":false},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/interaxo/communities":{"get":{"summary":"List Interaxo communities for a building integration","tags":["Document Platform"],"description":"List Interaxo communities for a concrete Findable building picker","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/interaxo/communities/{communityId}/workspaces":{"get":{"summary":"List Interaxo workspaces for a building integration","tags":["Document Platform"],"description":"List Interaxo workspaces for a concrete Findable building picker","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"communityId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/interaxo/communities/{communityId}/rooms":{"get":{"summary":"List Interaxo rooms for a building integration","tags":["Document Platform"],"description":"List Interaxo rooms for a concrete Findable building picker","parameters":[{"schema":{"type":"string"},"in":"query","name":"workspaceId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"communityId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/interaxo/communities/{communityId}/rooms/{roomId}/folders":{"get":{"summary":"List Interaxo folders for a building integration","tags":["Document Platform"],"description":"List Interaxo folders for a concrete Findable building picker","parameters":[{"schema":{"type":"string"},"in":"query","name":"parentId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"communityId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"roomId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/interaxo/start-ingest":{"post":{"summary":"Start Interaxo ingest","tags":["Document Platform"],"description":"Start an Interaxo ingest (import-only) as a Temporal workflow. The sync runs on the integration-sync-worker and survives browser closes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filter":{"type":"object","additionalProperties":false,"required":["type"],"properties":{"type":{"type":"string","enum":["all","filtered"]},"folderIds":{"type":"array","items":{"type":"string"},"description":"Interaxo room folder IDs to scope the ingest to. Required when type is \"filtered\"."}}}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/interaxo/sync-status":{"get":{"summary":"Get Interaxo ingest progress","tags":["Document Platform"],"description":"Query the progress of a running Interaxo ingest workflow.","parameters":[{"schema":{"type":"string"},"in":"query","name":"workflowId","required":false},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/interaxo/cancel-sync":{"post":{"summary":"Cancel Interaxo ingest","tags":["Document Platform"],"description":"Cancel a running Interaxo ingest workflow. The current batch will finish before stopping.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["workflowId"],"properties":{"workflowId":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/plania/sync":{"post":{"summary":"Start Plania duplex sync","tags":["Document Platform"],"description":"Start a duplex Plania sync (reconcile -> import -> export) as a Temporal workflow. The sync runs on the integration-sync-worker and survives browser closes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filter":{"type":"object","properties":{"type":{"type":"string","enum":["all","filtered"]},"buildingCategories":{"type":"array","items":{"type":"string"}},"folderIds":{"type":"array","items":{"type":"string"}},"fileArchiveCategories":{"type":"array","items":{"type":"string"}}}}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/plania/sync-status":{"get":{"summary":"Get Plania sync progress","tags":["Document Platform"],"description":"Query the progress of a running Plania duplex sync workflow.","parameters":[{"schema":{"type":"string"},"in":"query","name":"workflowId","required":false},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/plania/cancel-sync":{"post":{"summary":"Cancel Plania sync","tags":["Document Platform"],"description":"Cancel a running Plania duplex sync workflow. The current batch will finish before stopping.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["workflowId"],"properties":{"workflowId":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/plania/test-connection":{"post":{"summary":"Test Plania API connection","tags":["Document Platform"],"description":"Test connection to Plania API with configured credentials","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/plania":{"get":{"summary":"Get Plania buildings","tags":["Document Platform"],"description":"Get list of buildings from Plania for selection","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/plania":{"get":{"summary":"Get Plania buildings for a building integration","tags":["Document Platform"],"description":"Retrieve Plania buildings for a concrete Findable building picker","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/plania/building-links":{"get":{"summary":"Report Plania ↔ Findable building links","tags":["Document Platform"],"description":"Dry-run mapping report between the customer's Plania buildings and Findable buildings: already linked, suggested links (by name), new Plania buildings to auto-create, stale Findable links, and ambiguous matches needing a manual decision. Returns an empty report if Plania credentials are not configured.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/plania/building-links/apply":{"post":{"summary":"Apply Plania ↔ Findable building links","tags":["Document Platform"],"description":"Link existing Findable buildings to Plania (set planiaBuildingId) and/or auto-create Findable buildings for new Plania buildings. Per-item failures are reported in the response. Pass {\"dryRun\": true} to preview without mutating any building.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"links":{"type":"array","items":{"type":"object","required":["findableBuildingId","planiaBuildingId"],"properties":{"findableBuildingId":{"type":"string"},"planiaBuildingId":{"type":"string"}}}},"autoCreate":{"type":"array","items":{"type":"object","required":["planiaBuildingId","name"],"properties":{"planiaBuildingId":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"}}}},"dryRun":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/plania/documents/{documentId}/links":{"get":{"summary":"Get document entity links","tags":["Document Platform"],"description":"Get all entity links for a document synced to Plania","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"patch":{"summary":"Relink document to different entity","tags":["Document Platform"],"description":"Remove link from current entity and create link to new entity in Plania","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fromEntityGuid":{"type":"string"},"toEntity":{"type":"object","properties":{"EntityType":{"type":"string","enum":["Equipment","Building"]},"Guid":{"type":"string"}},"required":["EntityType","Guid"]}},"required":["fromEntityGuid","toEntity"]}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/plania/documents/{documentId}/links/{entityGuid}":{"delete":{"summary":"Unlink document from entity","tags":["Document Platform"],"description":"Remove the link between a document and an entity in Plania","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"documentId","required":true},{"schema":{"type":"string"},"in":"path","name":"entityGuid","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/plania/documents/{documentId}":{"delete":{"summary":"Delete document from Plania","tags":["Document Platform"],"description":"Remove all entity links and delete the document from Plania entirely","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/plania/prepare-resync":{"post":{"summary":"Prepare Plania resync","tags":["Document Platform"],"description":"Identify synced documents with metadata changes that need to be resynced to Plania","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Conflict - the resource is busy or in a conflicting state.","content":{"application/json":{"schema":{"description":"Conflict - the resource is busy or in a conflicting state.","type":"object","properties":{"error":{"type":"string","enum":["ConflictError","CustomerDeletingConflictError","MutationLeaseConflictError","LastOwnerError","DuplicateCompanyNameError","folder_not_empty"]},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}},"503":{"description":"Service Unavailable - a downstream dependency is degraded.","content":{"application/json":{"schema":{"description":"Service Unavailable - a downstream dependency is degraded.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/plania/resync-batch":{"post":{"summary":"Resync document batch to Plania","tags":["Document Platform"],"description":"Update equipment links and metadata for synced documents with changed metadata","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":100}},"required":["documentIds"]}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Conflict - the resource is busy or in a conflicting state.","content":{"application/json":{"schema":{"description":"Conflict - the resource is busy or in a conflicting state.","type":"object","properties":{"error":{"type":"string","enum":["ConflictError","CustomerDeletingConflictError","MutationLeaseConflictError","LastOwnerError","DuplicateCompanyNameError","folder_not_empty"]},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}},"503":{"description":"Service Unavailable - a downstream dependency is degraded.","content":{"application/json":{"schema":{"description":"Service Unavailable - a downstream dependency is degraded.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/plania/prepare-workorder-metadata":{"post":{"summary":"Preview Plania work-order metadata writeback","tags":["Document Platform"],"description":"Dry-run: list synced work-order-linked documents whose Norwegian AI-filename metadata would be written back to Plania. Makes no changes and never touches documentXEntity links.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Conflict - the resource is busy or in a conflicting state.","content":{"application/json":{"schema":{"description":"Conflict - the resource is busy or in a conflicting state.","type":"object","properties":{"error":{"type":"string","enum":["ConflictError","CustomerDeletingConflictError","MutationLeaseConflictError","LastOwnerError","DuplicateCompanyNameError","folder_not_empty"]},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}},"503":{"description":"Service Unavailable - a downstream dependency is degraded.","content":{"application/json":{"schema":{"description":"Service Unavailable - a downstream dependency is degraded.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/plania/resync-workorder-metadata":{"post":{"summary":"Write back Plania work-order metadata","tags":["Document Platform"],"description":"Metadata-only writeback of the Norwegian AI filename (plus original FilePath and summary Note) to synced work-order-linked Plania documents. Never touches documentXEntity links, Description, or Filename.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Conflict - the resource is busy or in a conflicting state.","content":{"application/json":{"schema":{"description":"Conflict - the resource is busy or in a conflicting state.","type":"object","properties":{"error":{"type":"string","enum":["ConflictError","CustomerDeletingConflictError","MutationLeaseConflictError","LastOwnerError","DuplicateCompanyNameError","folder_not_empty"]},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}},"503":{"description":"Service Unavailable - a downstream dependency is degraded.","content":{"application/json":{"schema":{"description":"Service Unavailable - a downstream dependency is degraded.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/plania/backfill-ai-filename":{"post":{"summary":"Backfill Plania AI-filename metadata","tags":["Document Platform"],"description":"Force-write the Norwegian AI filename (plus original FilePath and summary Note) to the Text02 custom field for already-synced, non-work-order documents. Repairs documents uploaded before Text02 was written on first upload. Metadata-only and idempotent. Pass {\"dryRun\": true} to preview.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dryRun":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Conflict - the resource is busy or in a conflicting state.","content":{"application/json":{"schema":{"description":"Conflict - the resource is busy or in a conflicting state.","type":"object","properties":{"error":{"type":"string","enum":["ConflictError","CustomerDeletingConflictError","MutationLeaseConflictError","LastOwnerError","DuplicateCompanyNameError","folder_not_empty"]},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}},"503":{"description":"Service Unavailable - a downstream dependency is degraded.","content":{"application/json":{"schema":{"description":"Service Unavailable - a downstream dependency is degraded.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/plania/ensure-building-links":{"post":{"summary":"Ensure Plania building links","tags":["Document Platform"],"description":"Guarantee every synced, non-work-order document is linked to its building in Plania. Creates a building link only for documents that have none. Idempotent and additive — never touches equipment links, Description, or Filename. Pass {\"dryRun\": true} to preview.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dryRun":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Conflict - the resource is busy or in a conflicting state.","content":{"application/json":{"schema":{"description":"Conflict - the resource is busy or in a conflicting state.","type":"object","properties":{"error":{"type":"string","enum":["ConflictError","CustomerDeletingConflictError","MutationLeaseConflictError","LastOwnerError","DuplicateCompanyNameError","folder_not_empty"]},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}},"503":{"description":"Service Unavailable - a downstream dependency is degraded.","content":{"application/json":{"schema":{"description":"Service Unavailable - a downstream dependency is degraded.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/plania/resync-all":{"post":{"summary":"Resync all documents to Plania","tags":["Document Platform"],"description":"Bulk resync all synced documents with equipment auto-creation. Pre-creates missing equipment, updates links, and backfills sync snapshots. Automatically retries equipment linking for docs with category but missing equipment GUID. Use batchSize and offset params for paginated processing.","parameters":[{"schema":{"type":"string"},"in":"query","name":"batchSize","required":false,"description":"Maximum documents per request (default: all). Use for paginated processing."},{"schema":{"type":"string"},"in":"query","name":"offset","required":false,"description":"Document offset for pagination (default: 0)"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Conflict - the resource is busy or in a conflicting state.","content":{"application/json":{"schema":{"description":"Conflict - the resource is busy or in a conflicting state.","type":"object","properties":{"error":{"type":"string","enum":["ConflictError","CustomerDeletingConflictError","MutationLeaseConflictError","LastOwnerError","DuplicateCompanyNameError","folder_not_empty"]},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}},"503":{"description":"Service Unavailable - a downstream dependency is degraded.","content":{"application/json":{"schema":{"description":"Service Unavailable - a downstream dependency is degraded.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/plania/reset-sync":{"post":{"summary":"Reset Plania sync for building","tags":["Document Platform"],"description":"Delete all synced documents from Plania and clear local sync state, allowing fresh sync","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Conflict - the resource is busy or in a conflicting state.","content":{"application/json":{"schema":{"description":"Conflict - the resource is busy or in a conflicting state.","type":"object","properties":{"error":{"type":"string","enum":["ConflictError","CustomerDeletingConflictError","MutationLeaseConflictError","LastOwnerError","DuplicateCompanyNameError","folder_not_empty"]},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}},"503":{"description":"Service Unavailable - a downstream dependency is degraded.","content":{"application/json":{"schema":{"description":"Service Unavailable - a downstream dependency is degraded.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/plania/prepare-reconcile":{"post":{"summary":"Prepare Plania sync reconciliation","tags":["Document Platform"],"description":"Scan Plania for documents linked to the building, match to Findable documents by filename, and return results without making changes","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Conflict - the resource is busy or in a conflicting state.","content":{"application/json":{"schema":{"description":"Conflict - the resource is busy or in a conflicting state.","type":"object","properties":{"error":{"type":"string","enum":["ConflictError","CustomerDeletingConflictError","MutationLeaseConflictError","LastOwnerError","DuplicateCompanyNameError","folder_not_empty"]},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}},"503":{"description":"Service Unavailable - a downstream dependency is degraded.","content":{"application/json":{"schema":{"description":"Service Unavailable - a downstream dependency is degraded.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/plania/apply-reconcile":{"post":{"summary":"Apply Plania sync reconciliation","tags":["Document Platform"],"description":"Restore local planiaUpload metadata for matched documents without re-uploading to Plania","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"matches":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid"},"planiaDocumentId":{"type":"string"}},"required":["documentId","planiaDocumentId"]},"minItems":1,"maxItems":5000}},"required":["matches"]}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Conflict - the resource is busy or in a conflicting state.","content":{"application/json":{"schema":{"description":"Conflict - the resource is busy or in a conflicting state.","type":"object","properties":{"error":{"type":"string","enum":["ConflictError","CustomerDeletingConflictError","MutationLeaseConflictError","LastOwnerError","DuplicateCompanyNameError","folder_not_empty"]},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}},"503":{"description":"Service Unavailable - a downstream dependency is degraded.","content":{"application/json":{"schema":{"description":"Service Unavailable - a downstream dependency is degraded.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/sync-history/{integrationType}":{"get":{"summary":"Get sync history for an integration","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"post":{"summary":"Record a sync start","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"totalDocuments":{"type":"integer","minimum":0},"triggeredBy":{"type":"string","enum":["manual","scheduled"]}},"required":["totalDocuments","triggeredBy"]}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/sync-history/{integrationType}/{syncId}":{"patch":{"summary":"Update sync completion","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["in_progress","completed","failed","cancelled"]},"successfulDocuments":{"type":"number"},"failedDocuments":{"type":"number"},"errorSummary":{"type":"string"},"skippedDocuments":{"type":"number"},"totalDocuments":{"type":"number"}},"required":["status","successfulDocuments","failedDocuments"]}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"syncId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/failed-documents/{integrationType}":{"get":{"summary":"Get failed documents for an integration","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/failed-documents/{integrationType}/retry":{"post":{"summary":"Retry failed documents by clearing errors","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string"},"maxItems":100}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/sync-exclusions":{"get":{"summary":"Get building sync exclusions","tags":["Document Platform"],"description":"Per-building denylist of building categories / folders excluded from an integration sync.","parameters":[{"schema":{"type":"string","enum":["plania","interaxo","famac","dalux"]},"in":"query","name":"integrationType","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"put":{"summary":"Update building sync exclusions","tags":["Document Platform"],"description":"Persist the per-building denylist for one integration type. Empty arrays mean exclude nothing.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["integrationType","exclusions"],"properties":{"integrationType":{"type":"string","enum":["plania","interaxo","famac","dalux"]},"exclusions":{"type":"object","additionalProperties":false,"properties":{"buildingCategories":{"type":"array","items":{"type":"string"}},"folderIds":{"type":"array","items":{"type":"string"}},"fileArchiveCategories":{"type":"array","items":{"type":"string"}}}}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/interaxo-reconcile":{"get":{"summary":"Get building Interaxo reconcile config","tags":["Document Platform"],"description":"Per-building opt-in that makes Interaxo sync mirror the connected room (soft-deletes docs removed upstream). Defaults to disabled.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"put":{"summary":"Update building Interaxo reconcile config","tags":["Document Platform"],"description":"Enable or disable room mirroring for a building, with optional removal-threshold caps. `enabled: false` turns mirroring off.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["enabled"],"properties":{"enabled":{"type":"boolean"},"maxRemovalCount":{"type":"integer","minimum":1},"maxRemovalPct":{"type":"number","minimum":0,"maximum":100}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/integrations/{integrationId}/context":{"get":{"summary":"Get building integration context","tags":["Document Platform"],"description":"Return non-secret organisation connection and building eligibility context for an integration","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","enum":["famac","dalux","plania","interaxo","sharepoint","google-drive","dalux-box"]},"in":"path","name":"integrationId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/systems":{"get":{"summary":"List building systems","tags":["Document Platform"],"description":"Retrieve all classified systems in a building, enriched with category names, task counts, and documentation coverage","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":500},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"nextToken","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"categoryCode":{"type":"string"},"serialNumber":{"nullable":true,"type":"string"},"fullCode":{"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"location":{"nullable":true,"type":"string"},"famacSystemId":{"nullable":true,"type":"string"},"famacLastSyncAt":{"nullable":true,"type":"string"},"documentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"isDeleted":{"type":"boolean"},"isDeleting":{"type":"boolean"},"deletedAt":{"nullable":true,"type":"string"},"deletedBy":{"nullable":true,"type":"string"},"createdAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"createdBy":{"type":"string"},"createdByEmail":{"type":"string"},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"updatedBy":{"type":"string"},"updatedByEmail":{"type":"string"},"writeAccessCustomer":{"nullable":true,"type":"string"},"readAccessCustomer":{"nullable":true,"type":"string"},"writeAccessBuilding":{"nullable":true,"type":"string"},"readAccessBuilding":{"nullable":true,"type":"string"},"categoryName":{"type":"string"},"categoryNameEn":{"type":"string"},"taskCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"coverage":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"string","enum":["attestation","description","image","user_manual","operation","identification","compliance","product_info","protocol","drawing","maintenance","other"]}}},"required":["groups"],"additionalProperties":false},"taskSummary":{"type":"object","properties":{"open":{"type":"integer","minimum":0,"maximum":9007199254740991},"overdue":{"type":"integer","minimum":0,"maximum":9007199254740991},"routines":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["open","overdue","routines"],"additionalProperties":false},"drawingCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastActivityAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"systemTotals":{"type":"object","properties":{"documentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"drawingCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"coverage":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"string","enum":["attestation","description","image","user_manual","operation","identification","compliance","product_info","protocol","drawing","maintenance","other"]}}},"required":["groups"],"additionalProperties":false}},"required":["documentCount","drawingCount","coverage"],"additionalProperties":false}},"required":["id","customerId","buildingId","categoryCode","serialNumber","fullCode","taskCount","coverage"],"additionalProperties":false}},"nextToken":{"nullable":true,"type":"string"},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"post":{"summary":"Create system","tags":["Document Platform"],"description":"Create a new NS-3451 classified system in a building","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"categoryCode":{"type":"string","minLength":1,"maxLength":4,"pattern":"^(?:[1-7]\\d{0,2}|[2-7]\\d{3})$"},"serialNumber":{"nullable":true},"name":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":1000},"location":{"type":"string","maxLength":200}},"required":["categoryCode"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/systems/from-documents":{"post":{"summary":"Create systems from documents","tags":["Document Platform"],"description":"Scan all documents in a building and create System entities for any documents that have a category and serial number set","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fullCode":{"type":"string"},"categoryCode":{"type":"string"},"serialNumber":{"type":"string"},"categoryName":{"type":"string","nullable":true},"categoryNameEn":{"type":"string","nullable":true}}}},"existing":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fullCode":{"type":"string"},"categoryCode":{"type":"string"},"serialNumber":{"type":"string"},"categoryName":{"type":"string","nullable":true},"categoryNameEn":{"type":"string","nullable":true}}}},"errors":{"type":"array","items":{"type":"object","properties":{"fullCode":{"type":"string"},"error":{"type":"string"}}}},"skipped":{"type":"integer"},"totalDocuments":{"type":"integer"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/systems/next-serial":{"get":{"summary":"Get next serial number","tags":["Document Platform"],"description":"Get the next available serial number for a category in a building","parameters":[{"schema":{"type":"string"},"in":"query","name":"categoryCode","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"nextSerialNumber":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/systems/{systemId}":{"get":{"summary":"Get system details","tags":["Document Platform"],"description":"Retrieve details of a specific building system","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"systemId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"categoryCode":{"type":"string"},"serialNumber":{"nullable":true,"type":"string"},"fullCode":{"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"location":{"nullable":true,"type":"string"},"famacSystemId":{"nullable":true,"type":"string"},"famacLastSyncAt":{"nullable":true,"type":"string"},"documentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"isDeleted":{"type":"boolean"},"isDeleting":{"type":"boolean"},"deletedAt":{"nullable":true,"type":"string"},"deletedBy":{"nullable":true,"type":"string"},"createdAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"createdBy":{"type":"string"},"createdByEmail":{"type":"string"},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"updatedBy":{"type":"string"},"updatedByEmail":{"type":"string"},"writeAccessCustomer":{"nullable":true,"type":"string"},"readAccessCustomer":{"nullable":true,"type":"string"},"writeAccessBuilding":{"nullable":true,"type":"string"},"readAccessBuilding":{"nullable":true,"type":"string"},"categoryName":{"type":"string"},"categoryNameEn":{"type":"string"},"taskCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"taskSummary":{"type":"object","properties":{"open":{"type":"integer","minimum":0,"maximum":9007199254740991},"overdue":{"type":"integer","minimum":0,"maximum":9007199254740991},"routines":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["open","overdue","routines"],"additionalProperties":false},"drawingCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastActivityAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"unitCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"coverage":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"string","enum":["attestation","description","image","user_manual","operation","identification","compliance","product_info","protocol","drawing","maintenance","other"]}},"groupCounts":{"type":"object","properties":{"attestation":{"type":"integer","minimum":0,"maximum":9007199254740991},"description":{"type":"integer","minimum":0,"maximum":9007199254740991},"image":{"type":"integer","minimum":0,"maximum":9007199254740991},"user_manual":{"type":"integer","minimum":0,"maximum":9007199254740991},"operation":{"type":"integer","minimum":0,"maximum":9007199254740991},"identification":{"type":"integer","minimum":0,"maximum":9007199254740991},"compliance":{"type":"integer","minimum":0,"maximum":9007199254740991},"product_info":{"type":"integer","minimum":0,"maximum":9007199254740991},"protocol":{"type":"integer","minimum":0,"maximum":9007199254740991},"drawing":{"type":"integer","minimum":0,"maximum":9007199254740991},"maintenance":{"type":"integer","minimum":0,"maximum":9007199254740991},"other":{"type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false}},"required":["groups"],"additionalProperties":false}},"required":["id","customerId","buildingId","categoryCode","serialNumber","fullCode"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"patch":{"summary":"Update system","tags":["Document Platform"],"description":"Update metadata of a building system","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"nullable":true},"description":{"type":"string","maxLength":1000,"nullable":true},"location":{"type":"string","maxLength":200,"nullable":true}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"systemId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Delete system","tags":["Document Platform"],"description":"Soft delete a building system and remove it from every document and task that referenced it. A document whose primary code named a serialised system keeps its building category but loses its serial number. Deleting a bare-category system clears that category from its documents.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"systemId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"documentsUnlinked":{"type":"integer"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"System references could not be drained; retry deletion","content":{"application/json":{"schema":{"description":"System references could not be drained; retry deletion","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/systems/{systemId}/documents":{"get":{"summary":"Get system documents","tags":["Document Platform"],"description":"Retrieve all documents linked to a specific building system","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"systemId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"buildingId":{"type":"string"},"buildingCategory":{"type":"string","nullable":true},"serialNumber":{"type":"string","nullable":true},"size":{"type":"integer"},"pageCount":{"type":"integer","nullable":true},"previewUrl":{"type":"string","nullable":true},"filenameSuggestion":{"type":"string","nullable":true},"filenameSuggestions":{"type":"object","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"isDrawing":{},"drawingNumber":{"type":"string","nullable":true},"drawingTitle":{"type":"string","nullable":true},"drawingType":{"type":"string","nullable":true},"drawingSystemCode":{"type":"string","nullable":true},"drawingRevision":{"type":"string","nullable":true},"discipline":{"type":"string","nullable":true},"floor":{"type":"string","nullable":true},"informationType":{"type":"string","nullable":true},"informationTypes":{"type":"array","nullable":true,"items":{"type":"string"}},"systems":{"type":"array","nullable":true,"items":{"type":"string"}},"updatedBy":{"type":"string","nullable":true},"uploadedBy":{"type":"string","nullable":true}}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/systems/{systemId}/tasks":{"get":{"summary":"Get system tasks","tags":["Document Platform"],"description":"Retrieve all tasks linked to a specific building system","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"systemId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"customerId":{"type":"string"},"buildingId":{"type":"string"},"systemId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string"},"deadline":{"type":"string"},"category":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"completedAt":{"type":"string"},"rrule":{"type":"string","nullable":true},"dtstart":{"type":"string","nullable":true},"routineId":{"type":"string"},"parentRoutineId":{"type":"string","nullable":true},"isRoutineException":{}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/image":{"post":{"summary":"Get presigned URL for building image upload","tags":["Document Platform"],"description":"Generate a presigned S3 URL for uploading a building image","parameters":[{"schema":{"type":"string","enum":["jpg","jpeg","png","svg","webp","gif","avif","bmp","tif","tiff","heic"]},"in":"query","name":"fileExtension","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"get":{"summary":"Get building image URL","tags":["Document Platform"],"description":"Retrieve the signed URL for a building's uploaded image","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Delete building image","tags":["Document Platform"],"description":"Delete the uploaded image for a building","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/image/base64":{"get":{"summary":"Get building image as base64","tags":["Document Platform"],"description":"Retrieve the building's uploaded image as a base64 data URL","parameters":[{"schema":{"type":"boolean"},"in":"query","name":"compress","required":false,"description":"Whether to compress the image before base64 conversion. Recommended for large images used in PDFs."},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Building image as base64 data URL","content":{"application/json":{"schema":{"description":"Building image as base64 data URL","type":"object","properties":{"base64":{"type":"string","nullable":true,"description":"Base64 encoded image data URL, or undefined if no image exists"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/images":{"get":{"summary":"Get building images","tags":["Document Platform"],"description":"Retrieve signed URLs for all building images that the user has access to","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/categories/count":{"get":{"summary":"Get building categories with document counts","tags":["Document Platform"],"description":"Retrieve the count of documents grouped by building category for a specific building","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"categoryCount":{"type":"object","additionalProperties":{"type":"integer"}},"unsortedCount":{"type":"integer"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/categories/documents":{"post":{"summary":"Get documents from multiple building categories","tags":["Document Platform"],"description":"Retrieve all documents from the specified building categories (deduplicated)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["categories"],"properties":{"categories":{"type":"array","items":{"type":"string"},"minItems":1}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/processing-count":{"get":{"summary":"Get processing documents count","tags":["Document Platform"],"description":"Get the number of documents currently being processed for a building","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/count":{"get":{"summary":"Get total documents count","tags":["Document Platform"],"description":"Get the total number of documents for a building","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/summary":{"get":{"summary":"Get building documents summary","tags":["Document Platform"],"description":"Get a summary of document counts for a building: total documents and drawings count.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["totalDocuments","drawings"],"properties":{"totalDocuments":{"type":"integer","minimum":0},"drawings":{"type":"integer","minimum":0}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/reconcile-document-count":{"post":{"summary":"Reconcile document count","tags":["Document Platform"],"description":"Reconcile the cached document count with actual document count for a building. Requires admin access.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/email-slugs":{"post":{"summary":"Add email slug to building","tags":["Document Platform"],"description":"Add a new email slug to a building for per-building document inbox","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["slug"],"properties":{"slug":{"type":"string","minLength":2,"maxLength":50,"pattern":"^[a-z0-9_-]+$"}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/email-slugs/{slug}":{"delete":{"summary":"Remove email slug from building","tags":["Document Platform"],"description":"Remove an old email slug from a building","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","minLength":2,"maxLength":50,"pattern":"^[a-z0-9_-]+$"},"in":"path","name":"slug","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/zip-uploads":{"post":{"summary":"Add zip upload to building","tags":["Document Platform"],"description":"Add a zip file upload to a building for batch document processing","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["zipUpload"],"properties":{"zipUpload":{"type":"object","required":["s3Key","time","filename"],"properties":{"s3Key":{"type":"string"},"time":{"type":"string"},"filename":{"type":"string"}}}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Remove zip upload entry","tags":["Document Platform"],"description":"Removes a zip upload entry from the building. Only entries whose file no longer exists in S3 can be removed.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"s3Key","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/zip":{"post":{"summary":"Start zip generation","tags":["Document Platform"],"description":"Initiate zip file generation for all documents in a building","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupBy":{"type":"string","enum":["folder_structure","building_category"]},"locale":{"type":"string","enum":["en","no","fr"],"description":"Locale for folder names in the generated zip"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"get":{"summary":"Get generated zip","tags":["Document Platform"],"description":"Retrieve the generated zip file for a building","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/zip-uploads/status":{"get":{"summary":"Get zip uploads with storage status","tags":["Document Platform"],"description":"Returns all zip uploads for a building with their current S3 storage status (available, archived, restoring, not_found)","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/zip-uploads/download":{"get":{"summary":"Get download URL for a specific zip upload","tags":["Document Platform"],"description":"Returns a fresh presigned download URL for a specific zip upload, or its current storage status if not available","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"s3Key","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/zip-uploads/restore":{"post":{"summary":"Initiate zip restore from Glacier","tags":["Document Platform"],"description":"Starts a Glacier restore for an archived zip file. User will receive an email when the restore is complete.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["s3Key"],"properties":{"s3Key":{"type":"string"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/zip/status":{"get":{"summary":"Get zip generation status","tags":["Document Platform"],"description":"Check the status of zip generation for a building","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}":{"get":{"summary":"Get building details","tags":["Document Platform"],"description":"Retrieve detailed information for a specific building","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"put":{"summary":"Update building","tags":["Document Platform"],"description":"Update an existing building's information","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Delete building","tags":["Document Platform"],"description":"Permanently delete a building and all associated data","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/":{"post":{"summary":"Create new building","tags":["Document Platform"],"description":"Create a new building for a customer","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"get":{"summary":"Get all buildings for customer","tags":["Document Platform"],"description":"Retrieve all buildings for a customer, filtered by user access permissions","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/stats":{"get":{"summary":"Get building stats","tags":["Document Platform"],"description":"Lightweight building statistics including AI-ready document count, processing count, and failed count","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/favorites":{"get":{"summary":"Get favorite buildings","tags":["Document Platform"],"description":"Retrieve all favorite buildings for a user","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"query","name":"userId","required":true},{"schema":{"type":"string"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/favorites":{"post":{"summary":"Add building to favorites","tags":["Document Platform"],"description":"Add a building to a user's favorites list","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"query","name":"userId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Remove building from favorites","tags":["Document Platform"],"description":"Remove a building from a user's favorites list","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"query","name":"userId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/view-prefs":{"get":{"summary":"Get saved views","tags":["Document Platform"],"description":"Retrieve the current user's saved Documents & Drawings views for a building","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"put":{"summary":"Save views","tags":["Document Platform"],"description":"Create or replace the current user's saved Documents & Drawings views for a building","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/view-prefs/apply-to-all":{"put":{"summary":"Apply saved views to all buildings","tags":["Document Platform"],"description":"Make the posted views the current user's default for every building they haven't customized since","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/view-prefs/shared":{"get":{"summary":"Get shared views","tags":["Document Platform"],"description":"Retrieve the Documents & Drawings views shared with everyone in this building or organization","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"put":{"summary":"Share a view","tags":["Document Platform"],"description":"Share a Documents & Drawings view with everyone in this building or in the organization","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Stop sharing a view","tags":["Document Platform"],"description":"Remove a shared Documents & Drawings view from a building or organization","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/task-view-prefs":{"get":{"summary":"Get task view tabs","tags":["Document Platform"],"description":"Retrieve the current user's Tasks & Routines view tabs for a building","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"put":{"summary":"Save task view tabs","tags":["Document Platform"],"description":"Create or replace the current user's Tasks & Routines view tabs for a building","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/task-view-prefs/apply-to-all":{"put":{"summary":"Apply task view tabs to all buildings","tags":["Document Platform"],"description":"Make the posted tabs the current user's default for every building they haven't customized since","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/task-view-prefs/shared":{"get":{"summary":"Get shared task view tabs","tags":["Document Platform"],"description":"Retrieve the Tasks & Routines tabs shared with everyone in this building or organization","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"put":{"summary":"Share a task view tab","tags":["Document Platform"],"description":"Share a Tasks & Routines tab with everyone in this building or in the organization","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Stop sharing a task view tab","tags":["Document Platform"],"description":"Remove a shared Tasks & Routines tab from a building or organization","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/my-features":{"get":{"summary":"Get my building features","tags":["Document Platform"],"description":"Get the current user's active features for a building","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"features":{"type":"array","items":{"type":"string"},"description":"List of feature names the user has (e.g., can_view_tasks, can_edit_tasks)"}},"required":["features"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/health/tasks/summary":{"get":{"summary":"Get tasks summary for a building","tags":["Document Platform","Building Health"],"description":"Retrieve aggregated task metrics including due this week, overdue, and upcoming items","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"dueThisWeek":{"type":"integer","minimum":0,"maximum":9007199254740991},"overdue":{"type":"integer","minimum":0,"maximum":9007199254740991},"completedThisWeek":{"type":"integer","minimum":0,"maximum":9007199254740991},"upcomingItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"dueDate":{"nullable":true,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH","URGENT"]}},"required":["id","title","dueDate","priority"],"additionalProperties":false}},"routines":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"dueThisWeek":{"type":"integer","minimum":0,"maximum":9007199254740991},"overdue":{"type":"integer","minimum":0,"maximum":9007199254740991},"completedThisWeek":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","dueThisWeek","overdue","completedThisWeek"],"additionalProperties":false}},"required":["total","dueThisWeek","overdue","completedThisWeek","upcomingItems","routines"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/{buildingId}/health/checklists/summary":{"get":{"summary":"Get checklists summary for a building","tags":["Document Platform","Building Health"],"description":"Retrieve aggregated checklist metrics including active count, completion percentage, and pending items","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"activeCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalItems":{"type":"integer","minimum":0,"maximum":9007199254740991},"completedItems":{"type":"integer","minimum":0,"maximum":9007199254740991},"completionPercentage":{"type":"integer","minimum":0,"maximum":100},"pendingItems":{"type":"array","items":{"type":"object","properties":{"checklistId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"checklistName":{"type":"string"},"itemId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"itemName":{"type":"string"},"dueDate":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["checklistId","checklistName","itemId","itemName"],"additionalProperties":false}}},"required":["activeCount","totalItems","completedItems","completionPercentage","pendingItems"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/{buildingId}/health/deficiencies/summary":{"get":{"summary":"Get deficiencies summary for a building","tags":["Document Platform","Building Health"],"description":"Retrieve aggregated deficiency metrics including open count, critical count, and recent items","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"openCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"criticalCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"resolvedThisMonth":{"type":"integer","minimum":0,"maximum":9007199254740991},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"severity":{"type":"string","enum":["critical","major","minor"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["id","title","severity","createdAt"],"additionalProperties":false}}},"required":["openCount","criticalCount","resolvedThisMonth","items"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/{buildingId}/health/activity/summary":{"get":{"summary":"Get activity summary for a building","tags":["Document Platform","Building Health"],"description":"Retrieve aggregated activity metrics including uploads today, this week, and recent activity","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"uploadsToday":{"type":"integer","minimum":0,"maximum":9007199254740991},"uploadsThisWeek":{"type":"integer","minimum":0,"maximum":9007199254740991},"activeUsersThisWeek":{"type":"integer","minimum":0,"maximum":9007199254740991},"recentActivity":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["upload","edit","share","comment"]},"userId":{"type":"string"},"userName":{"type":"string"},"timestamp":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"description":{"type":"string"}},"required":["type","userId","userName","timestamp","description"],"additionalProperties":false}}},"required":["uploadsToday","uploadsThisWeek","activeUsersThisWeek","recentActivity"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/{buildingId}/classification-progress":{"get":{"summary":"Get classification progress for a building","tags":["Document Platform"],"description":"Retrieve the current AI classification progress for all documents in a building","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"buildingId":{"type":"string"},"status":{"type":"string","enum":["not_started","processing","completed","failed"]},"totalDocuments":{"type":"number"},"processedDocuments":{"type":"number"},"failedDocuments":{"type":"number"},"percentage":{"type":"number","minimum":0,"maximum":100},"startedAt":{"nullable":true,"type":"string"},"completedAt":{"nullable":true,"type":"string"},"requestedByEmail":{"type":"string"}},"required":["buildingId","status","totalDocuments","processedDocuments","failedDocuments","percentage","startedAt","completedAt"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/family-dataset":{"get":{"summary":"Get a signed URL for the building's family (matters) dataset","tags":["Document Platform"],"description":"The generated document-family dataset of a building, served as a short-lived signed URL to a private object. 404 when the building has no dataset.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string"}},"required":["url","expiresAt"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/billing-info":{"get":{"summary":"Get invoice info for a building","tags":["Document Platform"],"description":"Resolves the invoice details the building bills under (via its contract, or the account fallback) and whether the caller may edit them.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"access":{"type":"string","enum":["editable","read-only-shared","read-only-account","read-only-bill-to","unavailable"]},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contractId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"invoiceInfo":{"nullable":true,"type":"object","properties":{"companyName":{"nullable":true,"type":"string","maxLength":200},"organizationNumber":{"nullable":true,"type":"string","maxLength":50},"vatNumber":{"nullable":true,"type":"string","maxLength":50},"invoiceEmail":{"nullable":true,"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"ehfAddress":{"nullable":true,"type":"string","maxLength":50},"invoiceReference":{"nullable":true,"type":"string","maxLength":100},"invoiceStreet":{"nullable":true,"type":"string","maxLength":200},"invoiceCity":{"nullable":true,"type":"string","maxLength":100},"invoicePostalCode":{"nullable":true,"type":"string","maxLength":20},"invoiceCountry":{"nullable":true,"type":"string","maxLength":100}},"additionalProperties":false},"contractBuildingCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"unreachableBuildingCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"canEditViewedBuilding":{"type":"boolean"},"accountContractCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["access","customerId","contractId","invoiceInfo","contractBuildingCount","unreachableBuildingCount","canEditViewedBuilding","accountContractCount"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"put":{"summary":"Update invoice info through a building","tags":["Document Platform"],"description":"Writes the invoice details onto the contract this building bills under. Refused unless the caller can edit every building covered by that contract.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"invoiceInfo":{"type":"object","properties":{"companyName":{"nullable":true,"type":"string","maxLength":200},"organizationNumber":{"nullable":true,"type":"string","maxLength":50},"vatNumber":{"nullable":true,"type":"string","maxLength":50},"invoiceEmail":{"nullable":true,"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"ehfAddress":{"nullable":true,"type":"string","maxLength":50},"invoiceReference":{"nullable":true,"type":"string","maxLength":100},"invoiceStreet":{"nullable":true,"type":"string","maxLength":200},"invoiceCity":{"nullable":true,"type":"string","maxLength":100},"invoicePostalCode":{"nullable":true,"type":"string","maxLength":20},"invoiceCountry":{"nullable":true,"type":"string","maxLength":100}},"additionalProperties":false}},"required":["invoiceInfo"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"access":{"type":"string","enum":["editable","read-only-shared","read-only-account","read-only-bill-to","unavailable"]},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contractId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"invoiceInfo":{"nullable":true,"type":"object","properties":{"companyName":{"nullable":true,"type":"string","maxLength":200},"organizationNumber":{"nullable":true,"type":"string","maxLength":50},"vatNumber":{"nullable":true,"type":"string","maxLength":50},"invoiceEmail":{"nullable":true,"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"ehfAddress":{"nullable":true,"type":"string","maxLength":50},"invoiceReference":{"nullable":true,"type":"string","maxLength":100},"invoiceStreet":{"nullable":true,"type":"string","maxLength":200},"invoiceCity":{"nullable":true,"type":"string","maxLength":100},"invoicePostalCode":{"nullable":true,"type":"string","maxLength":20},"invoiceCountry":{"nullable":true,"type":"string","maxLength":100}},"additionalProperties":false},"contractBuildingCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"unreachableBuildingCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"canEditViewedBuilding":{"type":"boolean"},"accountContractCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["access","customerId","contractId","invoiceInfo","contractBuildingCount","unreachableBuildingCount","canEditViewedBuilding","accountContractCount"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/volume-usage":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"buildingId":{"type":"string"},"name":{"nullable":true,"type":"string"},"processedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"cap":{"nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"paused":{"type":"boolean"}},"required":["buildingId","name","processedCount","cap","paused"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/{buildingId}/freshness":{"get":{"summary":"Get building freshness","tags":["Document Platform"],"description":"Whether the building needs new documents, and whether to show this user the banner asking for them.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"showBanner":{"type":"boolean"},"needsDocuments":{"type":"boolean"},"reason":{"nullable":true,"type":"string","enum":["too_few_documents","stale"]},"documentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastDocumentAddedAt":{"nullable":true,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"documentStatus":{"type":"string","enum":["active","complete"]},"snoozeCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"snoozesExhausted":{"type":"boolean"},"ignoredByUser":{"type":"boolean"}},"required":["buildingId","showBanner","needsDocuments","reason","documentCount","lastDocumentAddedAt","documentStatus","snoozeCount","snoozesExhausted","ignoredByUser"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/freshness/dismiss":{"post":{"summary":"Dismiss the building freshness banner","tags":["Document Platform"],"description":"\"Remind me later\" (snooze 30, 60, then 90 days) or \"stop reminding me\", for this user only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["snooze","stop","undo-snooze","undo-stop"]}},"required":["action"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/document-status":{"put":{"summary":"Set the building document status","tags":["Document Platform"],"description":"\"complete\" = no new documents expected: no freshness nudges for anyone. \"active\" switches them back on.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentStatus":{"type":"string","enum":["active","complete"]}},"required":["documentStatus"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/agents/{kind}":{"put":{"summary":"Start an agent on a building","tags":["Document Platform"],"description":"Start an agent of this kind on the building, or update the brief of the one already there with this id. Another agent of the same kind on the building is a 409: the building is already watched.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"brief":{"type":"object","additionalProperties":{}},"activatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["id"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","enum":["building-safety-case"]},"in":"path","name":"kind","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["building-safety-case"]},"activatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"activatedBy":{"type":"string"},"brief":{"type":"object","additionalProperties":{}}},"required":["id","kind","activatedAt","activatedBy"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Stop an agent on a building","tags":["Document Platform"],"description":"Stop the building's agent of this kind. Stopping one that is not there is not an error.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","enum":["building-safety-case"]},"in":"path","name":"kind","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/safety-case/runs/latest":{"get":{"summary":"Get the latest assessment run for a building","tags":["Document Platform","Safety Case Intelligence"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"catalogVersion":{"type":"string"},"querySetVersion":{"type":"string"},"promptSetVersion":{"type":"string"},"retrievalConfigVersion":{"type":"string"},"assessmentModelId":{"type":"string"},"judgeModelId":{"type":"string"},"judgeThreshold":{"type":"number","minimum":0,"maximum":1},"corpusSnapshot":{"type":"object","properties":{"capturedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"documentVersions":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"versionId":{"type":"string"}},"required":["documentId","versionId"],"additionalProperties":false}},"chunkVersions":{"type":"array","items":{"type":"object","properties":{"chunkId":{"type":"string"},"versionId":{"type":"string"}},"required":["chunkId","versionId"],"additionalProperties":false}}},"required":["capturedAt","documentVersions","chunkVersions"],"additionalProperties":false},"startedBy":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"startedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"finishedAt":{"nullable":true,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"status":{"type":"string","enum":["running","completed","completed_with_errors","failed","cancelled","corpus_incomplete"]},"summary":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"covered":{"type":"integer","minimum":0,"maximum":9007199254740991},"lowConfidence":{"type":"integer","minimum":0,"maximum":9007199254740991},"missing":{"type":"integer","minimum":0,"maximum":9007199254740991},"requiresNarrative":{"type":"integer","minimum":0,"maximum":9007199254740991},"blocked":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"planned":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","covered","lowConfidence","missing","requiresNarrative","blocked","failed"],"additionalProperties":false},"corpusPreflight":{"nullable":true,"type":"object","properties":{"enabled":{"type":"boolean"},"enforced":{"type":"boolean"},"wouldBlock":{"type":"boolean"},"blocked":{"type":"boolean"},"inventoryCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"chunkIndexedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"manifestCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"accountedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"unaccountedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"zeroTextCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"blankMetadataCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"accountedCoverage":{"type":"number","minimum":0,"maximum":1},"minimumCoverage":{"type":"number","minimum":0,"maximum":1},"maxUnaccountedDocuments":{"type":"integer","minimum":0,"maximum":9007199254740991},"reasonCodes":{"type":"array","items":{"type":"string","enum":["inventory_empty","zero_accounted_documents","accounted_coverage_below_minimum","unaccounted_documents_above_ceiling"]}}},"required":["enabled","enforced","wouldBlock","blocked","inventoryCount","chunkIndexedCount","manifestCount","accountedCount","unaccountedCount","zeroTextCount","blankMetadataCount","accountedCoverage","minimumCoverage","maxUnaccountedDocuments","reasonCodes"],"additionalProperties":false},"export":{"nullable":true,"type":"object","properties":{"s3Key":{"type":"string"},"generatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"snapshotTimestamp":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["s3Key","generatedAt","snapshotTimestamp"],"additionalProperties":false}},"required":["runId","customerId","buildingId","catalogVersion","querySetVersion","promptSetVersion","retrievalConfigVersion","assessmentModelId","judgeModelId","judgeThreshold","corpusSnapshot","startedBy","startedAt","finishedAt","status","summary","export"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/{buildingId}/safety-case/runs/{runId}":{"get":{"summary":"Get a specific assessment run","tags":["Document Platform","Safety Case Intelligence"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"runId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"catalogVersion":{"type":"string"},"querySetVersion":{"type":"string"},"promptSetVersion":{"type":"string"},"retrievalConfigVersion":{"type":"string"},"assessmentModelId":{"type":"string"},"judgeModelId":{"type":"string"},"judgeThreshold":{"type":"number","minimum":0,"maximum":1},"corpusSnapshot":{"type":"object","properties":{"capturedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"documentVersions":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"versionId":{"type":"string"}},"required":["documentId","versionId"],"additionalProperties":false}},"chunkVersions":{"type":"array","items":{"type":"object","properties":{"chunkId":{"type":"string"},"versionId":{"type":"string"}},"required":["chunkId","versionId"],"additionalProperties":false}}},"required":["capturedAt","documentVersions","chunkVersions"],"additionalProperties":false},"startedBy":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"startedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"finishedAt":{"nullable":true,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"status":{"type":"string","enum":["running","completed","completed_with_errors","failed","cancelled","corpus_incomplete"]},"summary":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"covered":{"type":"integer","minimum":0,"maximum":9007199254740991},"lowConfidence":{"type":"integer","minimum":0,"maximum":9007199254740991},"missing":{"type":"integer","minimum":0,"maximum":9007199254740991},"requiresNarrative":{"type":"integer","minimum":0,"maximum":9007199254740991},"blocked":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"planned":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","covered","lowConfidence","missing","requiresNarrative","blocked","failed"],"additionalProperties":false},"corpusPreflight":{"nullable":true,"type":"object","properties":{"enabled":{"type":"boolean"},"enforced":{"type":"boolean"},"wouldBlock":{"type":"boolean"},"blocked":{"type":"boolean"},"inventoryCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"chunkIndexedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"manifestCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"accountedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"unaccountedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"zeroTextCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"blankMetadataCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"accountedCoverage":{"type":"number","minimum":0,"maximum":1},"minimumCoverage":{"type":"number","minimum":0,"maximum":1},"maxUnaccountedDocuments":{"type":"integer","minimum":0,"maximum":9007199254740991},"reasonCodes":{"type":"array","items":{"type":"string","enum":["inventory_empty","zero_accounted_documents","accounted_coverage_below_minimum","unaccounted_documents_above_ceiling"]}}},"required":["enabled","enforced","wouldBlock","blocked","inventoryCount","chunkIndexedCount","manifestCount","accountedCount","unaccountedCount","zeroTextCount","blankMetadataCount","accountedCoverage","minimumCoverage","maxUnaccountedDocuments","reasonCodes"],"additionalProperties":false},"export":{"nullable":true,"type":"object","properties":{"s3Key":{"type":"string"},"generatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"snapshotTimestamp":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["s3Key","generatedAt","snapshotTimestamp"],"additionalProperties":false}},"required":["runId","customerId","buildingId","catalogVersion","querySetVersion","promptSetVersion","retrievalConfigVersion","assessmentModelId","judgeModelId","judgeThreshold","corpusSnapshot","startedBy","startedAt","finishedAt","status","summary","export"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/{buildingId}/safety-case/runs/{runId}/criteria":{"get":{"summary":"Get criteria for an assessment run","tags":["Document Platform","Safety Case Intelligence"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"runId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"assessmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"runId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"criterionId":{"type":"string"},"requirement":{"type":"string"},"domain":{"type":"string","enum":["BSR","F","S","RES","MOR"]},"checklistVersion":{"type":"string"},"catalogVersion":{"type":"string"},"assessmentStatus":{"nullable":true,"type":"string","enum":["covered","low_confidence","missing","not_applicable"]},"requiresNarrative":{"type":"boolean"},"visibilityState":{"type":"string","enum":["visible","blocked"]},"runState":{"type":"string","enum":["succeeded","failed"]},"confidence":{"type":"number","minimum":0,"maximum":1},"answerText":{"type":"string"},"citations":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentName":{"type":"string"},"pageNumber":{"type":"integer","minimum":0,"maximum":9007199254740991},"snippet":{"nullable":true,"type":"string"},"chunkId":{"type":"string"},"documentCurrency":{"type":"object","properties":{"effectiveDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expiryDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"superseded":{"type":"boolean"},"documentClass":{"type":"string","enum":["cert","survey","policy","drawing","report","other"]}},"required":["effectiveDate","expiryDate","superseded","documentClass"],"additionalProperties":false}},"required":["documentId","documentName","pageNumber","snippet","chunkId","documentCurrency"],"additionalProperties":false}},"judge":{"type":"object","properties":{"verdict":{"type":"string","enum":["ok","ungrounded_citation","topic_match_but_not_satisfying","insufficient_coverage","stale_evidence"]},"score":{"type":"number","minimum":0,"maximum":1}},"required":["verdict","score"],"additionalProperties":false},"draftNarrative":{"type":"string"},"staleEvidence":{"type":"boolean"},"modelUsage":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string","minLength":1},"provider":{"type":"string"},"llmCallCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cachedReadTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cacheCreationTokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["model","llmCallCount","inputTokens","outputTokens"],"additionalProperties":false}},"provenanceState":{"type":"string","enum":["ai_generated","accepted","overridden","unresolved"]},"reviewOverride":{"nullable":true,"type":"object","properties":{"reviewer":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"timestamp":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"priorValue":{"type":"string"},"newValue":{"type":"string"},"reason":{"type":"string"}},"required":["reviewer","timestamp","priorValue","newValue","reason"],"additionalProperties":false},"reviewHistory":{"type":"array","items":{"type":"object","properties":{"reviewer":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"timestamp":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"priorValue":{"type":"string"},"newValue":{"type":"string"},"reason":{"type":"string"}},"required":["reviewer","timestamp","priorValue","newValue","reason"],"additionalProperties":false}},"structuredAnswer":{"nullable":true,"type":"object","properties":{"body":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["duty_holder"]},"kind":{"type":"string","enum":["organisation","individual"]},"name":{"type":"string","minLength":1},"role":{"type":"string","minLength":1},"remit":{"default":"","type":"string"},"email":{"default":"","type":"string"},"phone":{"default":"","type":"string"},"address":{"default":"","type":"string"},"companyNumber":{"default":"","type":"string"},"contactPerson":{"default":"","type":"string"},"appointedOn":{"default":null,"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","kind","name","role","remit","email","phone","address","companyNumber","contactPerson","appointedOn"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["competent_person"]},"name":{"type":"string","minLength":1},"organisation":{"default":"","type":"string"},"role":{"type":"string","minLength":1},"email":{"default":"","type":"string"},"phone":{"default":"","type":"string"},"registration":{"default":"","type":"string"},"skills":{"default":"","type":"string"},"knowledge":{"default":"","type":"string"},"experience":{"default":"","type":"string"},"behaviours":{"default":"","type":"string"},"assessedOn":{"default":null,"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","name","organisation","role","email","phone","registration","skills","knowledge","experience","behaviours","assessedOn"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["narrative"]},"text":{"type":"string","minLength":1},"sourceDocumentId":{"default":null,"nullable":true,"type":"string"}},"required":["type","text","sourceDocumentId"],"additionalProperties":false}]},"recordedBy":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"recordedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["body","recordedBy","recordedAt"],"additionalProperties":false},"gapLifecycle":{"nullable":true,"type":"object","properties":{"gapId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"criterionId":{"type":"string"},"state":{"type":"string","enum":["open","assigned","resolved","accepted_risk"]},"owner":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"note":{"nullable":true,"type":"string"},"closureEvidence":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentName":{"type":"string"},"pageNumber":{"type":"integer","minimum":0,"maximum":9007199254740991},"snippet":{"nullable":true,"type":"string"},"chunkId":{"type":"string"},"documentCurrency":{"type":"object","properties":{"effectiveDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expiryDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"superseded":{"type":"boolean"},"documentClass":{"type":"string","enum":["cert","survey","policy","drawing","report","other"]}},"required":["effectiveDate","expiryDate","superseded","documentClass"],"additionalProperties":false}},"required":["documentId","documentName","pageNumber","snippet","chunkId","documentCurrency"],"additionalProperties":false}},"createdAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"resolvedAt":{"nullable":true,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"supersededDispositions":{"default":[],"type":"array","items":{"type":"object","properties":{"gapId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"state":{"type":"string","enum":["resolved","accepted_risk"]},"owner":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"note":{"nullable":true,"type":"string"},"closureEvidence":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentName":{"type":"string"},"pageNumber":{"type":"integer","minimum":0,"maximum":9007199254740991},"snippet":{"nullable":true,"type":"string"},"chunkId":{"type":"string"},"documentCurrency":{"type":"object","properties":{"effectiveDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expiryDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"superseded":{"type":"boolean"},"documentClass":{"type":"string","enum":["cert","survey","policy","drawing","report","other"]}},"required":["effectiveDate","expiryDate","superseded","documentClass"],"additionalProperties":false}},"required":["documentId","documentName","pageNumber","snippet","chunkId","documentCurrency"],"additionalProperties":false}},"resolvedAt":{"nullable":true,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"supersededAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["gapId","state","owner","note","closureEvidence","resolvedAt","supersededAt"],"additionalProperties":false}}},"required":["gapId","customerId","buildingId","criterionId","state","owner","note","closureEvidence","createdAt","updatedAt","resolvedAt","supersededDispositions"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["assessmentId","runId","customerId","buildingId","criterionId","domain","checklistVersion","catalogVersion","assessmentStatus","requiresNarrative","visibilityState","runState","confidence","answerText","citations","judge","staleEvidence","provenanceState","reviewOverride","createdAt","updatedAt"],"additionalProperties":false}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/safety-case/runs":{"post":{"summary":"Start a new assessment run for a building","tags":["Document Platform","Safety Case Intelligence"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"catalogVersion":{"type":"string"},"querySetVersion":{"type":"string"},"promptSetVersion":{"type":"string"},"retrievalConfigVersion":{"type":"string"},"assessmentModelId":{"type":"string"},"judgeModelId":{"type":"string"},"judgeThreshold":{"type":"number","minimum":0,"maximum":1},"corpusSnapshot":{"type":"object","properties":{"capturedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"documentVersions":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"versionId":{"type":"string"}},"required":["documentId","versionId"],"additionalProperties":false}},"chunkVersions":{"type":"array","items":{"type":"object","properties":{"chunkId":{"type":"string"},"versionId":{"type":"string"}},"required":["chunkId","versionId"],"additionalProperties":false}}},"required":["capturedAt","documentVersions","chunkVersions"],"additionalProperties":false},"startedBy":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"startedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"finishedAt":{"nullable":true,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"status":{"type":"string","enum":["running","completed","completed_with_errors","failed","cancelled","corpus_incomplete"]},"summary":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"covered":{"type":"integer","minimum":0,"maximum":9007199254740991},"lowConfidence":{"type":"integer","minimum":0,"maximum":9007199254740991},"missing":{"type":"integer","minimum":0,"maximum":9007199254740991},"requiresNarrative":{"type":"integer","minimum":0,"maximum":9007199254740991},"blocked":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"planned":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","covered","lowConfidence","missing","requiresNarrative","blocked","failed"],"additionalProperties":false},"corpusPreflight":{"nullable":true,"type":"object","properties":{"enabled":{"type":"boolean"},"enforced":{"type":"boolean"},"wouldBlock":{"type":"boolean"},"blocked":{"type":"boolean"},"inventoryCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"chunkIndexedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"manifestCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"accountedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"unaccountedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"zeroTextCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"blankMetadataCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"accountedCoverage":{"type":"number","minimum":0,"maximum":1},"minimumCoverage":{"type":"number","minimum":0,"maximum":1},"maxUnaccountedDocuments":{"type":"integer","minimum":0,"maximum":9007199254740991},"reasonCodes":{"type":"array","items":{"type":"string","enum":["inventory_empty","zero_accounted_documents","accounted_coverage_below_minimum","unaccounted_documents_above_ceiling"]}}},"required":["enabled","enforced","wouldBlock","blocked","inventoryCount","chunkIndexedCount","manifestCount","accountedCount","unaccountedCount","zeroTextCount","blankMetadataCount","accountedCoverage","minimumCoverage","maxUnaccountedDocuments","reasonCodes"],"additionalProperties":false},"export":{"nullable":true,"type":"object","properties":{"s3Key":{"type":"string"},"generatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"snapshotTimestamp":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["s3Key","generatedAt","snapshotTimestamp"],"additionalProperties":false}},"required":["runId","customerId","buildingId","catalogVersion","querySetVersion","promptSetVersion","retrievalConfigVersion","assessmentModelId","judgeModelId","judgeThreshold","corpusSnapshot","startedBy","startedAt","finishedAt","status","summary","export"],"additionalProperties":false}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"catalogVersion":{"type":"string"},"querySetVersion":{"type":"string"},"promptSetVersion":{"type":"string"},"retrievalConfigVersion":{"type":"string"},"assessmentModelId":{"type":"string"},"judgeModelId":{"type":"string"},"judgeThreshold":{"type":"number","minimum":0,"maximum":1},"corpusSnapshot":{"type":"object","properties":{"capturedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"documentVersions":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"versionId":{"type":"string"}},"required":["documentId","versionId"],"additionalProperties":false}},"chunkVersions":{"type":"array","items":{"type":"object","properties":{"chunkId":{"type":"string"},"versionId":{"type":"string"}},"required":["chunkId","versionId"],"additionalProperties":false}}},"required":["capturedAt","documentVersions","chunkVersions"],"additionalProperties":false},"startedBy":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"startedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"finishedAt":{"nullable":true,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"status":{"type":"string","enum":["running","completed","completed_with_errors","failed","cancelled","corpus_incomplete"]},"summary":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"covered":{"type":"integer","minimum":0,"maximum":9007199254740991},"lowConfidence":{"type":"integer","minimum":0,"maximum":9007199254740991},"missing":{"type":"integer","minimum":0,"maximum":9007199254740991},"requiresNarrative":{"type":"integer","minimum":0,"maximum":9007199254740991},"blocked":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"planned":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","covered","lowConfidence","missing","requiresNarrative","blocked","failed"],"additionalProperties":false},"corpusPreflight":{"nullable":true,"type":"object","properties":{"enabled":{"type":"boolean"},"enforced":{"type":"boolean"},"wouldBlock":{"type":"boolean"},"blocked":{"type":"boolean"},"inventoryCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"chunkIndexedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"manifestCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"accountedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"unaccountedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"zeroTextCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"blankMetadataCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"accountedCoverage":{"type":"number","minimum":0,"maximum":1},"minimumCoverage":{"type":"number","minimum":0,"maximum":1},"maxUnaccountedDocuments":{"type":"integer","minimum":0,"maximum":9007199254740991},"reasonCodes":{"type":"array","items":{"type":"string","enum":["inventory_empty","zero_accounted_documents","accounted_coverage_below_minimum","unaccounted_documents_above_ceiling"]}}},"required":["enabled","enforced","wouldBlock","blocked","inventoryCount","chunkIndexedCount","manifestCount","accountedCount","unaccountedCount","zeroTextCount","blankMetadataCount","accountedCoverage","minimumCoverage","maxUnaccountedDocuments","reasonCodes"],"additionalProperties":false},"export":{"nullable":true,"type":"object","properties":{"s3Key":{"type":"string"},"generatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"snapshotTimestamp":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["s3Key","generatedAt","snapshotTimestamp"],"additionalProperties":false}},"required":["runId","customerId","buildingId","catalogVersion","querySetVersion","promptSetVersion","retrievalConfigVersion","assessmentModelId","judgeModelId","judgeThreshold","corpusSnapshot","startedBy","startedAt","finishedAt","status","summary","export"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/{buildingId}/safety-case/runs/{runId}/cancel":{"post":{"summary":"Request cancellation of a running assessment run","tags":["Document Platform","Safety Case Intelligence"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"runId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"catalogVersion":{"type":"string"},"querySetVersion":{"type":"string"},"promptSetVersion":{"type":"string"},"retrievalConfigVersion":{"type":"string"},"assessmentModelId":{"type":"string"},"judgeModelId":{"type":"string"},"judgeThreshold":{"type":"number","minimum":0,"maximum":1},"corpusSnapshot":{"type":"object","properties":{"capturedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"documentVersions":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"versionId":{"type":"string"}},"required":["documentId","versionId"],"additionalProperties":false}},"chunkVersions":{"type":"array","items":{"type":"object","properties":{"chunkId":{"type":"string"},"versionId":{"type":"string"}},"required":["chunkId","versionId"],"additionalProperties":false}}},"required":["capturedAt","documentVersions","chunkVersions"],"additionalProperties":false},"startedBy":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"startedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"finishedAt":{"nullable":true,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"status":{"type":"string","enum":["running","completed","completed_with_errors","failed","cancelled","corpus_incomplete"]},"summary":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"covered":{"type":"integer","minimum":0,"maximum":9007199254740991},"lowConfidence":{"type":"integer","minimum":0,"maximum":9007199254740991},"missing":{"type":"integer","minimum":0,"maximum":9007199254740991},"requiresNarrative":{"type":"integer","minimum":0,"maximum":9007199254740991},"blocked":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"planned":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","covered","lowConfidence","missing","requiresNarrative","blocked","failed"],"additionalProperties":false},"corpusPreflight":{"nullable":true,"type":"object","properties":{"enabled":{"type":"boolean"},"enforced":{"type":"boolean"},"wouldBlock":{"type":"boolean"},"blocked":{"type":"boolean"},"inventoryCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"chunkIndexedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"manifestCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"accountedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"unaccountedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"zeroTextCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"blankMetadataCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"accountedCoverage":{"type":"number","minimum":0,"maximum":1},"minimumCoverage":{"type":"number","minimum":0,"maximum":1},"maxUnaccountedDocuments":{"type":"integer","minimum":0,"maximum":9007199254740991},"reasonCodes":{"type":"array","items":{"type":"string","enum":["inventory_empty","zero_accounted_documents","accounted_coverage_below_minimum","unaccounted_documents_above_ceiling"]}}},"required":["enabled","enforced","wouldBlock","blocked","inventoryCount","chunkIndexedCount","manifestCount","accountedCount","unaccountedCount","zeroTextCount","blankMetadataCount","accountedCoverage","minimumCoverage","maxUnaccountedDocuments","reasonCodes"],"additionalProperties":false},"export":{"nullable":true,"type":"object","properties":{"s3Key":{"type":"string"},"generatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"snapshotTimestamp":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["s3Key","generatedAt","snapshotTimestamp"],"additionalProperties":false}},"required":["runId","customerId","buildingId","catalogVersion","querySetVersion","promptSetVersion","retrievalConfigVersion","assessmentModelId","judgeModelId","judgeThreshold","corpusSnapshot","startedBy","startedAt","finishedAt","status","summary","export"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/{buildingId}/safety-case/runs/{runId}/export":{"post":{"summary":"Start an export for an assessment run","tags":["Document Platform","Safety Case Intelligence"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"runId","required":true}],"security":[{"apiKey":[]}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["runId"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/{buildingId}/safety-case/runs/{runId}/export-url":{"get":{"summary":"Get a download URL for an assessment run export","tags":["Document Platform","Safety Case Intelligence"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"runId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"downloadUrl":{"type":"string"},"expiresAt":{"type":"string"}},"required":["downloadUrl","expiresAt"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/{buildingId}/safety-case/runs/{runId}/criteria/{criterionId}/history":{"get":{"summary":"Get the review history for a criterion","tags":["Document Platform","Safety Case Intelligence"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"runId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"criterionId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"reviewer":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"timestamp":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"priorValue":{"type":"string"},"newValue":{"type":"string"},"reason":{"nullable":true,"type":"string"}},"required":["reviewer","timestamp","priorValue","newValue","reason"],"additionalProperties":false}},"reasonsWithheld":{"type":"boolean"}},"required":["entries","reasonsWithheld"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/{buildingId}/safety-case/runs/{runId}/criteria/{criterionId}/review":{"patch":{"summary":"Record a reviewer decision on a criterion","tags":["Document Platform","Safety Case Intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newValue":{"type":"string","enum":["covered","low_confidence","missing","not_applicable"]},"reason":{"type":"string","minLength":1,"maxLength":1000}},"required":["newValue","reason"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"runId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"criterionId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"assessmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"runId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"criterionId":{"type":"string"},"requirement":{"type":"string"},"domain":{"type":"string","enum":["BSR","F","S","RES","MOR"]},"checklistVersion":{"type":"string"},"catalogVersion":{"type":"string"},"assessmentStatus":{"nullable":true,"type":"string","enum":["covered","low_confidence","missing","not_applicable"]},"requiresNarrative":{"type":"boolean"},"visibilityState":{"type":"string","enum":["visible","blocked"]},"runState":{"type":"string","enum":["succeeded","failed"]},"confidence":{"type":"number","minimum":0,"maximum":1},"answerText":{"type":"string"},"citations":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentName":{"type":"string"},"pageNumber":{"type":"integer","minimum":0,"maximum":9007199254740991},"snippet":{"nullable":true,"type":"string"},"chunkId":{"type":"string"},"documentCurrency":{"type":"object","properties":{"effectiveDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expiryDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"superseded":{"type":"boolean"},"documentClass":{"type":"string","enum":["cert","survey","policy","drawing","report","other"]}},"required":["effectiveDate","expiryDate","superseded","documentClass"],"additionalProperties":false}},"required":["documentId","documentName","pageNumber","snippet","chunkId","documentCurrency"],"additionalProperties":false}},"judge":{"type":"object","properties":{"verdict":{"type":"string","enum":["ok","ungrounded_citation","topic_match_but_not_satisfying","insufficient_coverage","stale_evidence"]},"score":{"type":"number","minimum":0,"maximum":1}},"required":["verdict","score"],"additionalProperties":false},"draftNarrative":{"type":"string"},"staleEvidence":{"type":"boolean"},"modelUsage":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string","minLength":1},"provider":{"type":"string"},"llmCallCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cachedReadTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cacheCreationTokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["model","llmCallCount","inputTokens","outputTokens"],"additionalProperties":false}},"provenanceState":{"type":"string","enum":["ai_generated","accepted","overridden","unresolved"]},"reviewOverride":{"nullable":true,"type":"object","properties":{"reviewer":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"timestamp":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"priorValue":{"type":"string"},"newValue":{"type":"string"},"reason":{"type":"string"}},"required":["reviewer","timestamp","priorValue","newValue","reason"],"additionalProperties":false},"reviewHistory":{"type":"array","items":{"type":"object","properties":{"reviewer":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"timestamp":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"priorValue":{"type":"string"},"newValue":{"type":"string"},"reason":{"type":"string"}},"required":["reviewer","timestamp","priorValue","newValue","reason"],"additionalProperties":false}},"structuredAnswer":{"nullable":true,"type":"object","properties":{"body":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["duty_holder"]},"kind":{"type":"string","enum":["organisation","individual"]},"name":{"type":"string","minLength":1},"role":{"type":"string","minLength":1},"remit":{"default":"","type":"string"},"email":{"default":"","type":"string"},"phone":{"default":"","type":"string"},"address":{"default":"","type":"string"},"companyNumber":{"default":"","type":"string"},"contactPerson":{"default":"","type":"string"},"appointedOn":{"default":null,"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","kind","name","role","remit","email","phone","address","companyNumber","contactPerson","appointedOn"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["competent_person"]},"name":{"type":"string","minLength":1},"organisation":{"default":"","type":"string"},"role":{"type":"string","minLength":1},"email":{"default":"","type":"string"},"phone":{"default":"","type":"string"},"registration":{"default":"","type":"string"},"skills":{"default":"","type":"string"},"knowledge":{"default":"","type":"string"},"experience":{"default":"","type":"string"},"behaviours":{"default":"","type":"string"},"assessedOn":{"default":null,"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","name","organisation","role","email","phone","registration","skills","knowledge","experience","behaviours","assessedOn"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["narrative"]},"text":{"type":"string","minLength":1},"sourceDocumentId":{"default":null,"nullable":true,"type":"string"}},"required":["type","text","sourceDocumentId"],"additionalProperties":false}]},"recordedBy":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"recordedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["body","recordedBy","recordedAt"],"additionalProperties":false},"gapLifecycle":{"nullable":true,"type":"object","properties":{"gapId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"criterionId":{"type":"string"},"state":{"type":"string","enum":["open","assigned","resolved","accepted_risk"]},"owner":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"note":{"nullable":true,"type":"string"},"closureEvidence":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentName":{"type":"string"},"pageNumber":{"type":"integer","minimum":0,"maximum":9007199254740991},"snippet":{"nullable":true,"type":"string"},"chunkId":{"type":"string"},"documentCurrency":{"type":"object","properties":{"effectiveDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expiryDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"superseded":{"type":"boolean"},"documentClass":{"type":"string","enum":["cert","survey","policy","drawing","report","other"]}},"required":["effectiveDate","expiryDate","superseded","documentClass"],"additionalProperties":false}},"required":["documentId","documentName","pageNumber","snippet","chunkId","documentCurrency"],"additionalProperties":false}},"createdAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"resolvedAt":{"nullable":true,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"supersededDispositions":{"default":[],"type":"array","items":{"type":"object","properties":{"gapId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"state":{"type":"string","enum":["resolved","accepted_risk"]},"owner":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"note":{"nullable":true,"type":"string"},"closureEvidence":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentName":{"type":"string"},"pageNumber":{"type":"integer","minimum":0,"maximum":9007199254740991},"snippet":{"nullable":true,"type":"string"},"chunkId":{"type":"string"},"documentCurrency":{"type":"object","properties":{"effectiveDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expiryDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"superseded":{"type":"boolean"},"documentClass":{"type":"string","enum":["cert","survey","policy","drawing","report","other"]}},"required":["effectiveDate","expiryDate","superseded","documentClass"],"additionalProperties":false}},"required":["documentId","documentName","pageNumber","snippet","chunkId","documentCurrency"],"additionalProperties":false}},"resolvedAt":{"nullable":true,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"supersededAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["gapId","state","owner","note","closureEvidence","resolvedAt","supersededAt"],"additionalProperties":false}}},"required":["gapId","customerId","buildingId","criterionId","state","owner","note","closureEvidence","createdAt","updatedAt","resolvedAt","supersededDispositions"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["assessmentId","runId","customerId","buildingId","criterionId","domain","checklistVersion","catalogVersion","assessmentStatus","requiresNarrative","visibilityState","runState","confidence","answerText","citations","judge","staleEvidence","provenanceState","reviewOverride","createdAt","updatedAt"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/{buildingId}/safety-case/runs/{runId}/criteria/{criterionId}/structured-answer":{"put":{"summary":"Record the structured answer for a criterion","tags":["Document Platform","Safety Case Intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["duty_holder"]},"kind":{"type":"string","enum":["organisation","individual"]},"name":{"type":"string","minLength":1},"role":{"type":"string","minLength":1},"remit":{"default":"","type":"string"},"email":{"default":"","type":"string"},"phone":{"default":"","type":"string"},"address":{"default":"","type":"string"},"companyNumber":{"default":"","type":"string"},"contactPerson":{"default":"","type":"string"},"appointedOn":{"default":null,"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","kind","name","role","remit","email","phone","address","companyNumber","contactPerson","appointedOn"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["competent_person"]},"name":{"type":"string","minLength":1},"organisation":{"default":"","type":"string"},"role":{"type":"string","minLength":1},"email":{"default":"","type":"string"},"phone":{"default":"","type":"string"},"registration":{"default":"","type":"string"},"skills":{"default":"","type":"string"},"knowledge":{"default":"","type":"string"},"experience":{"default":"","type":"string"},"behaviours":{"default":"","type":"string"},"assessedOn":{"default":null,"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","name","organisation","role","email","phone","registration","skills","knowledge","experience","behaviours","assessedOn"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["narrative"]},"text":{"type":"string","minLength":1},"sourceDocumentId":{"default":null,"nullable":true,"type":"string"}},"required":["type","text","sourceDocumentId"],"additionalProperties":false}]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"runId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"criterionId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"assessmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"runId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"criterionId":{"type":"string"},"requirement":{"type":"string"},"domain":{"type":"string","enum":["BSR","F","S","RES","MOR"]},"checklistVersion":{"type":"string"},"catalogVersion":{"type":"string"},"assessmentStatus":{"nullable":true,"type":"string","enum":["covered","low_confidence","missing","not_applicable"]},"requiresNarrative":{"type":"boolean"},"visibilityState":{"type":"string","enum":["visible","blocked"]},"runState":{"type":"string","enum":["succeeded","failed"]},"confidence":{"type":"number","minimum":0,"maximum":1},"answerText":{"type":"string"},"citations":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentName":{"type":"string"},"pageNumber":{"type":"integer","minimum":0,"maximum":9007199254740991},"snippet":{"nullable":true,"type":"string"},"chunkId":{"type":"string"},"documentCurrency":{"type":"object","properties":{"effectiveDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expiryDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"superseded":{"type":"boolean"},"documentClass":{"type":"string","enum":["cert","survey","policy","drawing","report","other"]}},"required":["effectiveDate","expiryDate","superseded","documentClass"],"additionalProperties":false}},"required":["documentId","documentName","pageNumber","snippet","chunkId","documentCurrency"],"additionalProperties":false}},"judge":{"type":"object","properties":{"verdict":{"type":"string","enum":["ok","ungrounded_citation","topic_match_but_not_satisfying","insufficient_coverage","stale_evidence"]},"score":{"type":"number","minimum":0,"maximum":1}},"required":["verdict","score"],"additionalProperties":false},"draftNarrative":{"type":"string"},"staleEvidence":{"type":"boolean"},"modelUsage":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string","minLength":1},"provider":{"type":"string"},"llmCallCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cachedReadTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cacheCreationTokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["model","llmCallCount","inputTokens","outputTokens"],"additionalProperties":false}},"provenanceState":{"type":"string","enum":["ai_generated","accepted","overridden","unresolved"]},"reviewOverride":{"nullable":true,"type":"object","properties":{"reviewer":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"timestamp":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"priorValue":{"type":"string"},"newValue":{"type":"string"},"reason":{"type":"string"}},"required":["reviewer","timestamp","priorValue","newValue","reason"],"additionalProperties":false},"reviewHistory":{"type":"array","items":{"type":"object","properties":{"reviewer":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"timestamp":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"priorValue":{"type":"string"},"newValue":{"type":"string"},"reason":{"type":"string"}},"required":["reviewer","timestamp","priorValue","newValue","reason"],"additionalProperties":false}},"structuredAnswer":{"nullable":true,"type":"object","properties":{"body":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["duty_holder"]},"kind":{"type":"string","enum":["organisation","individual"]},"name":{"type":"string","minLength":1},"role":{"type":"string","minLength":1},"remit":{"default":"","type":"string"},"email":{"default":"","type":"string"},"phone":{"default":"","type":"string"},"address":{"default":"","type":"string"},"companyNumber":{"default":"","type":"string"},"contactPerson":{"default":"","type":"string"},"appointedOn":{"default":null,"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","kind","name","role","remit","email","phone","address","companyNumber","contactPerson","appointedOn"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["competent_person"]},"name":{"type":"string","minLength":1},"organisation":{"default":"","type":"string"},"role":{"type":"string","minLength":1},"email":{"default":"","type":"string"},"phone":{"default":"","type":"string"},"registration":{"default":"","type":"string"},"skills":{"default":"","type":"string"},"knowledge":{"default":"","type":"string"},"experience":{"default":"","type":"string"},"behaviours":{"default":"","type":"string"},"assessedOn":{"default":null,"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","name","organisation","role","email","phone","registration","skills","knowledge","experience","behaviours","assessedOn"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["narrative"]},"text":{"type":"string","minLength":1},"sourceDocumentId":{"default":null,"nullable":true,"type":"string"}},"required":["type","text","sourceDocumentId"],"additionalProperties":false}]},"recordedBy":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"recordedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["body","recordedBy","recordedAt"],"additionalProperties":false},"gapLifecycle":{"nullable":true,"type":"object","properties":{"gapId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"criterionId":{"type":"string"},"state":{"type":"string","enum":["open","assigned","resolved","accepted_risk"]},"owner":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"note":{"nullable":true,"type":"string"},"closureEvidence":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentName":{"type":"string"},"pageNumber":{"type":"integer","minimum":0,"maximum":9007199254740991},"snippet":{"nullable":true,"type":"string"},"chunkId":{"type":"string"},"documentCurrency":{"type":"object","properties":{"effectiveDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expiryDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"superseded":{"type":"boolean"},"documentClass":{"type":"string","enum":["cert","survey","policy","drawing","report","other"]}},"required":["effectiveDate","expiryDate","superseded","documentClass"],"additionalProperties":false}},"required":["documentId","documentName","pageNumber","snippet","chunkId","documentCurrency"],"additionalProperties":false}},"createdAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"resolvedAt":{"nullable":true,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"supersededDispositions":{"default":[],"type":"array","items":{"type":"object","properties":{"gapId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"state":{"type":"string","enum":["resolved","accepted_risk"]},"owner":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"note":{"nullable":true,"type":"string"},"closureEvidence":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentName":{"type":"string"},"pageNumber":{"type":"integer","minimum":0,"maximum":9007199254740991},"snippet":{"nullable":true,"type":"string"},"chunkId":{"type":"string"},"documentCurrency":{"type":"object","properties":{"effectiveDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expiryDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"superseded":{"type":"boolean"},"documentClass":{"type":"string","enum":["cert","survey","policy","drawing","report","other"]}},"required":["effectiveDate","expiryDate","superseded","documentClass"],"additionalProperties":false}},"required":["documentId","documentName","pageNumber","snippet","chunkId","documentCurrency"],"additionalProperties":false}},"resolvedAt":{"nullable":true,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"supersededAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["gapId","state","owner","note","closureEvidence","resolvedAt","supersededAt"],"additionalProperties":false}}},"required":["gapId","customerId","buildingId","criterionId","state","owner","note","closureEvidence","createdAt","updatedAt","resolvedAt","supersededDispositions"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["assessmentId","runId","customerId","buildingId","criterionId","domain","checklistVersion","catalogVersion","assessmentStatus","requiresNarrative","visibilityState","runState","confidence","answerText","citations","judge","staleEvidence","provenanceState","reviewOverride","createdAt","updatedAt"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/{buildingId}/safety-case/runs/{runId}/criteria/{criterionId}/gap":{"post":{"summary":"Apply a gap lifecycle action to a criterion","tags":["Document Platform","Safety Case Intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","enum":["open"]},"note":{"type":"string","maxLength":1000}},"required":["action"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["assign"]},"owner":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"note":{"type":"string","maxLength":1000}},"required":["action"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["resolve"]},"note":{"type":"string","maxLength":1000}},"required":["action"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["accept_risk"]},"reason":{"type":"string","maxLength":1000},"note":{"type":"string","maxLength":1000}},"required":["action","reason"],"additionalProperties":false}]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"runId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"criterionId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"assessmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"runId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"criterionId":{"type":"string"},"requirement":{"type":"string"},"domain":{"type":"string","enum":["BSR","F","S","RES","MOR"]},"checklistVersion":{"type":"string"},"catalogVersion":{"type":"string"},"assessmentStatus":{"nullable":true,"type":"string","enum":["covered","low_confidence","missing","not_applicable"]},"requiresNarrative":{"type":"boolean"},"visibilityState":{"type":"string","enum":["visible","blocked"]},"runState":{"type":"string","enum":["succeeded","failed"]},"confidence":{"type":"number","minimum":0,"maximum":1},"answerText":{"type":"string"},"citations":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentName":{"type":"string"},"pageNumber":{"type":"integer","minimum":0,"maximum":9007199254740991},"snippet":{"nullable":true,"type":"string"},"chunkId":{"type":"string"},"documentCurrency":{"type":"object","properties":{"effectiveDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expiryDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"superseded":{"type":"boolean"},"documentClass":{"type":"string","enum":["cert","survey","policy","drawing","report","other"]}},"required":["effectiveDate","expiryDate","superseded","documentClass"],"additionalProperties":false}},"required":["documentId","documentName","pageNumber","snippet","chunkId","documentCurrency"],"additionalProperties":false}},"judge":{"type":"object","properties":{"verdict":{"type":"string","enum":["ok","ungrounded_citation","topic_match_but_not_satisfying","insufficient_coverage","stale_evidence"]},"score":{"type":"number","minimum":0,"maximum":1}},"required":["verdict","score"],"additionalProperties":false},"draftNarrative":{"type":"string"},"staleEvidence":{"type":"boolean"},"modelUsage":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string","minLength":1},"provider":{"type":"string"},"llmCallCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cachedReadTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cacheCreationTokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["model","llmCallCount","inputTokens","outputTokens"],"additionalProperties":false}},"provenanceState":{"type":"string","enum":["ai_generated","accepted","overridden","unresolved"]},"reviewOverride":{"nullable":true,"type":"object","properties":{"reviewer":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"timestamp":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"priorValue":{"type":"string"},"newValue":{"type":"string"},"reason":{"type":"string"}},"required":["reviewer","timestamp","priorValue","newValue","reason"],"additionalProperties":false},"reviewHistory":{"type":"array","items":{"type":"object","properties":{"reviewer":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"timestamp":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"priorValue":{"type":"string"},"newValue":{"type":"string"},"reason":{"type":"string"}},"required":["reviewer","timestamp","priorValue","newValue","reason"],"additionalProperties":false}},"structuredAnswer":{"nullable":true,"type":"object","properties":{"body":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["duty_holder"]},"kind":{"type":"string","enum":["organisation","individual"]},"name":{"type":"string","minLength":1},"role":{"type":"string","minLength":1},"remit":{"default":"","type":"string"},"email":{"default":"","type":"string"},"phone":{"default":"","type":"string"},"address":{"default":"","type":"string"},"companyNumber":{"default":"","type":"string"},"contactPerson":{"default":"","type":"string"},"appointedOn":{"default":null,"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","kind","name","role","remit","email","phone","address","companyNumber","contactPerson","appointedOn"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["competent_person"]},"name":{"type":"string","minLength":1},"organisation":{"default":"","type":"string"},"role":{"type":"string","minLength":1},"email":{"default":"","type":"string"},"phone":{"default":"","type":"string"},"registration":{"default":"","type":"string"},"skills":{"default":"","type":"string"},"knowledge":{"default":"","type":"string"},"experience":{"default":"","type":"string"},"behaviours":{"default":"","type":"string"},"assessedOn":{"default":null,"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","name","organisation","role","email","phone","registration","skills","knowledge","experience","behaviours","assessedOn"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["narrative"]},"text":{"type":"string","minLength":1},"sourceDocumentId":{"default":null,"nullable":true,"type":"string"}},"required":["type","text","sourceDocumentId"],"additionalProperties":false}]},"recordedBy":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"recordedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["body","recordedBy","recordedAt"],"additionalProperties":false},"gapLifecycle":{"nullable":true,"type":"object","properties":{"gapId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"criterionId":{"type":"string"},"state":{"type":"string","enum":["open","assigned","resolved","accepted_risk"]},"owner":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"note":{"nullable":true,"type":"string"},"closureEvidence":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentName":{"type":"string"},"pageNumber":{"type":"integer","minimum":0,"maximum":9007199254740991},"snippet":{"nullable":true,"type":"string"},"chunkId":{"type":"string"},"documentCurrency":{"type":"object","properties":{"effectiveDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expiryDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"superseded":{"type":"boolean"},"documentClass":{"type":"string","enum":["cert","survey","policy","drawing","report","other"]}},"required":["effectiveDate","expiryDate","superseded","documentClass"],"additionalProperties":false}},"required":["documentId","documentName","pageNumber","snippet","chunkId","documentCurrency"],"additionalProperties":false}},"createdAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"resolvedAt":{"nullable":true,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"supersededDispositions":{"default":[],"type":"array","items":{"type":"object","properties":{"gapId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"state":{"type":"string","enum":["resolved","accepted_risk"]},"owner":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"note":{"nullable":true,"type":"string"},"closureEvidence":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentName":{"type":"string"},"pageNumber":{"type":"integer","minimum":0,"maximum":9007199254740991},"snippet":{"nullable":true,"type":"string"},"chunkId":{"type":"string"},"documentCurrency":{"type":"object","properties":{"effectiveDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expiryDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"superseded":{"type":"boolean"},"documentClass":{"type":"string","enum":["cert","survey","policy","drawing","report","other"]}},"required":["effectiveDate","expiryDate","superseded","documentClass"],"additionalProperties":false}},"required":["documentId","documentName","pageNumber","snippet","chunkId","documentCurrency"],"additionalProperties":false}},"resolvedAt":{"nullable":true,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"supersededAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["gapId","state","owner","note","closureEvidence","resolvedAt","supersededAt"],"additionalProperties":false}}},"required":["gapId","customerId","buildingId","criterionId","state","owner","note","closureEvidence","createdAt","updatedAt","resolvedAt","supersededDispositions"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["assessmentId","runId","customerId","buildingId","criterionId","domain","checklistVersion","catalogVersion","assessmentStatus","requiresNarrative","visibilityState","runState","confidence","answerText","citations","judge","staleEvidence","provenanceState","reviewOverride","createdAt","updatedAt"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/{buildingId}/safety-case/evidence":{"get":{"summary":"Get user-attached criterion evidence for a building","tags":["Document Platform","Safety Case Intelligence"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9_]+$"},"in":"query","name":"catalogId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"catalogId":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9_]+$"},"criterionId":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$"},"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentName":{"type":"string"},"attachedBy":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"attachedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"verdict":{"default":"match","type":"string","enum":["match","no_match"]},"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["customerId","buildingId","catalogId","criterionId","documentId","documentName","attachedBy","attachedAt","verdict"],"additionalProperties":false}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/safety-case/criteria/{criterionId}/evidence":{"post":{"summary":"Attach a document to a criterion as evidence","tags":["Document Platform","Safety Case Intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"catalogId":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9_]+$"}},"required":["documentId","catalogId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$"},"in":"path","name":"criterionId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"catalogId":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9_]+$"},"criterionId":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$"},"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentName":{"type":"string"},"attachedBy":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"attachedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"verdict":{"default":"match","type":"string","enum":["match","no_match"]},"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["customerId","buildingId","catalogId","criterionId","documentId","documentName","attachedBy","attachedAt","verdict"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/{buildingId}/safety-case/criteria/{criterionId}/evidence/{documentId}":{"delete":{"summary":"Detach a document from a criterion","tags":["Document Platform","Safety Case Intelligence"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9_]+$"},"in":"query","name":"catalogId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$"},"in":"path","name":"criterionId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/safety-case/criteria/{criterionId}/evidence/{documentId}/verdict":{"put":{"summary":"Record a verdict on a document suggested for a criterion","tags":["Document Platform","Safety Case Intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"catalogId":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9_]+$"},"verdict":{"type":"string","enum":["match","no_match"]},"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["catalogId","verdict"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$"},"in":"path","name":"criterionId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"catalogId":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9_]+$"},"criterionId":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$"},"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentName":{"type":"string"},"attachedBy":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","service"]},"displayName":{"type":"string"},"email":{"type":"string"}},"required":["id","kind"],"additionalProperties":false},"attachedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"verdict":{"default":"match","type":"string","enum":["match","no_match"]},"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["customerId","buildingId","catalogId","criterionId","documentId","documentName","attachedBy","attachedAt","verdict"],"additionalProperties":false}}}}}},"delete":{"summary":"Withdraw a verdict on a document suggested for a criterion","tags":["Document Platform","Safety Case Intelligence"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9_]+$"},"in":"query","name":"catalogId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$"},"in":"path","name":"criterionId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/archive-preflight":{"post":{"summary":"Start a ZIP upload preflight scan","tags":["Document Platform"],"description":"Scan an uploaded archive's contents before any documents are created or counted against the document cap. Returns the preflight run record.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"objectKey":{"type":"string","minLength":1}},"required":["documentId","objectKey"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"preflightId":{"type":"string"},"buildingId":{"type":"string"},"customerId":{"type":"string"},"documentId":{"type":"string"},"objectKey":{"type":"string"},"status":{"type":"string","enum":["scanning","ready","awaiting_approval","approved","importing","completed","cancelling","cancelled","failed"]},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"error":{"type":"string"},"totals":{"type":"object","properties":{"folders":{"type":"integer","minimum":0,"maximum":9007199254740991},"documents":{"type":"integer","minimum":0,"maximum":9007199254740991},"bytes":{"type":"number","minimum":0},"compressedBytes":{"type":"number","minimum":0},"archives":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["folders","documents","bytes","compressedBytes","archives"],"additionalProperties":false},"approval":{"type":"object","properties":{"requestedAt":{"type":"string"},"requestedBy":{"type":"string"},"requestedDocs":{"type":"integer","minimum":0,"maximum":9007199254740991},"approvedAt":{"type":"string"},"approvedBy":{"type":"string"}},"required":["requestedAt","requestedBy","requestedDocs"],"additionalProperties":false},"selection":{"type":"object","properties":{"folderIds":{"type":"array","items":{"type":"string"}},"projectedDocs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["folderIds","projectedDocs"],"additionalProperties":false},"importTotals":{"type":"object","properties":{"extracted":{"type":"integer","minimum":0,"maximum":9007199254740991},"created":{"type":"integer","minimum":0,"maximum":9007199254740991},"duplicates":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["extracted","created","duplicates","failed"],"additionalProperties":false},"projectId":{"type":"string"},"checklistItemId":{"type":"string"},"subcontractorId":{"type":"string"},"assignedOnly":{"type":"boolean"},"uploadedBy":{"type":"string"},"filename":{"type":"string"},"matching":{"type":"object","properties":{"status":{"type":"string","enum":["waiting","matching","done","skipped","failed"]},"matchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"unmatchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"type":"string","enum":["locked","no_requirements","no_documents"]},"updatedAt":{"type":"string"}},"required":["status","updatedAt"],"additionalProperties":false}},"required":["preflightId","buildingId","customerId","documentId","objectKey","status","startedAt"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/archive-preflight/latest":{"get":{"summary":"Get the latest ZIP preflight for a building","tags":["Document Platform"],"description":"The most recent preflight run for the building, or null if it has never had one.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"nullable":true,"type":"object","properties":{"preflightId":{"type":"string"},"buildingId":{"type":"string"},"customerId":{"type":"string"},"documentId":{"type":"string"},"objectKey":{"type":"string"},"status":{"type":"string","enum":["scanning","ready","awaiting_approval","approved","importing","completed","cancelling","cancelled","failed"]},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"error":{"type":"string"},"totals":{"type":"object","properties":{"folders":{"type":"integer","minimum":0,"maximum":9007199254740991},"documents":{"type":"integer","minimum":0,"maximum":9007199254740991},"bytes":{"type":"number","minimum":0},"compressedBytes":{"type":"number","minimum":0},"archives":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["folders","documents","bytes","compressedBytes","archives"],"additionalProperties":false},"approval":{"type":"object","properties":{"requestedAt":{"type":"string"},"requestedBy":{"type":"string"},"requestedDocs":{"type":"integer","minimum":0,"maximum":9007199254740991},"approvedAt":{"type":"string"},"approvedBy":{"type":"string"}},"required":["requestedAt","requestedBy","requestedDocs"],"additionalProperties":false},"selection":{"type":"object","properties":{"folderIds":{"type":"array","items":{"type":"string"}},"projectedDocs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["folderIds","projectedDocs"],"additionalProperties":false},"importTotals":{"type":"object","properties":{"extracted":{"type":"integer","minimum":0,"maximum":9007199254740991},"created":{"type":"integer","minimum":0,"maximum":9007199254740991},"duplicates":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["extracted","created","duplicates","failed"],"additionalProperties":false},"projectId":{"type":"string"},"checklistItemId":{"type":"string"},"subcontractorId":{"type":"string"},"assignedOnly":{"type":"boolean"},"uploadedBy":{"type":"string"},"filename":{"type":"string"},"matching":{"type":"object","properties":{"status":{"type":"string","enum":["waiting","matching","done","skipped","failed"]},"matchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"unmatchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"type":"string","enum":["locked","no_requirements","no_documents"]},"updatedAt":{"type":"string"}},"required":["status","updatedAt"],"additionalProperties":false}},"required":["preflightId","buildingId","customerId","documentId","objectKey","status","startedAt"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/archive-preflight/{preflightId}":{"get":{"summary":"Get a ZIP preflight run","tags":["Document Platform"],"description":"A single preflight run by id.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"preflightId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"preflightId":{"type":"string"},"buildingId":{"type":"string"},"customerId":{"type":"string"},"documentId":{"type":"string"},"objectKey":{"type":"string"},"status":{"type":"string","enum":["scanning","ready","awaiting_approval","approved","importing","completed","cancelling","cancelled","failed"]},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"error":{"type":"string"},"totals":{"type":"object","properties":{"folders":{"type":"integer","minimum":0,"maximum":9007199254740991},"documents":{"type":"integer","minimum":0,"maximum":9007199254740991},"bytes":{"type":"number","minimum":0},"compressedBytes":{"type":"number","minimum":0},"archives":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["folders","documents","bytes","compressedBytes","archives"],"additionalProperties":false},"approval":{"type":"object","properties":{"requestedAt":{"type":"string"},"requestedBy":{"type":"string"},"requestedDocs":{"type":"integer","minimum":0,"maximum":9007199254740991},"approvedAt":{"type":"string"},"approvedBy":{"type":"string"}},"required":["requestedAt","requestedBy","requestedDocs"],"additionalProperties":false},"selection":{"type":"object","properties":{"folderIds":{"type":"array","items":{"type":"string"}},"projectedDocs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["folderIds","projectedDocs"],"additionalProperties":false},"importTotals":{"type":"object","properties":{"extracted":{"type":"integer","minimum":0,"maximum":9007199254740991},"created":{"type":"integer","minimum":0,"maximum":9007199254740991},"duplicates":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["extracted","created","duplicates","failed"],"additionalProperties":false},"projectId":{"type":"string"},"checklistItemId":{"type":"string"},"subcontractorId":{"type":"string"},"assignedOnly":{"type":"boolean"},"uploadedBy":{"type":"string"},"filename":{"type":"string"},"matching":{"type":"object","properties":{"status":{"type":"string","enum":["waiting","matching","done","skipped","failed"]},"matchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"unmatchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"type":"string","enum":["locked","no_requirements","no_documents"]},"updatedAt":{"type":"string"}},"required":["status","updatedAt"],"additionalProperties":false}},"required":["preflightId","buildingId","customerId","documentId","objectKey","status","startedAt"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/archive-preflight/{preflightId}/folder-tree":{"get":{"summary":"Get a ZIP preflight folder tree","tags":["Document Platform"],"description":"The archive's folder tree with recursive per-folder document counts and sizes, bounded; truncated flags an omitted tail.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"preflightId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"folders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parentId":{"type":"string"},"depth":{"type":"integer","minimum":0,"maximum":9007199254740991},"directDocs":{"type":"integer","minimum":0,"maximum":9007199254740991},"directBytes":{"type":"number","minimum":0},"totalDocs":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalBytes":{"type":"number","minimum":0},"types":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"bytes":{"type":"number","minimum":0}},"required":["type","count","bytes"],"additionalProperties":false}},"directArchives":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalArchives":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","name","depth","directDocs","directBytes","totalDocs","totalBytes","types","directArchives","totalArchives"],"additionalProperties":false}},"truncated":{"type":"boolean"}},"required":["folders","truncated"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/archive-preflight/{preflightId}/import-request":{"post":{"summary":"Request import of a ZIP preflight selection","tags":["Document Platform"],"description":"Record the uploader's chosen folders and run the batch cap gate. Returns the run: `approved` when the projected documents fit the remaining allowance, or `awaiting_approval` when they exceed it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"selectedFolderIds":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"string","maxLength":1024}}},"required":["selectedFolderIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"preflightId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"preflightId":{"type":"string"},"buildingId":{"type":"string"},"customerId":{"type":"string"},"documentId":{"type":"string"},"objectKey":{"type":"string"},"status":{"type":"string","enum":["scanning","ready","awaiting_approval","approved","importing","completed","cancelling","cancelled","failed"]},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"error":{"type":"string"},"totals":{"type":"object","properties":{"folders":{"type":"integer","minimum":0,"maximum":9007199254740991},"documents":{"type":"integer","minimum":0,"maximum":9007199254740991},"bytes":{"type":"number","minimum":0},"compressedBytes":{"type":"number","minimum":0},"archives":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["folders","documents","bytes","compressedBytes","archives"],"additionalProperties":false},"approval":{"type":"object","properties":{"requestedAt":{"type":"string"},"requestedBy":{"type":"string"},"requestedDocs":{"type":"integer","minimum":0,"maximum":9007199254740991},"approvedAt":{"type":"string"},"approvedBy":{"type":"string"}},"required":["requestedAt","requestedBy","requestedDocs"],"additionalProperties":false},"selection":{"type":"object","properties":{"folderIds":{"type":"array","items":{"type":"string"}},"projectedDocs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["folderIds","projectedDocs"],"additionalProperties":false},"importTotals":{"type":"object","properties":{"extracted":{"type":"integer","minimum":0,"maximum":9007199254740991},"created":{"type":"integer","minimum":0,"maximum":9007199254740991},"duplicates":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["extracted","created","duplicates","failed"],"additionalProperties":false},"projectId":{"type":"string"},"checklistItemId":{"type":"string"},"subcontractorId":{"type":"string"},"assignedOnly":{"type":"boolean"},"uploadedBy":{"type":"string"},"filename":{"type":"string"},"matching":{"type":"object","properties":{"status":{"type":"string","enum":["waiting","matching","done","skipped","failed"]},"matchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"unmatchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"type":"string","enum":["locked","no_requirements","no_documents"]},"updatedAt":{"type":"string"}},"required":["status","updatedAt"],"additionalProperties":false}},"required":["preflightId","buildingId","customerId","documentId","objectKey","status","startedAt"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/archive-preflight/{preflightId}/cancel":{"post":{"summary":"Cancel a ZIP preflight import","tags":["Document Platform"],"description":"Cancel a preflight that is waiting for selection or approval and remove its uploaded archive and scan output.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"preflightId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"preflightId":{"type":"string"},"buildingId":{"type":"string"},"customerId":{"type":"string"},"documentId":{"type":"string"},"objectKey":{"type":"string"},"status":{"type":"string","enum":["scanning","ready","awaiting_approval","approved","importing","completed","cancelling","cancelled","failed"]},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"error":{"type":"string"},"totals":{"type":"object","properties":{"folders":{"type":"integer","minimum":0,"maximum":9007199254740991},"documents":{"type":"integer","minimum":0,"maximum":9007199254740991},"bytes":{"type":"number","minimum":0},"compressedBytes":{"type":"number","minimum":0},"archives":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["folders","documents","bytes","compressedBytes","archives"],"additionalProperties":false},"approval":{"type":"object","properties":{"requestedAt":{"type":"string"},"requestedBy":{"type":"string"},"requestedDocs":{"type":"integer","minimum":0,"maximum":9007199254740991},"approvedAt":{"type":"string"},"approvedBy":{"type":"string"}},"required":["requestedAt","requestedBy","requestedDocs"],"additionalProperties":false},"selection":{"type":"object","properties":{"folderIds":{"type":"array","items":{"type":"string"}},"projectedDocs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["folderIds","projectedDocs"],"additionalProperties":false},"importTotals":{"type":"object","properties":{"extracted":{"type":"integer","minimum":0,"maximum":9007199254740991},"created":{"type":"integer","minimum":0,"maximum":9007199254740991},"duplicates":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["extracted","created","duplicates","failed"],"additionalProperties":false},"projectId":{"type":"string"},"checklistItemId":{"type":"string"},"subcontractorId":{"type":"string"},"assignedOnly":{"type":"boolean"},"uploadedBy":{"type":"string"},"filename":{"type":"string"},"matching":{"type":"object","properties":{"status":{"type":"string","enum":["waiting","matching","done","skipped","failed"]},"matchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"unmatchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"type":"string","enum":["locked","no_requirements","no_documents"]},"updatedAt":{"type":"string"}},"required":["status","updatedAt"],"additionalProperties":false}},"required":["preflightId","buildingId","customerId","documentId","objectKey","status","startedAt"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/archive-preflight/{preflightId}/approve":{"post":{"summary":"Approve an over-allowance ZIP import (Findable staff only)","tags":["Document Platform"],"description":"Clear an import that exceeds the document allowance: transitions the run from awaiting_approval to approved. Restricted to Findable staff (the Admin + customer-success sign-off), not the customer.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"preflightId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"preflightId":{"type":"string"},"buildingId":{"type":"string"},"customerId":{"type":"string"},"documentId":{"type":"string"},"objectKey":{"type":"string"},"status":{"type":"string","enum":["scanning","ready","awaiting_approval","approved","importing","completed","cancelling","cancelled","failed"]},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"error":{"type":"string"},"totals":{"type":"object","properties":{"folders":{"type":"integer","minimum":0,"maximum":9007199254740991},"documents":{"type":"integer","minimum":0,"maximum":9007199254740991},"bytes":{"type":"number","minimum":0},"compressedBytes":{"type":"number","minimum":0},"archives":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["folders","documents","bytes","compressedBytes","archives"],"additionalProperties":false},"approval":{"type":"object","properties":{"requestedAt":{"type":"string"},"requestedBy":{"type":"string"},"requestedDocs":{"type":"integer","minimum":0,"maximum":9007199254740991},"approvedAt":{"type":"string"},"approvedBy":{"type":"string"}},"required":["requestedAt","requestedBy","requestedDocs"],"additionalProperties":false},"selection":{"type":"object","properties":{"folderIds":{"type":"array","items":{"type":"string"}},"projectedDocs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["folderIds","projectedDocs"],"additionalProperties":false},"importTotals":{"type":"object","properties":{"extracted":{"type":"integer","minimum":0,"maximum":9007199254740991},"created":{"type":"integer","minimum":0,"maximum":9007199254740991},"duplicates":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["extracted","created","duplicates","failed"],"additionalProperties":false},"projectId":{"type":"string"},"checklistItemId":{"type":"string"},"subcontractorId":{"type":"string"},"assignedOnly":{"type":"boolean"},"uploadedBy":{"type":"string"},"filename":{"type":"string"},"matching":{"type":"object","properties":{"status":{"type":"string","enum":["waiting","matching","done","skipped","failed"]},"matchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"unmatchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"type":"string","enum":["locked","no_requirements","no_documents"]},"updatedAt":{"type":"string"}},"required":["status","updatedAt"],"additionalProperties":false}},"required":["preflightId","buildingId","customerId","documentId","objectKey","status","startedAt"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/insight-cards/":{"get":{"summary":"Get insight cards for a building","tags":["Document Platform","Insight Cards"],"description":"List all insight cards for a specific building","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}},"post":{"summary":"Create an insight card","tags":["Document Platform","Insight Cards"],"description":"Create a new insight card for a building. This triggers a background workflow to extract data from relevant documents.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["epc_rating","fire_safety_certificate","fire_alarm_layout","elevator_inspection","building_insurance_renewal","upcoming_lease_expiry","scheduled_rent_review","maintenance_overdue_alert","occupancy_vacancies","capex_budget","document_gaps"]},"locale":{"type":"string","enum":["en","no","fr","sv","fi","da"]}},"required":["type"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/insight-cards/reorder":{"patch":{"summary":"Reorder insight cards","tags":["Document Platform","Insight Cards"],"description":"Update the display order of insight cards for a building. Pass an array of card IDs in the desired order.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cardIds":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["cardIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/insight-cards/{insightCardId}":{"get":{"summary":"Get an insight card","tags":["Document Platform","Insight Cards"],"description":"Get a specific insight card by ID. Use for polling card status.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"insightCardId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}},"delete":{"summary":"Delete an insight card","tags":["Document Platform","Insight Cards"],"description":"Delete an insight card","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"insightCardId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/insight-cards/{insightCardId}/duplicate-thread":{"post":{"summary":"Duplicate chat thread for current user","tags":["Document Platform","Insight Cards"],"description":"Duplicates the insight card chat thread for the current user, allowing non-creator users to continue the conversation. Returns the new thread ID and updates the card.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sourceThreadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["sourceThreadId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"insightCardId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/insight-cards/{insightCardId}/process":{"post":{"summary":"Manually trigger insight card processing","tags":["Document Platform","Insight Cards"],"description":"Manually trigger the processing of a pending insight card. Useful for local development when workflow callbacks go to remote API. Disabled in production.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"insightCardId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/insight-cards/{insightCardId}/refresh":{"post":{"summary":"Refresh an insight card","tags":["Document Platform","Insight Cards"],"description":"Refresh an insight card by re-running the document search and workflow. This allows picking up new documents that have been added since the original insight was generated.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"locale":{"type":"string","enum":["en","no","fr","sv","fi","da"]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"insightCardId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/insight-cards/templates":{"get":{"summary":"Get available insight card templates","tags":["Document Platform","Insight Cards"],"description":"List all available insight card templates that can be created","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/insight-cards/classify":{"post":{"summary":"Classify user prompt for custom insight card","tags":["Document Platform","Insight Cards","Custom"],"description":"Analyse a natural language prompt to classify intent into a logic path (extractor, gap_finder, synthesizer, aggregator) and generate recipe suggestions.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":500},"buildingId":{"type":"string"},"availableCategories":{"type":"array","items":{"type":"string"}},"preferExtraction":{"type":"boolean"}},"required":["prompt"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/insight-cards/generate-config":{"post":{"summary":"Generate config for a selected recipe","tags":["Document Platform","Insight Cards","Custom"],"description":"Generate the full configuration for a selected recipe. This is step 2 of the two-step custom insight creation process.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userPrompt":{"type":"string","minLength":1,"maxLength":500},"recipe":{"type":"object","properties":{"path":{"type":"string","enum":["extractor","gap_finder","synthesizer","aggregator"]},"title":{"type":"string"},"description":{"type":"string"},"suggestedVisualization":{"type":"string","enum":["data_table","bar_chart","pie_chart","timeline","summary","gap_list","compliance_grid","status_card","key_takeaways","big_number","ask_insight"]}},"required":["path","title","description","suggestedVisualization"],"additionalProperties":false},"locale":{"type":"string"}},"required":["userPrompt","recipe"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/insight-cards/custom":{"post":{"summary":"Create a custom insight card","tags":["Document Platform","Insight Cards","Custom"],"description":"Create a custom insight card using a selected recipe and visualization. The card will be processed according to its logic path.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"recipe":{"type":"object","properties":{"path":{"type":"string","enum":["extractor","gap_finder","synthesizer","aggregator"]},"title":{"type":"string"},"description":{"type":"string"},"suggestedVisualization":{"type":"string","enum":["data_table","bar_chart","pie_chart","timeline","summary","gap_list","compliance_grid","status_card","key_takeaways","big_number","ask_insight"]},"config":{"type":"object","additionalProperties":{}}},"required":["path","title","description","suggestedVisualization","config"],"additionalProperties":false},"visualization":{"type":"string","enum":["data_table","bar_chart","pie_chart","timeline","summary","gap_list","compliance_grid","status_card","key_takeaways","big_number","ask_insight"]},"locale":{"type":"string","enum":["en","no","fr","sv","fi","da"]},"userPrompt":{"type":"string"}},"required":["recipe","visualization","userPrompt"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/collections":{"get":{"summary":"Get collections by building","tags":["Document Platform"],"description":"Retrieve all collections for a specific building","parameters":[{"schema":{"type":"string","enum":["mine","all"]},"in":"query","name":"owner","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"pinned","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List of collections","content":{"application/json":{"schema":{"description":"List of collections","type":"array","items":{"type":"object","additionalProperties":true}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"post":{"summary":"Create new collection","tags":["Document Platform"],"description":"Create a new collection within a building","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"description":{"type":"string"},"asWorkspace":{"type":"boolean"},"restrictUploadsToFolders":{"type":"boolean"},"integrationMetadata":{"type":"string","nullable":true}},"required":["name"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Created collection","content":{"application/json":{"schema":{"description":"Created collection","type":"object","additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/collections":{"get":{"summary":"Get collections by customer","tags":["Document Platform"],"description":"Retrieve collections for a customer, filtered by user access permissions","parameters":[{"schema":{"type":"string","enum":["mine","all"]},"in":"query","name":"owner","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"pinned","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List of collections","content":{"application/json":{"schema":{"description":"List of collections","type":"array","items":{"type":"object","additionalProperties":true}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/collections/{collectionId}":{"get":{"summary":"Get collection by ID","tags":["Document Platform"],"description":"Retrieve detailed information for a specific collection","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"collectionId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Collection details","content":{"application/json":{"schema":{"description":"Collection details","type":"object","additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"put":{"summary":"Update collection","tags":["Document Platform"],"description":"Update an existing collection name or description","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"description":{"type":"string"},"projectId":{"type":"string","format":"uuid"},"restrictUploadsToFolders":{"type":"boolean"},"integrationMetadata":{"type":"string","nullable":true}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"collectionId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Updated collection","content":{"application/json":{"schema":{"description":"Updated collection","type":"object","additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Delete collection","tags":["Document Platform"],"description":"Delete a collection (requires admin access to collection, building, or customer, or edit access to the owning project collection)","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"collectionId","required":true}],"security":[{"apiKey":[]}],"responses":{"204":{"description":"Collection deleted successfully","content":{"application/json":{"schema":{"description":"Collection deleted successfully"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/collections/{collectionId}/favorites":{"post":{"summary":"Pin collection","tags":["Document Platform"],"description":"Add a collection to the caller's pinned list","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"collectionId","required":true}],"security":[{"apiKey":[]}],"responses":{"204":{"description":"Collection pinned","content":{"application/json":{"schema":{"description":"Collection pinned"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Unpin collection","tags":["Document Platform"],"description":"Remove a collection from the caller's pinned list","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"collectionId","required":true}],"security":[{"apiKey":[]}],"responses":{"204":{"description":"Collection unpinned","content":{"application/json":{"schema":{"description":"Collection unpinned"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/collections/{collectionId}/documents":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documentIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"collectionId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documentIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"collectionId","required":true}],"responses":{"200":{"description":"Default Response"}}},"get":{"summary":"Get collection documents","tags":["Document Platform"],"description":"Retrieve all documents within a specific collection","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"collectionId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List of collection documents","content":{"application/json":{"schema":{"description":"List of collection documents","type":"array","items":{"type":"object","additionalProperties":true}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/collections/{collectionId}/documents-and-folders":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"folderIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documentIds","folderIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"collectionId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/collections/documents":{"delete":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["documentIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/collections/documents/count":{"post":{"summary":"Count documents by collection","tags":["Document Platform"],"description":"Get count of specified documents in collections within a building","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["documentIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Document count by collection ID","content":{"application/json":{"schema":{"description":"Document count by collection ID","type":"object","additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/collections/documents/{documentId}/collections":{"get":{"summary":"Get collections for document","tags":["Document Platform"],"description":"Retrieve all collections that contain a specific document","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List of collections containing the document","content":{"application/json":{"schema":{"description":"List of collections containing the document","type":"array","items":{"type":"object","additionalProperties":true}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/collections/{collectionId}/zip":{"post":{"summary":"Generate collection zip","tags":["Document Platform"],"description":"Start generating a zip file for all documents in a collection","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupBy":{"type":"string","enum":["flat","building_category","folder_structure"]},"locale":{"type":"string","enum":["en","no","fr"],"description":"Locale for folder names in the generated zip"},"projectId":{"type":"string","format":"uuid"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"collectionId","required":true}],"security":[{"apiKey":[]}],"responses":{"204":{"description":"Zip generation started successfully","content":{"application/json":{"schema":{"description":"Zip generation started successfully"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"collectionId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/collections/{collectionId}/zip/status":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"collectionId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/collections/{collectionId}/uploads/signed-url":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","minLength":1},"systemCode":{"type":"string"},"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"targetFolderId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["filename"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"collectionId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/collections/{collectionId}/uploads/multipart/initiate":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"filename":{"type":"string"},"systemCode":{"type":"string"},"projectId":{"type":"string","format":"uuid"},"targetFolderId":{"type":"string","format":"uuid"}},"required":["filename"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"collectionId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/collections/{collectionId}/uploads/multipart/urls":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"key":{"type":"string"},"numberOfParts":{"type":"number"},"uploadId":{"type":"string"},"projectId":{"type":"string","format":"uuid"}},"required":["key","numberOfParts","uploadId"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"collectionId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/collections/{collectionId}/uploads/multipart/finalize":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"key":{"type":"string"},"parts":{"type":"array","items":{"type":"object","properties":{"ETag":{"type":"string"},"PartNumber":{"type":"number"}},"required":["ETag","PartNumber"]}},"uploadId":{"type":"string"},"projectId":{"type":"string","format":"uuid"}},"required":["key","parts","uploadId"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"collectionId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/collections/{collectionId}/documents/batch/create":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object"},"maxItems":100},"targetFolderId":{"type":"string","format":"uuid"},"targetSubPath":{"type":"string"}},"required":["documents"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"collectionId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/uploads/signed-url":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","minLength":1},"collectionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"systemCode":{"nullable":true,"type":"string"},"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"checklistId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"checklistItemId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"target":{"anyOf":[{"type":"object","properties":{"tag":{"type":"string","enum":["building"]},"parentFolderId":{"type":"string"},"buildingCategory":{"type":"string"}},"required":["tag"],"additionalProperties":false},{"type":"object","properties":{"tag":{"type":"string","enum":["checklist-item"]},"checklistId":{"type":"string","minLength":1},"checklistItemId":{"type":"string","minLength":1},"projectId":{"type":"string"},"buildingCategory":{"type":"string"},"informationTypes":{"type":"array","items":{"type":"string"}}},"required":["tag","checklistId","checklistItemId"],"additionalProperties":false},{"type":"object","properties":{"tag":{"type":"string","enum":["collection"]},"collectionId":{"type":"string"}},"required":["tag","collectionId"],"additionalProperties":false},{"type":"object","properties":{"tag":{"type":"string","enum":["project-archive"]},"projectId":{"type":"string","minLength":1},"checklistItemId":{"type":"string","minLength":1}},"required":["tag","projectId"],"additionalProperties":false}]}},"required":["filename"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/uploads/multipart/initiate":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","minLength":1},"collectionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"systemCode":{"type":"string"},"target":{"anyOf":[{"type":"object","properties":{"tag":{"type":"string","enum":["building"]},"parentFolderId":{"type":"string"},"buildingCategory":{"type":"string"}},"required":["tag"],"additionalProperties":false},{"type":"object","properties":{"tag":{"type":"string","enum":["checklist-item"]},"checklistId":{"type":"string","minLength":1},"checklistItemId":{"type":"string","minLength":1},"projectId":{"type":"string"},"buildingCategory":{"type":"string"},"informationTypes":{"type":"array","items":{"type":"string"}}},"required":["tag","checklistId","checklistItemId"],"additionalProperties":false},{"type":"object","properties":{"tag":{"type":"string","enum":["collection"]},"collectionId":{"type":"string"}},"required":["tag","collectionId"],"additionalProperties":false},{"type":"object","properties":{"tag":{"type":"string","enum":["project-archive"]},"projectId":{"type":"string","minLength":1},"checklistItemId":{"type":"string","minLength":1}},"required":["tag","projectId"],"additionalProperties":false}]}},"required":["filename"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/uploads/multipart/urls":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"numberOfParts":{"type":"integer","minimum":1,"maximum":10000},"uploadId":{"type":"string"},"target":{"anyOf":[{"type":"object","properties":{"tag":{"type":"string","enum":["building"]},"parentFolderId":{"type":"string"},"buildingCategory":{"type":"string"}},"required":["tag"],"additionalProperties":false},{"type":"object","properties":{"tag":{"type":"string","enum":["checklist-item"]},"checklistId":{"type":"string","minLength":1},"checklistItemId":{"type":"string","minLength":1},"projectId":{"type":"string"},"buildingCategory":{"type":"string"},"informationTypes":{"type":"array","items":{"type":"string"}}},"required":["tag","checklistId","checklistItemId"],"additionalProperties":false},{"type":"object","properties":{"tag":{"type":"string","enum":["collection"]},"collectionId":{"type":"string"}},"required":["tag","collectionId"],"additionalProperties":false},{"type":"object","properties":{"tag":{"type":"string","enum":["project-archive"]},"projectId":{"type":"string","minLength":1},"checklistItemId":{"type":"string","minLength":1}},"required":["tag","projectId"],"additionalProperties":false}]}},"required":["key","numberOfParts","uploadId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/uploads/multipart/finalize":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"parts":{"minItems":1,"type":"array","items":{"type":"object","properties":{"ETag":{"type":"string"},"PartNumber":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["ETag","PartNumber"],"additionalProperties":false}},"uploadId":{"type":"string"},"target":{"anyOf":[{"type":"object","properties":{"tag":{"type":"string","enum":["building"]},"parentFolderId":{"type":"string"},"buildingCategory":{"type":"string"}},"required":["tag"],"additionalProperties":false},{"type":"object","properties":{"tag":{"type":"string","enum":["checklist-item"]},"checklistId":{"type":"string","minLength":1},"checklistItemId":{"type":"string","minLength":1},"projectId":{"type":"string"},"buildingCategory":{"type":"string"},"informationTypes":{"type":"array","items":{"type":"string"}}},"required":["tag","checklistId","checklistItemId"],"additionalProperties":false},{"type":"object","properties":{"tag":{"type":"string","enum":["collection"]},"collectionId":{"type":"string"}},"required":["tag","collectionId"],"additionalProperties":false},{"type":"object","properties":{"tag":{"type":"string","enum":["project-archive"]},"projectId":{"type":"string","minLength":1},"checklistItemId":{"type":"string","minLength":1}},"required":["tag","projectId"],"additionalProperties":false}]}},"required":["key","parts","uploadId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/ask-attachments/{documentId}":{"get":{"summary":"Get ask attachment document by id","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/ask-attachments/{documentId}/get-signed-url":{"get":{"summary":"Get signed url for ask attachment document","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/ask-attachments/uploads/signed-url":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","minLength":1},"size":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["filename","size"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/documents/merge":{"post":{"summary":"Merge multiple PDF documents into a single PDF","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["documentIds"],"properties":{"documentIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":2,"maxItems":100,"description":"Array of document IDs to merge (2-100 documents)"},"mergedFilename":{"type":"string","description":"Optional filename for the merged PDF (default: merged_N_documents_YYYY-MM-DD.pdf)"},"archiveOriginals":{"type":"boolean","default":false,"description":"Whether to archive the original documents after merging (default: false)"},"categoryId":{"type":"string","description":"Optional category code for merged document. If provided, uses this category. If omitted and first document has a category, inherits from first document. Otherwise, triggers AI classification."},"folderId":{"type":"string","format":"uuid","description":"Optional folder ID for merged document. If omitted, uses first document's folder."}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"mergedDocument":{"type":"object"},"archivedDocuments":{"type":"array","items":{"type":"string"}},"errors":{"type":"array","items":{"type":"string"}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/{documentId}/analyze-split":{"get":{"summary":"Analyse PDF document for splitting suggestions using AI","tags":["Document Platform"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"model","required":false,"description":"OpenAI model to use (e.g., gpt-5-pro, gpt-5, gpt-5-mini)"},{"schema":{"type":"string","enum":["minimal","low","medium","high"]},"in":"query","name":"reasoningEffort","required":false,"description":"Reasoning effort level (not supported for gpt-5-pro)"},{"schema":{"type":"string","enum":["low","medium","high"]},"in":"query","name":"verbosity","required":false,"description":"Verbosity level for response text"},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string"},"totalPages":{"type":"number"},"splitSuggestions":{"type":"array","items":{"type":"object","properties":{"startPage":{"type":"number"},"endPage":{"type":"number"},"suggestedName":{"type":"string"},"description":{"type":"string"},"confidence":{"type":"number"},"documentType":{"type":"string"}}}},"summary":{"type":"string"},"recommendSplit":{"type":"boolean"},"reasoning":{"type":"string"},"metadata":{"type":"object"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/{documentId}/split":{"post":{"summary":"Split a PDF document into multiple documents","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["splits"],"properties":{"splits":{"type":"array","items":{"type":"object","required":["startPage","endPage","name"],"properties":{"startPage":{"type":"number","minimum":1,"description":"Starting page number (1-indexed)"},"endPage":{"type":"number","minimum":1,"description":"Ending page number (1-indexed, inclusive)"},"name":{"type":"string","minLength":1,"maxLength":255,"description":"Name for the split document"}}},"minItems":1,"maxItems":100,"description":"Array of page ranges to split (1-100 splits)"},"archiveOriginal":{"type":"boolean","default":false,"description":"Whether to archive the original document after splitting (default: false)"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"newDocuments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"pageCount":{"type":"number"}}}},"archivedOriginal":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/{documentId}/repair":{"post":{"summary":"Repair a corrupt PDF document using Ghostscript","tags":["Document Platform"],"description":"Attempts to repair a PDF with invalid internal structure using Ghostscript. The repaired PDF replaces the original in-place.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"document":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"pageCount":{"type":"number"},"size":{"type":"number"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/reprocess-metadata":{"post":{"summary":"Reprocess metadata for multiple documents using AI","tags":["Document Platform"],"description":"Analyses PDF documents with AI to extract updated metadata suggestions. Returns both original and suggested metadata for comparison.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["documentIds"],"properties":{"documentIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":10,"description":"Array of document IDs to reprocess (1-10 documents, ~45s each)"},"fieldsToExtract":{"type":"array","items":{"type":"string"},"description":"Optional: specific metadata fields to extract (extracts all if not provided)"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/reprocess-pipeline":{"post":{"summary":"Reprocess documents through the full processing pipeline","tags":["Document Platform"],"description":"Re-runs the processing pipeline (content extraction, classification, metadata extraction, auto-labelling, embedding) on documents that already exist, by starting a Temporal processingWorkflow per document. It does NOT re-run upload-time extraction: archives are not unpacked and no new documents are created, with one exception - a .msg/.eml document additionally has its file attachments promoted to their own documents, linked back to the email. To unpack an archive, re-upload it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["documentIds"],"properties":{"documentIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":50,"description":"Array of document IDs to reprocess (1-50 documents)"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"totalRequested":{"type":"number"},"successful":{"type":"number"},"failed":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string"},"error":{"type":"string"}}}},"warning":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents":{"get":{"summary":"Get building documents with pagination","tags":["Document Platform"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":10000},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string"},"in":"query","name":"nextToken","required":false},{"schema":{"type":"boolean"},"in":"query","name":"includeDuplicatesCount","required":false},{"schema":{"type":"boolean"},"in":"query","name":"includePaused","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/v2/documents":{"get":{"summary":"Get building documents with pagination","tags":["Document Platform"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":10000},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string"},"in":"query","name":"nextToken","required":false},{"schema":{"type":"boolean"},"in":"query","name":"includeDuplicatesCount","required":false},{"schema":{"type":"boolean"},"in":"query","name":"includePaused","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/metadata-facets":{"get":{"summary":"Get distinct metadata values across a building's documents","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"fileTypes":{"type":"array","items":{"type":"string"}},"buildingCategories":{"type":"array","items":{"type":"string"}},"disciplines":{"type":"array","items":{"type":"string"}},"informationTypes":{"type":"array","items":{"type":"string"}},"systems":{"type":"array","items":{"type":"string"}},"locations":{"type":"array","items":{"type":"string"}},"floors":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}}},"required":["fileTypes","buildingCategories","disciplines","informationTypes","systems","locations","floors","tags"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/duplicates":{"get":{"summary":"Get duplicate documents that can be archived","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/duplicates/grouped":{"get":{"summary":"Get grouped duplicate documents with keeping/archiving distinction","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"object","properties":{"checksum":{"type":"string"},"keeping":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"size":{"type":"number"},"createdAt":{"type":"string"}},"required":["id","filename","size","createdAt"],"additionalProperties":false},"archiving":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"size":{"type":"number"},"createdAt":{"type":"string"}},"required":["id","filename","size","createdAt"],"additionalProperties":false}}},"required":["checksum","keeping","archiving"],"additionalProperties":false}},"protectedCounts":{"type":"object","properties":{"deficiencyReport":{"type":"number"},"sharepoint":{"type":"number"},"privateFolder":{"type":"number"},"total":{"type":"number"}},"required":["deficiencyReport","sharepoint","privateFolder","total"],"additionalProperties":false},"summary":{"type":"object","properties":{"totalGroups":{"type":"number"},"totalArchiving":{"type":"number"},"totalSizeReclaimed":{"type":"number"}},"required":["totalGroups","totalArchiving","totalSizeReclaimed"],"additionalProperties":false}},"required":["groups","protectedCounts","summary"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/drawings":{"get":{"summary":"Get building drawings (optimised with GSI)","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/v2/drawings":{"get":{"summary":"Get building drawings (optimised with GSI)","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/drawings/paginated":{"get":{"summary":"Get building drawings with cursor-based pagination","tags":["Document Platform"],"parameters":[{"schema":{"type":"number","minimum":1,"maximum":1000,"default":1000},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false,"description":"Pagination cursor from previous response"},{"schema":{"type":"boolean"},"in":"query","name":"autoFetchAll","required":false,"description":"Enable automatic fetching of all pages on the client"},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/v2/drawings/paginated":{"get":{"summary":"Get building drawings with cursor-based pagination","tags":["Document Platform"],"parameters":[{"schema":{"type":"number","minimum":1,"maximum":1000,"default":1000},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false,"description":"Pagination cursor from previous response"},{"schema":{"type":"boolean"},"in":"query","name":"autoFetchAll","required":false,"description":"Enable automatic fetching of all pages on the client"},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/recent-uploads/paginated":{"get":{"summary":"Get recent uploads with cursor-based pagination and sorting","tags":["Document Platform"],"parameters":[{"schema":{"type":"number","minimum":1,"maximum":1000,"default":1000},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false,"description":"Pagination cursor from previous response"},{"schema":{"type":"boolean","default":false},"in":"query","name":"showHidden","required":false,"description":"Include user-hidden documents in the response"},{"schema":{"type":"string","enum":["createdAt"],"default":"createdAt"},"in":"query","name":"sortBy","required":false,"description":"Field to sort by"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"in":"query","name":"sortOrder","required":false,"description":"Sort order"},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/v2/recent-uploads/paginated":{"get":{"summary":"Get recent uploads with cursor-based pagination and sorting","tags":["Document Platform"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":1000},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["createdAt"]},"in":"query","name":"sortBy","required":false},{"schema":{"type":"string","enum":["asc","desc"]},"in":"query","name":"sortOrder","required":false},{"schema":{"type":"boolean"},"in":"query","name":"showHidden","required":false},{"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"in":"query","name":"createdAfter","required":false},{"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"in":"query","name":"createdBefore","required":false},{"schema":{"type":"string"},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"query","name":"drawingType","required":false},{"schema":{"type":"string"},"in":"query","name":"category","required":false},{"schema":{"type":"string"},"in":"query","name":"discipline","required":false},{"schema":{"type":"boolean"},"in":"query","name":"isDrawing","required":false},{"schema":{"type":"boolean"},"in":"query","name":"asBuilt","required":false},{"schema":{"type":"string"},"in":"query","name":"uploadedByUserIds","required":false},{"schema":{"type":"boolean"},"in":"query","name":"uploadedByIntegration","required":false},{"schema":{"type":"boolean"},"in":"query","name":"uploadedByApiKey","required":false},{"schema":{"type":"string"},"in":"query","name":"systems","required":false},{"schema":{"type":"string"},"in":"query","name":"locations","required":false},{"schema":{"type":"string"},"in":"query","name":"tags","required":false},{"schema":{"type":"string"},"in":"query","name":"informationTypes","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/paused-documents/paginated":{"get":{"summary":"List paused (Unprocessed) documents with cursor-based pagination","tags":["Document Platform"],"parameters":[{"schema":{"type":"number","minimum":1,"maximum":1000,"default":1000},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false,"description":"Pagination cursor from previous response"},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/paused-documents/count":{"get":{"summary":"Count paused (Unprocessed) documents the caller can access","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/corrupt-documents/paginated":{"get":{"summary":"List corrupt and processing-failed documents with cursor-based pagination","tags":["Document Platform"],"parameters":[{"schema":{"type":"number","minimum":1,"maximum":1000,"default":1000},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false,"description":"Pagination cursor from previous response"},{"schema":{"type":"string","maxLength":512},"in":"query","name":"fileTypes","required":false,"description":"Comma-separated canonical file-type keys to narrow to (e.g. \"eml,msg\"). Use \"__none__\" to match files with no extension. Leading dots and case are tolerated. An unknown type yields an empty result, not an error."},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/corrupt-documents/count":{"get":{"summary":"Count corrupt and processing-failed documents the caller can access","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/corrupt-documents/file-types":{"get":{"summary":"Count documents needing review by file type","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/archived":{"get":{"summary":"Get archived building documents with pagination","tags":["Document Platform"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":10000},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string"},"in":"query","name":"nextToken","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/v2/documents/archived":{"get":{"summary":"Get archived building documents with pagination","tags":["Document Platform"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":10000},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string"},"in":"query","name":"nextToken","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/{documentId}/archived":{"get":{"summary":"Get single archived document by id","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/{documentId}/similar":{"get":{"summary":"Get semantically similar documents for this document","tags":["Document Platform"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"number","minimum":0},"in":"query","name":"maximumDistance","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"sourceDocumentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"filename":{"type":"string"},"distance":{"type":"number"},"similarity":{"type":"number","minimum":0,"maximum":1},"previewUrl":{"type":"string"}},"required":["sourceDocumentId","documentId","filename","distance","similarity"],"additionalProperties":false}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/{documentId}/relationships/discover":{"post":{"summary":"Discover relationships for a document","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"referenceDocumentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentsAnalyzed":{"type":"number"},"relationships":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["latest_version_of","supplemental_to","attachment_of","supersedes"]},"sourceDocumentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"relatedDocumentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reasoning":{"type":"string"},"confidence":{"type":"string","enum":["high","medium","low"]}},"required":["type","sourceDocumentId","relatedDocumentId","reasoning","confidence"],"additionalProperties":false}}},"required":["referenceDocumentId","documentsAnalyzed","relationships"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/{documentId}":{"get":{"summary":"Get document by id","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"put":{"summary":"Update a document","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"update":{"type":"object","properties":{"isRelevant":{"type":"boolean"},"filename":{"type":"string"},"filenameDescriptive":{"nullable":true,"type":"string"},"drawingType":{"type":"string","enum":["floor","detail/section","outdoors","elevation","unknown"]},"description":{"type":"object","properties":{"en":{"type":"string"},"no":{"type":"string"},"fr":{"type":"string"},"sv":{"type":"string"},"fi":{"type":"string"},"da":{"type":"string"}},"additionalProperties":false},"summaries":{"type":"object","properties":{"en":{"type":"object","properties":{"short":{"nullable":true,"type":"string"},"long":{"nullable":true,"type":"string"}},"additionalProperties":false},"no":{"type":"object","properties":{"short":{"nullable":true,"type":"string"},"long":{"nullable":true,"type":"string"}},"additionalProperties":false},"fr":{"type":"object","properties":{"short":{"nullable":true,"type":"string"},"long":{"nullable":true,"type":"string"}},"additionalProperties":false},"sv":{"type":"object","properties":{"short":{"nullable":true,"type":"string"},"long":{"nullable":true,"type":"string"}},"additionalProperties":false},"fi":{"type":"object","properties":{"short":{"nullable":true,"type":"string"},"long":{"nullable":true,"type":"string"}},"additionalProperties":false},"da":{"type":"object","properties":{"short":{"nullable":true,"type":"string"},"long":{"nullable":true,"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"rotation":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[90]},{"type":"number","enum":[180]},{"type":"number","enum":[270]}]},"sourceMetadata":{"type":"object","additionalProperties":{}},"buildingCategory":{"type":"string"},"serialNumber":{"type":"string"},"discipline":{"type":"string"},"drawingDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"documentDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"informationTypes":{"type":"array","items":{"type":"string"}},"systems":{"type":"array","items":{"type":"string"}},"locations":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"projectId":{"nullable":true,"type":"string"},"floor":{"type":"string"},"zone":{"type":"string"},"drawingNumber":{"type":"string"},"drawingTitle":{"type":"string"},"drawingRevision":{"type":"string"}},"additionalProperties":false}},"required":["update"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"post":{"summary":"Creates a document entry in Dynamo","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string"},"originalPath":{"type":"string"},"s3Key":{"type":"string"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"parentFolderId":{"type":"string"},"buildingCategory":{"type":"string"},"informationTypes":{"type":"array","items":{"type":"string"}},"md5Checksum":{"type":"string"},"corrupt":{"type":"boolean"},"group":{"type":"string"},"projectId":{"type":"string"},"packageId":{"type":"string"},"uploadedBy":{"type":"string"},"originalCreatedAt":{"type":"string"},"serialNumber":{"type":"string"},"subContractorId":{"type":"string"},"systems":{"type":"array","items":{"type":"string"}},"processingStatus":{"type":"string","enum":["queued","processing","done","failed","skipped"]},"source":{"type":"string"},"sharepointItemId":{"type":"string"},"sharepointMetadata":{"type":"object","additionalProperties":{}},"sharepointQuickXorHash":{"type":"string"},"sharepointContentHash":{"type":"string"},"importCollectionName":{"type":"string"}},"required":["filename","originalPath","s3Key","size"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/{documentId}/get-signed-url":{"get":{"summary":"Get signed url for document","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/{documentId}/dwg-viewer":{"get":{"summary":"Get Autodesk viewer data for CAD documents (DWG, IFC)","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/{documentId}/get-signed-url/archived":{"get":{"summary":"Get signed url for archived document","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/{documentId}/text":{"get":{"summary":"Get full extracted text for a document","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/{documentId}/pages/{pageNumber}/text":{"get":{"summary":"Get page text for a document","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"in":"path","name":"pageNumber","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/reports-pdf/signed-url":{"post":{"summary":"Get presigned URL to upload PDF to Reports folder","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string"},"folderName":{"type":"string"},"size":{"type":"number","minimum":0,"exclusiveMinimum":true}},"required":["filename","folderName","size"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/batch/create":{"post":{"summary":"Batch create documents for a building","tags":["Document Platform"],"description":"**DEPRECATED**: This route is deprecated. Please use `/internal/customers/:customerId/buildings/:buildingId/documents/batch/create` instead. This route will be removed in a future version.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documents"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"deprecated":true,"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/batch/update":{"post":{"summary":"Batch update documents for a building","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"updates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":{}}}},"required":["updates"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents-and-folders/batch/update":{"post":{"summary":"Bulk update documents and folders for a building","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"folderIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"updates":{"type":"object","additionalProperties":{}}},"required":["documentIds","folderIds","updates"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/batch/archive":{"post":{"summary":"Batch archive documents","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["documentIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents-and-folders/batch/archive":{"post":{"summary":"Batch archive documents and folders. Selections that include a folder (or exceed the inline threshold) start a Temporal workflow and return 202 + workflowId; poll /archive/:workflowId/status.","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"maxItems":5000,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"folderIds":{"maxItems":1000,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["documentIds","folderIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"workflowId":{"type":"string"}},"required":["success","message","workflowId"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents-and-folders/archive/{workflowId}/status":{"get":{"summary":"Get progress of a running or recently-completed archive workflow.","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"workflowId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"workflowId":{"type":"string"},"progress":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["preparing","running","cleaning-up","completed","failed"]},"discoveredCount":{"default":0,"type":"number"},"totalRequested":{"default":0,"type":"number"},"totalProcessed":{"default":0,"type":"number"},"totalArchived":{"default":0,"type":"number"},"totalHardDeleted":{"default":0,"type":"number"},"totalFiltered":{"default":0,"type":"number"},"totalBatches":{"default":0,"type":"number"},"currentBatch":{"default":0,"type":"number"},"foldersRequested":{"default":0,"type":"number"},"foldersRemoved":{"default":0,"type":"number"},"foldersSkipped":{"default":0,"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"kind":{"default":"batch","type":"string","enum":["batch","folder-cleanup"]},"documentIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"message":{"type":"string"}},"required":["kind","documentIds","message"],"additionalProperties":false}},"counterErrorCount":{"default":0,"type":"number"},"startedAt":{"type":"string"},"completedAt":{"nullable":true,"type":"string"},"message":{"type":"string"}},"required":["status","discoveredCount","totalRequested","totalProcessed","totalArchived","totalHardDeleted","totalFiltered","totalBatches","currentBatch","foldersRequested","foldersRemoved","foldersSkipped","errors","counterErrorCount","startedAt","completedAt","message"],"additionalProperties":false}},"required":["success","message","workflowId","progress"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/batch/restore":{"post":{"summary":"Batch restore documents","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["documentIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/archive/batch/delete":{"post":{"summary":"Batch delete documents from archive","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["documentIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/batch/read":{"post":{"summary":"Batch read documents for chat sidebar","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"maxItems":500,"type":"array","items":{"type":"string"}},"buildingIds":{"maxItems":50,"type":"array","items":{"type":"string"}}},"required":["documentIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/check-private-subtree":{"post":{"summary":"Check which documents are in private folder subtrees","tags":["Document Platform"],"description":"Returns which documents from the provided list are in private folder subtrees. Documents in private subtrees will be permanently deleted (not archived) when archiving.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["documentIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/duplicates/archive":{"post":{"summary":"Archive duplicate documents for a building. Starts a Temporal workflow and returns 202 + workflowId; poll /documents-and-folders/archive/:workflowId/status.","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keepOldest":{"default":true,"type":"boolean"}},"required":["keepOldest"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"workflowId":{"type":"string"}},"required":["success","message","workflowId"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents-and-folders/relocate":{"post":{"summary":"Start an async workflow to relocate documents and folders between buildings. Returns a workflowId; poll /status for progress.","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"toBuildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"folderIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["toBuildingId","documentIds","folderIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"workflowId":{"type":"string"}},"required":["success","message","workflowId"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents-and-folders/relocate/{workflowId}/status":{"get":{"summary":"Get progress of a running or recently-completed relocation workflow.","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"workflowId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"workflowId":{"type":"string"},"progress":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["preparing","running","completed","failed"]},"totalRequested":{"type":"number"},"totalProcessed":{"type":"number"},"totalBatches":{"type":"number"},"currentBatch":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"message":{"type":"string"}},"required":["documentIds","message"],"additionalProperties":false}},"counterErrorCount":{"default":0,"type":"number"},"startedAt":{"type":"string"},"completedAt":{"nullable":true,"type":"string"},"message":{"type":"string"}},"required":["status","totalRequested","totalProcessed","totalBatches","currentBatch","errors","counterErrorCount","startedAt","completedAt","message"],"additionalProperties":false}},"required":["success","message","workflowId","progress"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/documents/relationships/batch":{"post":{"summary":"Batch fetch outgoing + incoming document relationships","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"kind":{"type":"string","enum":["latest_version_of","supplemental_to","attachment_of","supersedes"]}},"required":["documentIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"object","properties":{"outgoing":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceDocumentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"targetDocumentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["latest_version_of","supplemental_to","attachment_of","supersedes"]},"createdAt":{},"createdBy":{"type":"string"},"subtype":{"type":"string","enum":["side_letter","deed_of_variation","rent_review_memorandum","licence_for_alterations","wayleave_agreement","statutory_declaration","settlement_deed","landlord_change_notice","heads_of_terms","other"]},"confidence":{"type":"string","enum":["high","medium","low"]},"reasoning":{"type":"string"},"status":{"type":"string","enum":["suggested","confirmed"]}},"required":["customerId","sourceDocumentId","targetDocumentId","kind","createdAt","createdBy"],"additionalProperties":false}},"incoming":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceDocumentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"targetDocumentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["latest_version_of","supplemental_to","attachment_of","supersedes"]},"createdAt":{},"createdBy":{"type":"string"},"subtype":{"type":"string","enum":["side_letter","deed_of_variation","rent_review_memorandum","licence_for_alterations","wayleave_agreement","statutory_declaration","settlement_deed","landlord_change_notice","heads_of_terms","other"]},"confidence":{"type":"string","enum":["high","medium","low"]},"reasoning":{"type":"string"},"status":{"type":"string","enum":["suggested","confirmed"]}},"required":["customerId","sourceDocumentId","targetDocumentId","kind","createdAt","createdBy"],"additionalProperties":false}},"relatedDocumentBuildings":{"type":"object","additionalProperties":{"type":"string"}}},"required":["outgoing","incoming"],"additionalProperties":false}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/documents/{documentId}/family":{"get":{"summary":"Get the resolved relationship family of a document","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"rootId":{"type":"string"},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"buildingId":{"type":"string"},"documentDate":{"nullable":true,"type":"string"},"dateEvidence":{"type":"string"},"folderPath":{"type":"string"}},"required":["id","filename","buildingId","documentDate"],"additionalProperties":false}},"edges":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceDocumentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"targetDocumentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["latest_version_of","supplemental_to","attachment_of","supersedes"]},"createdAt":{},"createdBy":{"type":"string"},"subtype":{"type":"string","enum":["side_letter","deed_of_variation","rent_review_memorandum","licence_for_alterations","wayleave_agreement","statutory_declaration","settlement_deed","landlord_change_notice","heads_of_terms","other"]},"confidence":{"type":"string","enum":["high","medium","low"]},"reasoning":{"type":"string"},"status":{"type":"string","enum":["suggested","confirmed"]}},"required":["customerId","sourceDocumentId","targetDocumentId","kind","createdAt","createdBy"],"additionalProperties":false}},"truncated":{"type":"boolean"}},"required":["rootId","nodes","edges","truncated"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/documents/{documentId}/relationships/outgoing":{"get":{"summary":"List outgoing document relationships","tags":["Document Platform"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":10000},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string"},"in":"query","name":"nextToken","required":false},{"schema":{"type":"string","enum":["latest_version_of","supplemental_to","attachment_of","supersedes"]},"in":"query","name":"kind","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceDocumentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"targetDocumentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["latest_version_of","supplemental_to","attachment_of","supersedes"]},"createdAt":{},"createdBy":{"type":"string"},"subtype":{"type":"string","enum":["side_letter","deed_of_variation","rent_review_memorandum","licence_for_alterations","wayleave_agreement","statutory_declaration","settlement_deed","landlord_change_notice","heads_of_terms","other"]},"confidence":{"type":"string","enum":["high","medium","low"]},"reasoning":{"type":"string"},"status":{"type":"string","enum":["suggested","confirmed"]}},"required":["customerId","sourceDocumentId","targetDocumentId","kind","createdAt","createdBy"],"additionalProperties":false}},"nextToken":{"nullable":true,"type":"string"},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/documents/{documentId}/relationships/incoming":{"get":{"summary":"List incoming document relationships","tags":["Document Platform"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":10000},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string"},"in":"query","name":"nextToken","required":false},{"schema":{"type":"string","enum":["latest_version_of","supplemental_to","attachment_of","supersedes"]},"in":"query","name":"kind","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceDocumentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"targetDocumentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["latest_version_of","supplemental_to","attachment_of","supersedes"]},"createdAt":{},"createdBy":{"type":"string"},"subtype":{"type":"string","enum":["side_letter","deed_of_variation","rent_review_memorandum","licence_for_alterations","wayleave_agreement","statutory_declaration","settlement_deed","landlord_change_notice","heads_of_terms","other"]},"confidence":{"type":"string","enum":["high","medium","low"]},"reasoning":{"type":"string"},"status":{"type":"string","enum":["suggested","confirmed"]}},"required":["customerId","sourceDocumentId","targetDocumentId","kind","createdAt","createdBy"],"additionalProperties":false}},"nextToken":{"nullable":true,"type":"string"},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/documents/{documentId}/relationships/{targetDocumentId}":{"get":{"summary":"Get a document relationship","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","enum":["latest_version_of","supplemental_to","attachment_of","supersedes"]},"in":"query","name":"kind","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"targetDocumentId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceDocumentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"targetDocumentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["latest_version_of","supplemental_to","attachment_of","supersedes"]},"createdAt":{},"createdBy":{"type":"string"},"subtype":{"type":"string","enum":["side_letter","deed_of_variation","rent_review_memorandum","licence_for_alterations","wayleave_agreement","statutory_declaration","settlement_deed","landlord_change_notice","heads_of_terms","other"]},"confidence":{"type":"string","enum":["high","medium","low"]},"reasoning":{"type":"string"},"status":{"type":"string","enum":["suggested","confirmed"]}},"required":["customerId","sourceDocumentId","targetDocumentId","kind","createdAt","createdBy"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Delete a document relationship","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","enum":["latest_version_of","supplemental_to","attachment_of","supersedes"]},"in":"query","name":"kind","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"targetDocumentId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/documents/{documentId}/relationships":{"post":{"summary":"Create a document relationship","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"targetDocumentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["latest_version_of","supplemental_to","attachment_of","supersedes"]},"subtype":{"type":"string","enum":["side_letter","deed_of_variation","rent_review_memorandum","licence_for_alterations","wayleave_agreement","statutory_declaration","settlement_deed","landlord_change_notice","heads_of_terms","other"]}},"required":["targetDocumentId","kind"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceDocumentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"targetDocumentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["latest_version_of","supplemental_to","attachment_of","supersedes"]},"createdAt":{},"createdBy":{"type":"string"},"subtype":{"type":"string","enum":["side_letter","deed_of_variation","rent_review_memorandum","licence_for_alterations","wayleave_agreement","statutory_declaration","settlement_deed","landlord_change_notice","heads_of_terms","other"]},"confidence":{"type":"string","enum":["high","medium","low"]},"reasoning":{"type":"string"},"status":{"type":"string","enum":["suggested","confirmed"]}},"required":["customerId","sourceDocumentId","targetDocumentId","kind","createdAt","createdBy"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/document-inbox/":{"get":{"summary":"Get document inbox items","tags":["Document Platform"],"description":"Retrieve all document inbox items for a customer, sorted by creation date","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/document-inbox/{id}":{"put":{"summary":"Update document inbox item","tags":["Document Platform"],"description":"Update metadata for a specific document inbox item","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"processingState":{"type":"string","enum":["RECEIVED","DONE","DELETED","AUTO_IMPORTED","NO_ATTACHMENTS","FORWARDING_VERIFICATION"]},"buildingId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/document-inbox/upload":{"post":{"summary":"Upload document inbox attachments","tags":["Document Platform"],"description":"Upload email attachments from document inbox to a specific building","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["messageId","buildingId","attachmentIds"],"properties":{"messageId":{"type":"string","minLength":1},"buildingId":{"type":"string","format":"uuid"},"attachmentIds":{"type":"array","minItems":1,"items":{"type":"string","format":"uuid"}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/document-inbox/{messageId}/attachments/{attachmentId}":{"delete":{"summary":"Delete document inbox attachment","tags":["Document Platform"],"description":"Delete a specific attachment from a document inbox email","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"messageId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"attachmentId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/document-inbox/{messageId}/merge-attachments":{"post":{"summary":"Merge document inbox attachments","tags":["Document Platform"],"description":"Merge multiple PDF attachments from a document inbox email into a single PDF","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["attachmentUuids"],"properties":{"attachmentUuids":{"type":"array","minItems":2,"maxItems":100,"items":{"type":"string","format":"uuid"}},"mergedFilename":{"type":"string"},"removeOriginals":{"type":"boolean","default":false}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"messageId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/document-inbox/signed-url":{"get":{"summary":"Get signed URL for attachment","tags":["Document Platform"],"description":"Generate a signed URL to download a document inbox attachment from S3","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"s3Key","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/portfolios/{id}":{"get":{"summary":"Get portfolio by ID","tags":["Document Platform"],"description":"Retrieve detailed information for a specific portfolio with buildings","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Portfolio details with associated buildings","content":{"application/json":{"schema":{"description":"Portfolio details with associated buildings","type":"object","properties":{"id":{"type":"string","format":"uuid"},"alias":{"type":"string"},"address":{"type":"string"},"customerId":{"type":"string","format":"uuid"},"isFavorite":{"type":"boolean"},"buildings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"alias":{"type":"string"},"customerId":{"type":"string","format":"uuid"},"address":{"type":"string"},"isFavorite":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"additionalProperties":true}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"put":{"summary":"Update portfolio","tags":["Document Platform"],"description":"Update an existing portfolio and its building associations","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"alias":{"type":"string","minLength":1},"address":{"type":"string"},"buildingIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Updated portfolio with buildings","content":{"application/json":{"schema":{"description":"Updated portfolio with buildings","type":"object","properties":{"id":{"type":"string","format":"uuid"},"alias":{"type":"string"},"address":{"type":"string"},"customerId":{"type":"string","format":"uuid"},"isFavorite":{"type":"boolean"},"buildings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"alias":{"type":"string"},"customerId":{"type":"string","format":"uuid"},"address":{"type":"string"},"isFavorite":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"additionalProperties":true}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Delete portfolio","tags":["Document Platform"],"description":"Hard delete a portfolio and its associations","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"apiKey":[]}],"responses":{"204":{"description":"Portfolio successfully deleted"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/portfolios/":{"get":{"summary":"Get all portfolios","tags":["Document Platform"],"description":"Retrieve portfolios for a customer that the user has access to","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List of portfolios with buildings (filtered by user permissions)","content":{"application/json":{"schema":{"description":"List of portfolios with buildings (filtered by user permissions)","type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"alias":{"type":"string"},"address":{"type":"string"},"customerId":{"type":"string","format":"uuid"},"isFavorite":{"type":"boolean"},"buildings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"alias":{"type":"string"},"customerId":{"type":"string","format":"uuid"},"address":{"type":"string"},"isFavorite":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"additionalProperties":true}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"additionalProperties":true}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"post":{"summary":"Create new portfolio","tags":["Document Platform"],"description":"Create a new portfolio and optionally associate it with buildings","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"alias":{"type":"string","minLength":1},"address":{"type":"string"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"userIdentifier":{"type":"string"}},"required":["alias","customerId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Created portfolio with buildings","content":{"application/json":{"schema":{"description":"Created portfolio with buildings","type":"object","properties":{"id":{"type":"string","format":"uuid"},"alias":{"type":"string"},"address":{"type":"string"},"customerId":{"type":"string","format":"uuid"},"isFavorite":{"type":"boolean"},"buildings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"alias":{"type":"string"},"customerId":{"type":"string","format":"uuid"},"address":{"type":"string"},"isFavorite":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"additionalProperties":true}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/portfolios/{id}/buildings":{"post":{"summary":"Create building in portfolio","tags":["Document Platform"],"description":"Create a new building and automatically add it to the portfolio","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","customerId"],"properties":{"name":{"type":"string","minLength":1,"maxLength":255},"address":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"dataRegion":{"type":"string"},"customerId":{"type":"string","format":"uuid"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Created building","content":{"application/json":{"schema":{"description":"Created building","type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"customerId":{"type":"string","format":"uuid"}},"additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"put":{"summary":"Add existing building to portfolio","tags":["Document Platform"],"description":"Atomically add a single existing building to a portfolio to avoid race conditions","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["buildingId"],"properties":{"buildingId":{"type":"string","format":"uuid"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Updated portfolio with buildings","content":{"application/json":{"schema":{"description":"Updated portfolio with buildings","type":"object","properties":{"id":{"type":"string","format":"uuid"},"alias":{"type":"string"},"address":{"type":"string"},"customerId":{"type":"string","format":"uuid"},"isFavorite":{"type":"boolean"},"buildings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"alias":{"type":"string"},"customerId":{"type":"string","format":"uuid"},"address":{"type":"string"},"isFavorite":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"additionalProperties":true}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/portfolios/{id}/image":{"post":{"summary":"Get portfolio image upload URL","tags":["Document Platform"],"description":"Get a presigned URL for uploading a portfolio image to S3","parameters":[{"schema":{"type":"string","enum":["jpg","jpeg","png","svg","webp","gif","avif","bmp","tif","tiff","heic"]},"in":"query","name":"fileExtension","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Presigned upload URL","content":{"application/json":{"schema":{"description":"Presigned upload URL","type":"object","properties":{"signedUrl":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"get":{"summary":"Get portfolio image download URL","tags":["Document Platform"],"description":"Get a presigned URL for downloading a portfolio image from S3","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Image download URL","content":{"application/json":{"schema":{"description":"Image download URL","type":"object","properties":{"imageUrl":{"type":"string","nullable":true}},"additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Delete portfolio image","tags":["Document Platform"],"description":"Delete a portfolio image from S3","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"204":{"description":"Image successfully deleted"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/portfolios/images":{"get":{"summary":"Get all portfolio images","tags":["Document Platform"],"description":"Get presigned URLs for portfolio images the user has access to","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List of portfolio images (filtered by user permissions)","content":{"application/json":{"schema":{"description":"List of portfolio images (filtered by user permissions)","type":"array","items":{"type":"object","properties":{"portfolioId":{"type":"string","format":"uuid"},"imageUrl":{"type":"string","nullable":true}},"additionalProperties":true}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/portfolios/{id}/building-images":{"get":{"summary":"Get portfolio building images","tags":["Document Platform"],"description":"Get up to 4 building images for a specific portfolio","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List of building image URLs (max 4)","content":{"application/json":{"schema":{"description":"List of building image URLs (max 4)","type":"array","items":{"type":"string"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/portfolios/building-images":{"get":{"summary":"Get all portfolio building images","tags":["Document Platform"],"description":"Get building images for portfolios the user has access to","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List of portfolios with their building images (filtered by user permissions)","content":{"application/json":{"schema":{"description":"List of portfolios with their building images (filtered by user permissions)","type":"array","items":{"type":"object","properties":{"portfolioId":{"type":"string","format":"uuid"},"imageUrls":{"type":"array","items":{"type":"string"}}},"additionalProperties":true}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/portfolios/favorites":{"get":{"summary":"Get favorite portfolios","tags":["Document Platform"],"description":"Get favorite portfolios the user has access to","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"query","name":"userId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List of favorite portfolios with buildings (filtered by user permissions)","content":{"application/json":{"schema":{"description":"List of favorite portfolios with buildings (filtered by user permissions)","type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"alias":{"type":"string"},"address":{"type":"string"},"customerId":{"type":"string","format":"uuid"},"isFavorite":{"type":"boolean"},"buildings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"alias":{"type":"string"},"customerId":{"type":"string","format":"uuid"},"address":{"type":"string"},"isFavorite":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"additionalProperties":true}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"additionalProperties":true}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/portfolios/{portfolioId}/favorites":{"post":{"summary":"Add portfolio to favorites","tags":["Document Platform"],"description":"Add a portfolio to a user's favorites (requires read access to portfolio)","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"query","name":"userId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"portfolioId","required":true}],"security":[{"apiKey":[]}],"responses":{"204":{"description":"Portfolio added to favorites"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Remove portfolio from favorites","tags":["Document Platform"],"description":"Remove a portfolio from a user's favorites (requires read access to portfolio)","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"query","name":"userId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"portfolioId","required":true}],"security":[{"apiKey":[]}],"responses":{"204":{"description":"Portfolio removed from favorites"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/portfolios/{id}/documents":{"get":{"summary":"List portfolio documents","tags":["Document Platform"],"description":"List documents that live directly under the portfolio (not under any of the portfolio's buildings).","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/portfolios/{id}/documents/{documentId}":{"get":{"summary":"Get portfolio document by id","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/portfolios/{id}/documents/{documentId}/get-signed-url":{"get":{"summary":"Get signed url for portfolio document","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/portfolios/{id}/uploads/signed-url":{"post":{"summary":"Get signed upload url for a portfolio document","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["filename"],"properties":{"filename":{"type":"string"},"documentId":{"type":"string","format":"uuid"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/portfolios/{id}/documents/batch/create":{"post":{"summary":"Batch create documents under a portfolio","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documents"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/tasks/assignees":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/tasks/{id}":{"get":{"parameters":[{"schema":{"type":"string","minLength":36,"maxLength":100},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}},"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"_deletedAt":{"type":"string"},"_deletedBy":{"type":"string"},"assignedTo":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"}},"required":["id"],"additionalProperties":false}},"buildingId":{"type":"string"},"category":{"type":"string","enum":["task","deviation","routine"]},"completedAt":{"nullable":true,"type":"string"},"createdAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"createdBy":{"type":"string"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"deadline":{"nullable":true,"type":"string"},"description":{"type":"string"},"order":{"type":"number"},"photos":{"type":"array","items":{"type":"object","properties":{"s3Key":{"type":"string"},"filename":{"type":"string"},"uploadedAt":{"type":"string"},"uploadedBy":{"type":"string"}},"required":["s3Key","filename","uploadedAt","uploadedBy"],"additionalProperties":false}},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH","URGENT"]},"handlerType":{"nullable":true,"type":"string","enum":["INTERNAL","EXTERNAL","NOT_SPECIFIED"]},"referenceId":{"type":"string"},"responsible":{"type":"string"},"routineId":{"type":"string"},"status":{"type":"string","enum":["BACKLOG","OPEN","IN_PROGRESS","DONE","CANCELLED","ARCHIVED"]},"systemId":{"nullable":true,"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"themeId":{"type":"string"},"title":{"type":"string"},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"updatedBy":{"type":"string"},"rrule":{"type":"string"},"timezone":{"type":"string"},"dtstart":{"type":"string"},"dtend":{"type":"string"},"active":{"type":"boolean"},"pausedUntil":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"accountForHolidays":{"nullable":true,"type":"boolean"},"isRoutineException":{"type":"boolean"},"isRoutineOccurrence":{"type":"boolean"},"parentRoutineId":{"type":"string"},"recurrenceId":{"type":"string"},"exceptionType":{"type":"string","enum":["modified","deleted","moved"]},"routineOccurrenceId":{"type":"string"},"activities":{"nullable":true,"type":"array","items":{"type":"object","properties":{"timestamp":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"userId":{"type":"string"},"action":{"type":"string","enum":["CREATED","UPDATED","STATUS_CHANGED","ASSIGNED","UNASSIGNED","DEADLINE_CHANGED","PRIORITY_CHANGED","DESCRIPTION_UPDATED","PHOTO_ADDED","PHOTO_REMOVED","DELETED","ROUTINE_EXCEPTION_CREATED","COMMENT_ADDED","COMMENT_UPDATED","COMMENT_DELETED","COMPLETED"]},"changes":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"oldValue":{"$ref":"#/components/schemas/__schema0"},"newValue":{"$ref":"#/components/schemas/__schema0"},"displayOldValue":{"allOf":[{"$ref":"#/components/schemas/__schema0"}]},"displayNewValue":{"allOf":[{"$ref":"#/components/schemas/__schema0"}]}},"required":["field","oldValue","newValue"],"additionalProperties":false}},"metadata":{"type":"object","additionalProperties":{}},"userName":{"type":"string"}},"required":["timestamp","userId","action"],"additionalProperties":false}},"activityArchive":{"nullable":true,"type":"object","properties":{"hasArchive":{"type":"boolean"},"archivedCount":{"type":"number"},"oldestArchivedTimestamp":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"s3Key":{"type":"string"},"version":{"type":"number"}},"required":["hasArchive","archivedCount"],"additionalProperties":false},"comments":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"createdAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"createdBy":{"type":"string"},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"updatedBy":{"type":"string"},"createdByName":{"type":"string"},"mentionedUserIds":{"type":"array","items":{"type":"string"}}},"required":["id","content","createdAt","createdBy"],"additionalProperties":false}},"parentTaskId":{"nullable":true,"type":"string"},"documentIds":{"type":"array","items":{"type":"string"}},"writeAccessCustomer":{"nullable":true,"type":"string"},"readAccessCustomer":{"nullable":true,"type":"string"},"writeAccessBuilding":{"nullable":true,"type":"string"},"readAccessBuilding":{"nullable":true,"type":"string"},"notifyAssignees":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":36,"maxLength":100},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"default":"this","type":"string","enum":["this","thisAndFuture","seriesKeepCompleted","series"]},"in":"query","name":"scope","required":true},{"schema":{"type":"string"},"in":"query","name":"from","required":false},{"schema":{"type":"string","minLength":36,"maxLength":100},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/tasks/":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}},"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"category":{"default":"task","type":"string","enum":["task","deviation","routine"]},"title":{"type":"string","minLength":1},"description":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string","enum":["BACKLOG","OPEN","IN_PROGRESS","DONE","CANCELLED","ARCHIVED"]},"priority":{"nullable":true,"type":"string","enum":["LOW","MEDIUM","HIGH","URGENT"]},"handlerType":{"type":"string","enum":["INTERNAL","EXTERNAL","NOT_SPECIFIED"]},"deadline":{"nullable":true,"type":"string"},"systemId":{"nullable":true,"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"themeId":{"type":"string"},"assignedTo":{"nullable":true,"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"id":{},"accessLevel":{"type":"string","enum":["operations","read","edit","upload","administrate"]}},"required":["email"],"additionalProperties":false}]}}]},"responsible":{"nullable":true,"type":"string"},"routineId":{"type":"string"},"photos":{"type":"array","items":{"type":"object","properties":{"s3Key":{"type":"string"},"filename":{"type":"string"},"uploadedAt":{"type":"string"},"uploadedBy":{"type":"string"}},"required":["s3Key","filename","uploadedAt","uploadedBy"],"additionalProperties":false}},"rrule":{"nullable":true,"type":"string"},"timezone":{"nullable":true,"type":"string"},"dtstart":{"nullable":true,"type":"string"},"dtend":{"nullable":true,"type":"string"},"active":{"type":"boolean"},"accountForHolidays":{"type":"boolean"},"parentTaskId":{"type":"string"},"documentIds":{"type":"array","items":{"type":"string"}},"notifyAssignees":{"type":"boolean"},"completedAt":{"nullable":true,"type":"string"}},"required":["category","title"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/tasks/by-system/{systemId}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"systemId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/tasks/paginated":{"get":{"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":10000},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string"},"in":"query","name":"nextToken","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/tasks/completed":{"get":{"summary":"List completed work","tags":["Document Platform"],"description":"A building’s completed tasks, newest completion first unless `order=asc`, cursor-paginated. Filter by completion day, routine, logbook tags, title, assignee, priority, system or category.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"cursor","required":false},{"schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":true},{"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"in":"query","name":"from","required":false},{"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"in":"query","name":"to","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"routineId","required":false},{"schema":{"type":"string"},"in":"query","name":"tags","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"q","required":false},{"schema":{"type":"string"},"in":"query","name":"assignees","required":false},{"schema":{"type":"string"},"in":"query","name":"mineOrUnassigned","required":false},{"schema":{"type":"string","enum":["LOW","MEDIUM","HIGH","URGENT"]},"in":"query","name":"priority","required":false},{"schema":{"type":"string"},"in":"query","name":"systemIds","required":false},{"schema":{"type":"string","enum":["task","deviation","routine"]},"in":"query","name":"category","required":false},{"schema":{"default":"desc","type":"string","enum":["asc","desc"]},"in":"query","name":"order","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"category":{"type":"string","enum":["task","deviation","routine"]},"completedAt":{"type":"string"},"completedBy":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"}},"required":["userId"],"additionalProperties":false},"importSource":{"type":"string"},"routineId":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"photoCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"documentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"commentCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","title","category","completedAt","tags","photoCount","documentCount","commentCount"],"additionalProperties":false}},"nextCursor":{"type":"string"},"hasMore":{"type":"boolean"}},"required":["items","hasMore"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/tasks/range":{"get":{"parameters":[{"schema":{"type":"string"},"in":"query","name":"startDate","required":false},{"schema":{"type":"string"},"in":"query","name":"endDate","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"expandRoutines","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"includeExceptions","required":false},{"schema":{"type":"string"},"in":"query","name":"timezone","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"doneSince","required":false},{"schema":{"type":"string","enum":["all","exceptions"]},"in":"query","name":"doneScope","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/tasks/deleted":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/tasks/{id}/restore":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"instances":{"default":"all","type":"string","enum":["all","completedOnly"]},"period":{"default":"all","type":"string","enum":["all","before","after"]},"today":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["instances","period"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":36,"maxLength":100},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/tasks/{id}/purge":{"delete":{"parameters":[{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"cascade","required":false},{"schema":{"type":"string","minLength":36,"maxLength":100},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/tasks/routine-exception":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"parentRoutineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"recurrenceId":{"type":"string"},"exceptionType":{"type":"string","enum":["modified","deleted","moved"]},"title":{"type":"string"},"description":{"type":"string"},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH","URGENT"]},"handlerType":{"nullable":true,"type":"string","enum":["INTERNAL","EXTERNAL","NOT_SPECIFIED"]},"assignedTo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"}},"required":["id"],"additionalProperties":false}},"responsible":{"type":"string"},"deadline":{"type":"string"},"status":{"type":"string","enum":["BACKLOG","OPEN","IN_PROGRESS","DONE","CANCELLED","ARCHIVED"]},"tags":{"type":"array","items":{"type":"string"}},"systemId":{"nullable":true,"type":"string"},"notifyAssignees":{"type":"boolean"}},"required":["parentRoutineId","recurrenceId","exceptionType"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/tasks/routine/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"query","name":"nextOccurrences","required":false},{"schema":{"type":"string","minLength":36,"maxLength":100},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/tasks/{id}/duplicate":{"post":{"parameters":[{"schema":{"type":"string","minLength":36,"maxLength":100},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/tasks/copy-from/{sourceBuildingId}":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"routineIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"sourceBuildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/tasks/export":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/tasks/import":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"externalId":{"type":"string","minLength":1},"parentExternalId":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"description":{"type":"string"},"category":{"type":"string","enum":["task","deviation","routine"]},"status":{"type":"string","enum":["BACKLOG","OPEN","IN_PROGRESS","DONE","CANCELLED","ARCHIVED"]},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH","URGENT"]},"deadline":{"type":"string"},"completedAt":{"type":"string"},"systemCode":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"assignedTo":{"type":"array","items":{"type":"string"}},"rrule":{"type":"string"},"timezone":{"type":"string"},"dtstart":{"type":"string"},"importComments":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":5000}}},"required":["title"],"additionalProperties":false}},"dryRun":{"type":"boolean"},"notifyAssignees":{"type":"boolean"}},"required":["rows"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/tasks/{id}/comments":{"get":{"parameters":[{"schema":{"type":"string","minLength":36,"maxLength":100},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}},"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":5000},"notifyAssignees":{"type":"boolean"},"mentionedUserIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}}},"required":["content"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":36,"maxLength":100},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/tasks/{id}/comments/{commentId}":{"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":5000},"notifyAssignees":{"type":"boolean"},"mentionedUserIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}}},"required":["content"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":36,"maxLength":100},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":36,"maxLength":100},"in":"path","name":"commentId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string","minLength":36,"maxLength":100},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":36,"maxLength":100},"in":"path","name":"commentId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/tasks/{id}/files":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["fileExtension","filename","fileSizeBytes","contentType"],"properties":{"fileExtension":{"type":"string","enum":["jpg","jpeg","png","svg","webp","gif","avif","bmp","tif","tiff","heic","pdf","doc","docx","txt","csv","xlsx","xls"]},"filename":{"type":"string","minLength":1},"fileSizeBytes":{"type":"number","minimum":1,"maximum":5242880},"contentType":{"type":"string","minLength":1}}}}}},"parameters":[{"schema":{"type":"string","minLength":36,"maxLength":100},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}},"get":{"parameters":[{"schema":{"type":"string","minLength":36,"maxLength":100},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/tasks/{id}/files/{fileId}/confirm":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["s3Key","filename"],"properties":{"s3Key":{"type":"string"},"filename":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"fileId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/tasks/{id}/files/{fileId}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"fileId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"fileId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/tasks/report-problem":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string"}},"description":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["documentIds","description"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/tasks/mine":{"get":{"parameters":[{"schema":{"type":"string"},"in":"query","name":"startDate","required":false},{"schema":{"type":"string"},"in":"query","name":"endDate","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"expandRoutines","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"includeExceptions","required":false},{"schema":{"type":"string"},"in":"query","name":"timezone","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"doneSince","required":false},{"schema":{"type":"string","enum":["all","exceptions"]},"in":"query","name":"doneScope","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/activity/mine":{"get":{"summary":"Get my activity","tags":["Document Platform"],"description":"The signed-in user’s own activity in this organization, newest first, cursor-paginated","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"cursor","required":false},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":50},"in":"query","name":"limit","required":true},{"schema":{"type":"string"},"in":"query","name":"kinds","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"activity":{"oneOf":[{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":1},"occurredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"customerId":{"type":"string","minLength":1},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key"]},"id":{"type":"string","minLength":1},"email":{"type":"string"},"impersonatorId":{"type":"string"},"channel":{"type":"string","enum":["ui","mcp","partner_api"]}},"required":["type","id","channel"],"additionalProperties":false},"entity":{"type":"object","properties":{"type":{"type":"string","enum":["document","building","folder","collection","task","upload_batch","assessment_run","deficiency_report","insight_card","export","chat_thread","workflow_execution","source_migration"]},"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["type","id"],"additionalProperties":false},"building":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id"],"additionalProperties":false},"kind":{"type":"string","enum":["document.viewed"]},"details":{"type":"object","properties":{"sourceType":{"type":"string"}},"additionalProperties":false}},"required":["schemaVersion","id","idempotencyKey","occurredAt","customerId","actor","entity","kind","details"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":1},"occurredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"customerId":{"type":"string","minLength":1},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key"]},"id":{"type":"string","minLength":1},"email":{"type":"string"},"impersonatorId":{"type":"string"},"channel":{"type":"string","enum":["ui","mcp","partner_api"]}},"required":["type","id","channel"],"additionalProperties":false},"entity":{"type":"object","properties":{"type":{"type":"string","enum":["document","building","folder","collection","task","upload_batch","assessment_run","deficiency_report","insight_card","export","chat_thread","workflow_execution","source_migration"]},"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["type","id"],"additionalProperties":false},"building":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id"],"additionalProperties":false},"kind":{"type":"string","enum":["document.uploaded"]},"details":{"type":"object","properties":{"documentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string","enum":["zip"]}},"additionalProperties":false}},"required":["schemaVersion","id","idempotencyKey","occurredAt","customerId","actor","entity","kind","details"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":1},"occurredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"customerId":{"type":"string","minLength":1},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key"]},"id":{"type":"string","minLength":1},"email":{"type":"string"},"impersonatorId":{"type":"string"},"channel":{"type":"string","enum":["ui","mcp","partner_api"]}},"required":["type","id","channel"],"additionalProperties":false},"entity":{"type":"object","properties":{"type":{"type":"string","enum":["document","building","folder","collection","task","upload_batch","assessment_run","deficiency_report","insight_card","export","chat_thread","workflow_execution","source_migration"]},"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["type","id"],"additionalProperties":false},"building":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id"],"additionalProperties":false},"kind":{"type":"string","enum":["chat.thread_started"]},"details":{"type":"object","properties":{"chatType":{"type":"string"}},"additionalProperties":false}},"required":["schemaVersion","id","idempotencyKey","occurredAt","customerId","actor","entity","kind","details"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":1},"occurredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"customerId":{"type":"string","minLength":1},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key"]},"id":{"type":"string","minLength":1},"email":{"type":"string"},"impersonatorId":{"type":"string"},"channel":{"type":"string","enum":["ui","mcp","partner_api"]}},"required":["type","id","channel"],"additionalProperties":false},"entity":{"type":"object","properties":{"type":{"type":"string","enum":["document","building","folder","collection","task","upload_batch","assessment_run","deficiency_report","insight_card","export","chat_thread","workflow_execution","source_migration"]},"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["type","id"],"additionalProperties":false},"building":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id"],"additionalProperties":false},"kind":{"type":"string","enum":["workflow.run_started"]},"details":{"type":"object","properties":{"documentCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["documentCount"],"additionalProperties":false}},"required":["schemaVersion","id","idempotencyKey","occurredAt","customerId","actor","entity","kind","details"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":1},"occurredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"customerId":{"type":"string","minLength":1},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key"]},"id":{"type":"string","minLength":1},"email":{"type":"string"},"impersonatorId":{"type":"string"},"channel":{"type":"string","enum":["ui","mcp","partner_api"]}},"required":["type","id","channel"],"additionalProperties":false},"entity":{"type":"object","properties":{"type":{"type":"string","enum":["document","building","folder","collection","task","upload_batch","assessment_run","deficiency_report","insight_card","export","chat_thread","workflow_execution","source_migration"]},"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["type","id"],"additionalProperties":false},"building":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id"],"additionalProperties":false},"kind":{"type":"string","enum":["document.edited"]},"details":{"type":"object","properties":{"action":{"type":"string","enum":["moved","archived","archive_started","restored","deleted","metadata_edited"]},"documentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"fields":{"type":"array","items":{"type":"string"}}},"required":["action","documentCount"],"additionalProperties":false}},"required":["schemaVersion","id","idempotencyKey","occurredAt","customerId","actor","entity","kind","details"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":1},"occurredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"customerId":{"type":"string","minLength":1},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key"]},"id":{"type":"string","minLength":1},"email":{"type":"string"},"impersonatorId":{"type":"string"},"channel":{"type":"string","enum":["ui","mcp","partner_api"]}},"required":["type","id","channel"],"additionalProperties":false},"entity":{"type":"object","properties":{"type":{"type":"string","enum":["document","building","folder","collection","task","upload_batch","assessment_run","deficiency_report","insight_card","export","chat_thread","workflow_execution","source_migration"]},"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["type","id"],"additionalProperties":false},"building":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id"],"additionalProperties":false},"kind":{"type":"string","enum":["review.submitted"]},"details":{"type":"object","properties":{"reviewKind":{"type":"string","enum":["classification","metadata"]}},"required":["reviewKind"],"additionalProperties":false}},"required":["schemaVersion","id","idempotencyKey","occurredAt","customerId","actor","entity","kind","details"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":1},"occurredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"customerId":{"type":"string","minLength":1},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key"]},"id":{"type":"string","minLength":1},"email":{"type":"string"},"impersonatorId":{"type":"string"},"channel":{"type":"string","enum":["ui","mcp","partner_api"]}},"required":["type","id","channel"],"additionalProperties":false},"entity":{"type":"object","properties":{"type":{"type":"string","enum":["document","building","folder","collection","task","upload_batch","assessment_run","deficiency_report","insight_card","export","chat_thread","workflow_execution","source_migration"]},"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["type","id"],"additionalProperties":false},"building":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id"],"additionalProperties":false},"kind":{"type":"string","enum":["agent.run_started"]},"details":{"type":"object","properties":{"agent":{"type":"string","enum":["safety_case"]}},"required":["agent"],"additionalProperties":false}},"required":["schemaVersion","id","idempotencyKey","occurredAt","customerId","actor","entity","kind","details"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":1},"occurredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"customerId":{"type":"string","minLength":1},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key"]},"id":{"type":"string","minLength":1},"email":{"type":"string"},"impersonatorId":{"type":"string"},"channel":{"type":"string","enum":["ui","mcp","partner_api"]}},"required":["type","id","channel"],"additionalProperties":false},"entity":{"type":"object","properties":{"type":{"type":"string","enum":["document","building","folder","collection","task","upload_batch","assessment_run","deficiency_report","insight_card","export","chat_thread","workflow_execution","source_migration"]},"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["type","id"],"additionalProperties":false},"building":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id"],"additionalProperties":false},"kind":{"type":"string","enum":["report.generated"]},"details":{"type":"object","properties":{"reportType":{"type":"string","enum":["deficiency_report","insight_card"]}},"required":["reportType"],"additionalProperties":false}},"required":["schemaVersion","id","idempotencyKey","occurredAt","customerId","actor","entity","kind","details"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":1},"occurredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"customerId":{"type":"string","minLength":1},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key"]},"id":{"type":"string","minLength":1},"email":{"type":"string"},"impersonatorId":{"type":"string"},"channel":{"type":"string","enum":["ui","mcp","partner_api"]}},"required":["type","id","channel"],"additionalProperties":false},"entity":{"type":"object","properties":{"type":{"type":"string","enum":["document","building","folder","collection","task","upload_batch","assessment_run","deficiency_report","insight_card","export","chat_thread","workflow_execution","source_migration"]},"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["type","id"],"additionalProperties":false},"building":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id"],"additionalProperties":false},"kind":{"type":"string","enum":["export.created"]},"details":{"type":"object","properties":{"format":{"type":"string","enum":["zip","chat"]},"documentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"string","enum":["building","selection","collection","chat"]},"fileFormat":{"type":"string","enum":["pdf","docx","xlsx"]}},"required":["format"],"additionalProperties":false}},"required":["schemaVersion","id","idempotencyKey","occurredAt","customerId","actor","entity","kind","details"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":1},"occurredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"customerId":{"type":"string","minLength":1},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key"]},"id":{"type":"string","minLength":1},"email":{"type":"string"},"impersonatorId":{"type":"string"},"channel":{"type":"string","enum":["ui","mcp","partner_api"]}},"required":["type","id","channel"],"additionalProperties":false},"entity":{"type":"object","properties":{"type":{"type":"string","enum":["document","building","folder","collection","task","upload_batch","assessment_run","deficiency_report","insight_card","export","chat_thread","workflow_execution","source_migration"]},"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["type","id"],"additionalProperties":false},"building":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id"],"additionalProperties":false},"kind":{"type":"string","enum":["task.created"]},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["schemaVersion","id","idempotencyKey","occurredAt","customerId","actor","entity","kind","details"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":1},"occurredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"customerId":{"type":"string","minLength":1},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key"]},"id":{"type":"string","minLength":1},"email":{"type":"string"},"impersonatorId":{"type":"string"},"channel":{"type":"string","enum":["ui","mcp","partner_api"]}},"required":["type","id","channel"],"additionalProperties":false},"entity":{"type":"object","properties":{"type":{"type":"string","enum":["document","building","folder","collection","task","upload_batch","assessment_run","deficiency_report","insight_card","export","chat_thread","workflow_execution","source_migration"]},"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["type","id"],"additionalProperties":false},"building":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id"],"additionalProperties":false},"kind":{"type":"string","enum":["task.completed"]},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["schemaVersion","id","idempotencyKey","occurredAt","customerId","actor","entity","kind","details"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":1},"occurredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"customerId":{"type":"string","minLength":1},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key"]},"id":{"type":"string","minLength":1},"email":{"type":"string"},"impersonatorId":{"type":"string"},"channel":{"type":"string","enum":["ui","mcp","partner_api"]}},"required":["type","id","channel"],"additionalProperties":false},"entity":{"type":"object","properties":{"type":{"type":"string","enum":["document","building","folder","collection","task","upload_batch","assessment_run","deficiency_report","insight_card","export","chat_thread","workflow_execution","source_migration"]},"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["type","id"],"additionalProperties":false},"building":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id"],"additionalProperties":false},"kind":{"type":"string","enum":["access.granted"]},"details":{"type":"object","properties":{"principal":{"type":"object","properties":{"type":{"type":"string","enum":["user","group"]},"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["type","id"],"additionalProperties":false},"relation":{"type":"string","minLength":1}},"required":["principal","relation"],"additionalProperties":false}},"required":["schemaVersion","id","idempotencyKey","occurredAt","customerId","actor","entity","kind","details"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":1},"occurredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"customerId":{"type":"string","minLength":1},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key"]},"id":{"type":"string","minLength":1},"email":{"type":"string"},"impersonatorId":{"type":"string"},"channel":{"type":"string","enum":["ui","mcp","partner_api"]}},"required":["type","id","channel"],"additionalProperties":false},"entity":{"type":"object","properties":{"type":{"type":"string","enum":["document","building","folder","collection","task","upload_batch","assessment_run","deficiency_report","insight_card","export","chat_thread","workflow_execution","source_migration"]},"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["type","id"],"additionalProperties":false},"building":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id"],"additionalProperties":false},"kind":{"type":"string","enum":["access.revoked"]},"details":{"type":"object","properties":{"principal":{"type":"object","properties":{"type":{"type":"string","enum":["user","group"]},"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["type","id"],"additionalProperties":false},"relation":{"type":"string","minLength":1}},"required":["principal","relation"],"additionalProperties":false}},"required":["schemaVersion","id","idempotencyKey","occurredAt","customerId","actor","entity","kind","details"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":1},"occurredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"customerId":{"type":"string","minLength":1},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key"]},"id":{"type":"string","minLength":1},"email":{"type":"string"},"impersonatorId":{"type":"string"},"channel":{"type":"string","enum":["ui","mcp","partner_api"]}},"required":["type","id","channel"],"additionalProperties":false},"entity":{"type":"object","properties":{"type":{"type":"string","enum":["document","building","folder","collection","task","upload_batch","assessment_run","deficiency_report","insight_card","export","chat_thread","workflow_execution","source_migration"]},"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["type","id"],"additionalProperties":false},"building":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id"],"additionalProperties":false},"kind":{"type":"string","enum":["access.expiry_changed"]},"details":{"type":"object","properties":{"principal":{"type":"object","properties":{"type":{"type":"string","enum":["user","group"]},"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["type","id"],"additionalProperties":false},"expiresAt":{"nullable":true,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["principal","expiresAt"],"additionalProperties":false}},"required":["schemaVersion","id","idempotencyKey","occurredAt","customerId","actor","entity","kind","details"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":1},"occurredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"customerId":{"type":"string","minLength":1},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key"]},"id":{"type":"string","minLength":1},"email":{"type":"string"},"impersonatorId":{"type":"string"},"channel":{"type":"string","enum":["ui","mcp","partner_api"]}},"required":["type","id","channel"],"additionalProperties":false},"entity":{"type":"object","properties":{"type":{"type":"string","enum":["document","building","folder","collection","task","upload_batch","assessment_run","deficiency_report","insight_card","export","chat_thread","workflow_execution","source_migration"]},"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["type","id"],"additionalProperties":false},"building":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id"],"additionalProperties":false},"kind":{"type":"string","enum":["source_migration.changed"]},"details":{"type":"object","properties":{"action":{"type":"string","enum":["authorised","started","completed","cancelled"]},"provider":{"type":"string","minLength":1}},"required":["action","provider"],"additionalProperties":false}},"required":["schemaVersion","id","idempotencyKey","occurredAt","customerId","actor","entity","kind","details"],"additionalProperties":false}]},"workflowStatus":{"type":"string","enum":["running","finished","failed"]}},"required":["activity"],"additionalProperties":false}},"nextCursor":{"type":"string"},"hasMore":{"type":"boolean"}},"required":["items","hasMore"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/activity/document-views":{"post":{"summary":"Record a document view","tags":["Document Platform"],"description":"Records that the signed-in user opened a document. Repeat views within a short window are one entry.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1}},"required":["documentId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"recorded":{"type":"boolean"}},"required":["recorded"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/activity/uploads":{"post":{"summary":"Record a finished upload","tags":["Document Platform"],"description":"Records a batch of files the signed-in user uploaded. Only documents in the building that the caller uploaded are counted.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"buildingId":{"type":"string","minLength":1},"documentIds":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1}}},"required":["buildingId","documentIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"recorded":{"type":"boolean"}},"required":["recorded"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/customers/access-ended":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}},"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","maxLength":1000},"country":{},"companyType":{"nullable":true,"type":"string","enum":["property_owner","property_manager","real_estate_developer","construction_contractor","general_contractor","subcontractor","architect","engineer","facility_manager","real_estate_agent","building_owner","maintenance_company","other"]},"isFamacCustomer":{"type":"boolean"},"customInboxSlug":{"type":"string","minLength":2,"maxLength":50,"pattern":"^[a-z0-9_-]+$"},"subscriptionPricing":{"type":"object","properties":{"subscriptionPrice":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"nullable":true,"type":"string","pattern":"^[A-Z]{3}$"},"billingFrequency":{"nullable":true,"type":"string","enum":["MONTHLY","QUARTERLY","SEMI_ANNUAL","ANNUAL"]},"discountPercentage":{"nullable":true,"type":"number","minimum":0,"maximum":100},"discountDescription":{"nullable":true,"type":"string","maxLength":500},"pricingNotes":{"nullable":true,"type":"string","maxLength":1000}},"additionalProperties":false},"dealType":{"nullable":true,"type":"string","enum":["FAIR_USAGE_CAP","PER_DOC_PRICING","NOT_SET"]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/logo":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileExtension":{"type":"string","enum":["jpg","jpeg","png","gif","webp"]}},"required":["fileExtension"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}},"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/logo/base64":{"get":{"summary":"Get customer logo as base64","tags":["Document Platform"],"description":"Retrieve the customer's logo as a base64 data URL","parameters":[{"schema":{"type":"boolean"},"in":"query","name":"compress","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Customer logo as base64 data URL","content":{"application/json":{"schema":{"description":"Customer logo as base64 data URL","type":"object","properties":{"base64":{"description":"Base64 encoded image data URL, or null if no logo exists","type":"string","nullable":true}},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/name":{"put":{"summary":"Rename an organisation","tags":["Document Platform"],"description":"Organisation administrators can rename their organisation in Findable and WorkOS","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255}},"required":["name"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/hidden-integrations":{"put":{"summary":"Update integration visibility for an organisation","tags":["Document Platform"],"description":"Org admins can hide integration management surfaces without changing sync behaviour or configuration","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hiddenIntegrations":{}},"required":["hiddenIntegrations"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/inbox-slugs/{slug}":{"delete":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[a-z0-9_-]+$"},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/private-building-categories":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}},"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"categories":{}},"required":["categories"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/sync-exclusions":{"get":{"parameters":[{"schema":{"type":"string","enum":["plania","interaxo","famac","dalux"]},"in":"query","name":"integrationType","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}},"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"integrationType":{"type":"string","enum":["plania","interaxo","famac","dalux"]},"exclusions":{"type":"object","properties":{"buildingCategories":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}},"required":["integrationType","exclusions"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/private-building-categories/process":{"post":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/disabled-features":{"put":{"summary":"Update disabled features for an organisation","tags":["Document Platform"],"description":"Org admins can disable modules (e.g. checklists, red flag report) so they are hidden for all users","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"disabledFeatures":{}},"required":["disabledFeatures"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/memory":{"get":{"summary":"Get the organisation memory block","tags":["Document Platform"],"description":"Org admins can read the shared organisation context injected into assistant conversations","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"customerMemory":{"nullable":true,"type":"string"}},"required":["customerMemory"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"put":{"summary":"Update the organisation memory block","tags":["Document Platform"],"description":"Org admins can edit the shared organisation context injected into assistant conversations","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customerMemory":{"type":"string","maxLength":10000}},"required":["customerMemory"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"customerMemory":{"nullable":true,"type":"string"}},"required":["customerMemory"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/heartbeats":{"get":{"summary":"List heartbeat definitions","tags":["Document Platform"],"description":"Org admins can list the recurring scheduled Ask turns","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"heartbeats":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"user_id":{"type":"string"},"building_id":{"type":"string"},"task_prompt":{"type":"string"},"title":{"type":"string"},"days_of_week":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"time_zone":{"type":"string"},"delivery":{"type":"string"},"status":{"type":"string","enum":["provisioning","active"]},"paused":{"default":false,"type":"boolean"},"created_at":{"type":"string"},"last_run":{"oneOf":[{"type":"object","properties":{"trigger_id":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"scheduled_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"outcome":{"type":"string","enum":["succeeded"]},"reason":{"type":"string","enum":["delivered","duplicate_fire"]},"thread_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["trigger_id","scheduled_at","completed_at","outcome","reason","thread_id"],"additionalProperties":false},{"type":"object","properties":{"trigger_id":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"scheduled_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"outcome":{"type":"string","enum":["skipped"]},"reason":{"type":"string","enum":["paused","not_active","access_revoked"]},"thread_id":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["trigger_id","scheduled_at","completed_at","outcome","reason"],"additionalProperties":false},{"type":"object","properties":{"trigger_id":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"scheduled_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"outcome":{"type":"string","enum":["failed"]},"reason":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z0-9_]+$"},"thread_id":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["trigger_id","scheduled_at","completed_at","outcome","reason"],"additionalProperties":false}]}},"required":["id","customer_id","user_id","building_id","task_prompt","days_of_week","hour","minute","time_zone","delivery","status","paused","created_at"],"additionalProperties":false}}},"required":["heartbeats"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/heartbeats/{heartbeatId}":{"delete":{"summary":"Delete a heartbeat definition and its Schedule","tags":["Document Platform"],"description":"Org admins can remove a recurring scheduled Ask turn","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"in":"path","name":"heartbeatId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/heartbeats/{heartbeatId}/paused":{"put":{"summary":"Pause or resume a heartbeat definition","tags":["Document Platform"],"description":"Org admins can stop and restart deliveries for a recurring scheduled Ask turn","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"paused":{"type":"boolean"}},"required":["paused"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"in":"path","name":"heartbeatId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"heartbeat":{"type":"object","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"user_id":{"type":"string"},"building_id":{"type":"string"},"task_prompt":{"type":"string"},"title":{"type":"string"},"days_of_week":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"time_zone":{"type":"string"},"delivery":{"type":"string"},"status":{"type":"string","enum":["provisioning","active"]},"paused":{"default":false,"type":"boolean"},"created_at":{"type":"string"}},"required":["id","customer_id","user_id","building_id","task_prompt","days_of_week","hour","minute","time_zone","delivery","status","paused","created_at"],"additionalProperties":false}},"required":["heartbeat"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/heartbeats/{heartbeatId}/run":{"post":{"summary":"Run a heartbeat definition now (dev only)","tags":["Document Platform"],"description":"Org admins can fire any recurring scheduled Ask turn in the organisation immediately on dev, which emails its stored owner; not found elsewhere","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"in":"path","name":"heartbeatId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/heartbeats/mine":{"get":{"summary":"List own heartbeat definitions","tags":["Document Platform"],"description":"Org members can list their own recurring scheduled Ask turns","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"heartbeats":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"user_id":{"type":"string"},"building_id":{"type":"string"},"task_prompt":{"type":"string"},"title":{"type":"string"},"days_of_week":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"time_zone":{"type":"string"},"delivery":{"type":"string"},"status":{"type":"string","enum":["provisioning","active"]},"paused":{"default":false,"type":"boolean"},"created_at":{"type":"string"},"last_run":{"oneOf":[{"type":"object","properties":{"trigger_id":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"scheduled_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"outcome":{"type":"string","enum":["succeeded"]},"reason":{"type":"string","enum":["delivered","duplicate_fire"]},"thread_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["trigger_id","scheduled_at","completed_at","outcome","reason","thread_id"],"additionalProperties":false},{"type":"object","properties":{"trigger_id":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"scheduled_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"outcome":{"type":"string","enum":["skipped"]},"reason":{"type":"string","enum":["paused","not_active","access_revoked"]},"thread_id":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["trigger_id","scheduled_at","completed_at","outcome","reason"],"additionalProperties":false},{"type":"object","properties":{"trigger_id":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"scheduled_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"outcome":{"type":"string","enum":["failed"]},"reason":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z0-9_]+$"},"thread_id":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["trigger_id","scheduled_at","completed_at","outcome","reason"],"additionalProperties":false}]}},"required":["id","customer_id","user_id","building_id","task_prompt","days_of_week","hour","minute","time_zone","delivery","status","paused","created_at"],"additionalProperties":false}}},"required":["heartbeats"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/heartbeats/mine/{heartbeatId}":{"delete":{"summary":"Delete an own heartbeat definition and its Schedule","tags":["Document Platform"],"description":"Org members can remove their own recurring scheduled Ask turn","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"in":"path","name":"heartbeatId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/heartbeats/mine/{heartbeatId}/paused":{"put":{"summary":"Pause or resume an own heartbeat definition","tags":["Document Platform"],"description":"Org members can stop and restart deliveries for their own recurring scheduled Ask turn","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"paused":{"type":"boolean"}},"required":["paused"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"in":"path","name":"heartbeatId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"heartbeat":{"type":"object","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"user_id":{"type":"string"},"building_id":{"type":"string"},"task_prompt":{"type":"string"},"title":{"type":"string"},"days_of_week":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"time_zone":{"type":"string"},"delivery":{"type":"string"},"status":{"type":"string","enum":["provisioning","active"]},"paused":{"default":false,"type":"boolean"},"created_at":{"type":"string"}},"required":["id","customer_id","user_id","building_id","task_prompt","days_of_week","hour","minute","time_zone","delivery","status","paused","created_at"],"additionalProperties":false}},"required":["heartbeat"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/heartbeats/mine/{heartbeatId}/run":{"post":{"summary":"Run an own heartbeat definition now (dev only)","tags":["Document Platform"],"description":"Org members can fire their own recurring scheduled Ask turn immediately on dev; not found elsewhere","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"in":"path","name":"heartbeatId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/heartbeats/mine":{"get":{"summary":"List own heartbeat definitions for a building","tags":["Document Platform"],"description":"Org members can list their own recurring scheduled Ask turns for a building they can read","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"heartbeats":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"user_id":{"type":"string"},"building_id":{"type":"string"},"task_prompt":{"type":"string"},"title":{"type":"string"},"days_of_week":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"time_zone":{"type":"string"},"delivery":{"type":"string"},"status":{"type":"string","enum":["provisioning","active"]},"paused":{"default":false,"type":"boolean"},"created_at":{"type":"string"},"last_run":{"oneOf":[{"type":"object","properties":{"trigger_id":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"scheduled_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"outcome":{"type":"string","enum":["succeeded"]},"reason":{"type":"string","enum":["delivered","duplicate_fire"]},"thread_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["trigger_id","scheduled_at","completed_at","outcome","reason","thread_id"],"additionalProperties":false},{"type":"object","properties":{"trigger_id":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"scheduled_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"outcome":{"type":"string","enum":["skipped"]},"reason":{"type":"string","enum":["paused","not_active","access_revoked"]},"thread_id":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["trigger_id","scheduled_at","completed_at","outcome","reason"],"additionalProperties":false},{"type":"object","properties":{"trigger_id":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"scheduled_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"outcome":{"type":"string","enum":["failed"]},"reason":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z0-9_]+$"},"thread_id":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["trigger_id","scheduled_at","completed_at","outcome","reason"],"additionalProperties":false}]}},"required":["id","customer_id","user_id","building_id","task_prompt","days_of_week","hour","minute","time_zone","delivery","status","paused","created_at"],"additionalProperties":false}}},"required":["heartbeats"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"post":{"summary":"Create an own heartbeat definition for a building","tags":["Document Platform"],"description":"Org members can create a recurring scheduled Ask turn for themselves on a building they can read. Creation is idempotent: an identical definition returns the existing row with was_existing=true.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"task_prompt":{"type":"string","minLength":1,"maxLength":2000},"days_of_week":{"minItems":1,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59},"time_zone":{"type":"string","minLength":1}},"required":["task_prompt","days_of_week","hour","minute","time_zone"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"heartbeat":{"type":"object","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"user_id":{"type":"string"},"building_id":{"type":"string"},"task_prompt":{"type":"string"},"title":{"type":"string"},"days_of_week":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"time_zone":{"type":"string"},"delivery":{"type":"string"},"status":{"type":"string","enum":["provisioning","active"]},"paused":{"default":false,"type":"boolean"},"created_at":{"type":"string"}},"required":["id","customer_id","user_id","building_id","task_prompt","days_of_week","hour","minute","time_zone","delivery","status","paused","created_at"],"additionalProperties":false},"was_existing":{"type":"boolean"}},"required":["heartbeat","was_existing"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Conflict - the resource is busy or in a conflicting state.","content":{"application/json":{"schema":{"description":"Conflict - the resource is busy or in a conflicting state.","type":"object","properties":{"error":{"type":"string","enum":["ConflictError","CustomerDeletingConflictError","MutationLeaseConflictError","LastOwnerError","DuplicateCompanyNameError","folder_not_empty"]},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}},"503":{"description":"Service Unavailable - a downstream dependency is degraded.","content":{"application/json":{"schema":{"description":"Service Unavailable - a downstream dependency is degraded.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/heartbeats/mine/{heartbeatId}":{"delete":{"summary":"Delete an own heartbeat definition for a building","tags":["Document Platform"],"description":"Org members can remove their own recurring scheduled Ask turn for a building they can read","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"in":"path","name":"heartbeatId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/heartbeats/mine/{heartbeatId}/paused":{"put":{"summary":"Pause or resume an own heartbeat definition for a building","tags":["Document Platform"],"description":"Org members can stop and restart deliveries for their own recurring scheduled Ask turn for a building they can read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"paused":{"type":"boolean"}},"required":["paused"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"in":"path","name":"heartbeatId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"heartbeat":{"type":"object","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"user_id":{"type":"string"},"building_id":{"type":"string"},"task_prompt":{"type":"string"},"title":{"type":"string"},"days_of_week":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"time_zone":{"type":"string"},"delivery":{"type":"string"},"status":{"type":"string","enum":["provisioning","active"]},"paused":{"default":false,"type":"boolean"},"created_at":{"type":"string"}},"required":["id","customer_id","user_id","building_id","task_prompt","days_of_week","hour","minute","time_zone","delivery","status","paused","created_at"],"additionalProperties":false}},"required":["heartbeat"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/heartbeats/mine/{heartbeatId}/run":{"post":{"summary":"Run an own heartbeat definition for a building now (dev only)","tags":["Document Platform"],"description":"Org members can fire their own recurring scheduled Ask turn for a building they can read immediately on dev; not found elsewhere","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"in":"path","name":"heartbeatId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/heartbeats/{heartbeatId}/task-prompt":{"put":{"summary":"Update a heartbeat task prompt","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"task_prompt":{"type":"string","minLength":1,"maxLength":2000}},"required":["task_prompt"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"in":"path","name":"heartbeatId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"heartbeat":{"type":"object","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"user_id":{"type":"string"},"building_id":{"type":"string"},"task_prompt":{"type":"string"},"title":{"type":"string"},"days_of_week":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"time_zone":{"type":"string"},"delivery":{"type":"string"},"status":{"type":"string","enum":["provisioning","active"]},"paused":{"default":false,"type":"boolean"},"created_at":{"type":"string"}},"required":["id","customer_id","user_id","building_id","task_prompt","days_of_week","hour","minute","time_zone","delivery","status","paused","created_at"],"additionalProperties":false}},"required":["heartbeat"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/heartbeats/mine/{heartbeatId}/task-prompt":{"put":{"summary":"Update an own heartbeat task prompt","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"task_prompt":{"type":"string","minLength":1,"maxLength":2000}},"required":["task_prompt"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"in":"path","name":"heartbeatId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"heartbeat":{"type":"object","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"user_id":{"type":"string"},"building_id":{"type":"string"},"task_prompt":{"type":"string"},"title":{"type":"string"},"days_of_week":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"time_zone":{"type":"string"},"delivery":{"type":"string"},"status":{"type":"string","enum":["provisioning","active"]},"paused":{"default":false,"type":"boolean"},"created_at":{"type":"string"}},"required":["id","customer_id","user_id","building_id","task_prompt","days_of_week","hour","minute","time_zone","delivery","status","paused","created_at"],"additionalProperties":false}},"required":["heartbeat"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/heartbeats/mine/{heartbeatId}/task-prompt":{"put":{"summary":"Update an own heartbeat task prompt for a building","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"task_prompt":{"type":"string","minLength":1,"maxLength":2000}},"required":["task_prompt"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"in":"path","name":"heartbeatId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"heartbeat":{"type":"object","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"user_id":{"type":"string"},"building_id":{"type":"string"},"task_prompt":{"type":"string"},"title":{"type":"string"},"days_of_week":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"time_zone":{"type":"string"},"delivery":{"type":"string"},"status":{"type":"string","enum":["provisioning","active"]},"paused":{"default":false,"type":"boolean"},"created_at":{"type":"string"}},"required":["id","customer_id","user_id","building_id","task_prompt","days_of_week","hour","minute","time_zone","delivery","status","paused","created_at"],"additionalProperties":false}},"required":["heartbeat"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/heartbeats/{heartbeatId}/cadence":{"put":{"summary":"Replace a heartbeat cadence","tags":["Document Platform"],"description":"Org admins can move a recurring scheduled Ask turn to a new cadence. A changed cadence replaces the definition, so the response carries the successor under a new id and the path id may no longer exist afterwards.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"days_of_week":{"minItems":1,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59},"time_zone":{"type":"string","minLength":1},"task_prompt":{"type":"string","minLength":1,"maxLength":2000}},"required":["days_of_week","hour","minute","time_zone"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"in":"path","name":"heartbeatId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"heartbeat":{"type":"object","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"user_id":{"type":"string"},"building_id":{"type":"string"},"task_prompt":{"type":"string"},"title":{"type":"string"},"days_of_week":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"time_zone":{"type":"string"},"delivery":{"type":"string"},"status":{"type":"string","enum":["provisioning","active"]},"paused":{"default":false,"type":"boolean"},"created_at":{"type":"string"}},"required":["id","customer_id","user_id","building_id","task_prompt","days_of_week","hour","minute","time_zone","delivery","status","paused","created_at"],"additionalProperties":false}},"required":["heartbeat"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Conflict - the resource is busy or in a conflicting state.","content":{"application/json":{"schema":{"description":"Conflict - the resource is busy or in a conflicting state.","type":"object","properties":{"error":{"type":"string","enum":["ConflictError","CustomerDeletingConflictError","MutationLeaseConflictError","LastOwnerError","DuplicateCompanyNameError","folder_not_empty"]},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/heartbeats/mine/{heartbeatId}/cadence":{"put":{"summary":"Replace an own heartbeat cadence","tags":["Document Platform"],"description":"Org members can move their own recurring scheduled Ask turn to a new cadence. A changed cadence replaces the definition, so the response carries the successor under a new id and the path id may no longer exist afterwards.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"days_of_week":{"minItems":1,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59},"time_zone":{"type":"string","minLength":1},"task_prompt":{"type":"string","minLength":1,"maxLength":2000}},"required":["days_of_week","hour","minute","time_zone"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"in":"path","name":"heartbeatId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"heartbeat":{"type":"object","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"user_id":{"type":"string"},"building_id":{"type":"string"},"task_prompt":{"type":"string"},"title":{"type":"string"},"days_of_week":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"time_zone":{"type":"string"},"delivery":{"type":"string"},"status":{"type":"string","enum":["provisioning","active"]},"paused":{"default":false,"type":"boolean"},"created_at":{"type":"string"}},"required":["id","customer_id","user_id","building_id","task_prompt","days_of_week","hour","minute","time_zone","delivery","status","paused","created_at"],"additionalProperties":false}},"required":["heartbeat"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Conflict - the resource is busy or in a conflicting state.","content":{"application/json":{"schema":{"description":"Conflict - the resource is busy or in a conflicting state.","type":"object","properties":{"error":{"type":"string","enum":["ConflictError","CustomerDeletingConflictError","MutationLeaseConflictError","LastOwnerError","DuplicateCompanyNameError","folder_not_empty"]},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/heartbeats/mine/{heartbeatId}/cadence":{"put":{"summary":"Replace an own heartbeat cadence for a building","tags":["Document Platform"],"description":"Org members can move their own recurring scheduled Ask turn for a building they can read to a new cadence. A changed cadence replaces the definition, so the response carries the successor under a new id and the path id may no longer exist afterwards.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"days_of_week":{"minItems":1,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59},"time_zone":{"type":"string","minLength":1},"task_prompt":{"type":"string","minLength":1,"maxLength":2000}},"required":["days_of_week","hour","minute","time_zone"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"in":"path","name":"heartbeatId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"heartbeat":{"type":"object","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"user_id":{"type":"string"},"building_id":{"type":"string"},"task_prompt":{"type":"string"},"title":{"type":"string"},"days_of_week":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"time_zone":{"type":"string"},"delivery":{"type":"string"},"status":{"type":"string","enum":["provisioning","active"]},"paused":{"default":false,"type":"boolean"},"created_at":{"type":"string"}},"required":["id","customer_id","user_id","building_id","task_prompt","days_of_week","hour","minute","time_zone","delivery","status","paused","created_at"],"additionalProperties":false}},"required":["heartbeat"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Conflict - the resource is busy or in a conflicting state.","content":{"application/json":{"schema":{"description":"Conflict - the resource is busy or in a conflicting state.","type":"object","properties":{"error":{"type":"string","enum":["ConflictError","CustomerDeletingConflictError","MutationLeaseConflictError","LastOwnerError","DuplicateCompanyNameError","folder_not_empty"]},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/four-digit-categories-enabled":{"put":{"summary":"Update four-digit categories for an organisation","tags":["Document Platform"],"description":"Org admins can control whether NS 3451 four-digit categories are offered and automatically assigned","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fourDigitCategoriesEnabled":{"type":"boolean"}},"required":["fourDigitCategoriesEnabled"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"fourDigitCategoriesEnabled":{"type":"boolean"}},"required":["fourDigitCategoriesEnabled"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/processing-policy":{"get":{"summary":"Get effective data-processing policy for an organisation","tags":["Document Platform"],"description":"Returns only the effective processing region and policy; sensitive consent and customer configuration remain private","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"processingRegion":{"type":"string","enum":["EU"]},"extractProcessingPolicy":{"type":"string","enum":["EU_DEFAULT"]}},"required":["processingRegion","extractProcessingPolicy"],"additionalProperties":false},{"type":"object","properties":{"processingRegion":{"type":"string","enum":["US"]},"extractProcessingPolicy":{"type":"string","enum":["US_FLASH"]}},"required":["processingRegion","extractProcessingPolicy"],"additionalProperties":false}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/my-features":{"get":{"summary":"Get my organisation features","tags":["Document Platform"],"description":"Get the current user's active features for a customer","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"features":{"type":"array","items":{"type":"string"},"description":"List of feature names the user has (e.g., can_chat, can_search)"}},"required":["features"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/portal-link":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"intent":{"type":"string","enum":["sso","dsync","domain_verification","audit_logs","log_streams","certificate_renewal"]},"returnUrl":{"type":"string","format":"uri"}},"required":["intent"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/dsync-overview":{"get":{"summary":"Get the directory sync overview for an organisation","tags":["Document Platform"],"description":"Read-only view of the synced directory groups, the Findable group each maps to in this organisation, and member counts. Groups claimed by another organisation on a shared directory are flagged but never named.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"dsyncEnabled":{"type":"boolean"},"directory":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"state":{"type":"string"},"type":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","name","state","type","createdAt"],"additionalProperties":false},"groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"linkedGroup":{"nullable":true,"type":"object","properties":{"groupId":{"type":"string"},"name":{"type":"string"},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["groupId","name","memberCount"],"additionalProperties":false},"linkedInOtherOrganisation":{"type":"boolean"}},"required":["id","name","linkedGroup","linkedInOtherOrganisation"],"additionalProperties":false}}},"required":["dsyncEnabled","directory","groups"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/authentication-configuration":{"get":{"summary":"Get authentication configuration for an organisation","tags":["Document Platform"],"description":"Get the live SSO, Directory Sync, and domain verification configuration for an organisation","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"sso":{"type":"object","properties":{"availability":{"type":"string","enum":["available","unavailable"]},"connections":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"state":{"type":"string"},"domains":{"type":"array","items":{"type":"string"}}},"required":["name","type","state","domains"],"additionalProperties":false}}},"required":["availability","connections"],"additionalProperties":false},"directorySync":{"type":"object","properties":{"availability":{"type":"string","enum":["available","unavailable"]},"provisioningEnabled":{"type":"boolean"},"effectiveSource":{"type":"string","enum":["organization","shared","none","missing","unknown"]},"directories":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"state":{"type":"string"},"domain":{"type":"string"},"source":{"type":"string","enum":["organization","shared"]}},"required":["name","type","state","domain","source"],"additionalProperties":false}}},"required":["availability","provisioningEnabled","effectiveSource","directories"],"additionalProperties":false},"domainVerification":{"type":"object","properties":{"availability":{"type":"string","enum":["available","unavailable"]},"domains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"state":{"type":"string"},"verificationStrategy":{"type":"string"}},"required":["domain","state","verificationStrategy"],"additionalProperties":false}}},"required":["availability","domains"],"additionalProperties":false}},"required":["sso","directorySync","domainVerification"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/landing-target":{"get":{"summary":"Resolve the landing gate’s structural signals","tags":["Document Platform"],"description":"Building access, checklist access, and the caller's accessible project and collection counts in this customer — everything the landing gates route on, in one call.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"hasBuildingAccess":{"type":"boolean"},"hasChecklistAccess":{"nullable":true,"type":"boolean"},"projectCount":{"nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"singleProjectId":{"nullable":true,"type":"string"},"collectionCount":{"nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"singleCollectionId":{"nullable":true,"type":"string"}},"required":["hasBuildingAccess","hasChecklistAccess","projectCount","singleProjectId","collectionCount","singleCollectionId"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/me/oauth-connections/":{"get":{"responses":{"200":{"description":"Default Response"}}},"delete":{"responses":{"200":{"description":"Default Response"}}}},"/me/oauth-connections/{clientId}":{"delete":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"clientId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/users/":{"get":{"summary":"Get all users for a customer","tags":["Document Platform"],"description":"Retrieve all user data for a specific customer, including optional origin filtering","parameters":[{"schema":{"type":"string","enum":["document-platform","construction"]},"in":"query","name":"origin","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"post":{"summary":"Add user to customer","tags":["Document Platform"],"description":"Add a new user to a customer organization with specified role and locale","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string","enum":["ADMIN","OWNER","WRITE_ACCESS","READ_ACCESS","NO_ACCESS"]},"locale":{"type":"string","enum":["en","no","fr","sv","fi","da"]}},"required":["email","role","locale"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","enum":["document-platform","construction"]},"in":"query","name":"origin","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/users/minimal":{"get":{"summary":"Get minimal user data for a customer","tags":["Document Platform"],"description":"Retrieve minimal user data (email, ID, first/last name) for a customer, useful for non-privileged users","parameters":[{"schema":{"type":"string","enum":["document-platform","construction"]},"in":"query","name":"origin","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/users/v2":{"post":{"summary":"Add user to customer (v2)","tags":["Document Platform"],"description":"Add a new user to a customer organization with resource-based grants instead of roles","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"grants":{"minItems":1,"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string"},"resourceId":{"type":"string"},"relation":{"type":"string"}},"required":["resourceType","resourceId","relation"],"additionalProperties":false}},"locale":{"type":"string","enum":["en","no","fr","sv","fi","da"]}},"required":["email","grants","locale"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","enum":["document-platform","construction"]},"in":"query","name":"origin","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/users/resend-invitation":{"post":{"summary":"Resend invitation email","tags":["Document Platform"],"description":"Resends the WorkOS invitation email for a pending user without promoting them to active","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["email"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/users/{userId}":{"delete":{"summary":"Remove user from customer","tags":["Document Platform"],"description":"Remove a user from a customer organization and all associated buildings/projects","parameters":[{"schema":{"type":"string","enum":["document-platform","construction"]},"in":"query","name":"origin","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Conflict - the resource is busy or in a conflicting state.","content":{"application/json":{"schema":{"description":"Conflict - the resource is busy or in a conflicting state.","type":"object","properties":{"error":{"type":"string","enum":["ConflictError","CustomerDeletingConflictError","MutationLeaseConflictError","LastOwnerError","DuplicateCompanyNameError","folder_not_empty"]},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"put":{"summary":"Update user role","tags":["Document Platform"],"description":"Update a user's role within a customer organization","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["ADMIN","OWNER","WRITE_ACCESS","READ_ACCESS","NO_ACCESS"]}},"required":["role"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","enum":["document-platform","construction"]},"in":"query","name":"origin","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/users/{userId}/buildings/{buildingId}":{"put":{"summary":"Update user building role","tags":["Document Platform"],"description":"Update a user's role for a specific building","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["ADMIN","OWNER","WRITE_ACCESS","READ_ACCESS","NO_ACCESS"]}},"required":["role"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/users/{userId}/buildings/roles":{"put":{"summary":"Update user building roles","tags":["Document Platform"],"description":"Update a user's roles for multiple buildings at once","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"object","properties":{"buildingId":{"type":"string"},"role":{"type":"string","enum":["ADMIN","OWNER","WRITE_ACCESS","READ_ACCESS","NO_ACCESS"]}},"required":["buildingId","role"],"additionalProperties":false}}},"required":["roles"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/users/{userId}/email":{"get":{"summary":"Get user email","tags":["Document Platform"],"description":"Retrieve the email address for a specific user","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/users/invitations":{"get":{"summary":"Get pending invitations","tags":["Document Platform"],"description":"Retrieve all pending user invitations for a customer organization","parameters":[{"schema":{"type":"string","enum":["document-platform","construction"]},"in":"query","name":"origin","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/users/events":{"get":{"summary":"Get user events","tags":["Document Platform"],"description":"Retrieve organization events with user email information","parameters":[{"schema":{"type":"number","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","enum":["document-platform","construction"]},"in":"query","name":"origin","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/users/buildings/{buildingId}/invitations":{"get":{"summary":"Get pending invitations for building admins","tags":["Document Platform"],"description":"Retrieve all pending user invitations for the customer organization. Building admins can access this to manage invitations.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/users/{userId}/mfa/step-up":{"post":{"summary":"Start step-up sign-in for an MFA reset","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"returnTo":{"type":"string","maxLength":2048,"format":"uri"}},"required":["returnTo"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"}},"required":["authorizationUrl"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/users/{userId}/mfa/reset":{"post":{"summary":"Reset a user's MFA (organisation admin)","tags":["Document Platform"],"description":"Removes every authenticator on the user's WorkOS account. Affects the user's whole Findable login. Needs a fresh step-up proof.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"deletedFactors":{"type":"integer","minimum":0,"maximum":9007199254740991},"alreadyReset":{"type":"boolean"}},"required":["deletedFactors","alreadyReset"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/users/{userId}/mfa/step-up":{"post":{"summary":"Start step-up sign-in for an MFA reset (building admin)","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"returnTo":{"type":"string","maxLength":2048,"format":"uri"}},"required":["returnTo"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"}},"required":["authorizationUrl"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/users/{userId}/mfa/reset":{"post":{"summary":"Reset a user's MFA (building admin)","tags":["Document Platform"],"description":"Removes every authenticator on the user's WorkOS account. Affects the user's whole Findable login. Needs a fresh step-up proof.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"deletedFactors":{"type":"integer","minimum":0,"maximum":9007199254740991},"alreadyReset":{"type":"boolean"}},"required":["deletedFactors","alreadyReset"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/deficiency-reports/":{"get":{"summary":"Get deficiency reports","tags":["Document Platform"],"description":"Retrieve all deficiency reports for a specific building","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"post":{"summary":"Generate deficiency report","tags":["Document Platform"],"description":"Generate or regenerate a deficiency report for a building with specified country and version. Generating a first report needs edit access to the building; regenerating an existing one needs administrate access.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"country":{"type":"string","enum":["NO","GB"]},"version":{"type":"string","enum":["v1","v2"]}},"required":["country","version"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/deficiency-reports/status":{"get":{"summary":"Get deficiency report status","tags":["Document Platform"],"description":"Check the generation status of deficiency reports for a building","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/deficiency-reports/{deficiencyReportId}":{"put":{"summary":"Update deficiency report category","tags":["Document Platform"],"description":"Update a specific category within a deficiency report","requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"update":{"type":"object","properties":{"id":{"type":"string"},"checked":{"type":"boolean"},"comment":{"type":"string"},"status":{"anyOf":[{"type":"string","enum":["MISSING","IN_REVIEW","DONE","NOT_DELIVERED","NOT_RELEVANT"]},{"type":"string","enum":["missing","in_review","done","not_delivered","not_relevant"]}]}},"additionalProperties":false}},"required":["update"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"checked":{"type":"boolean"},"comment":{"type":"string"},"status":{"anyOf":[{"type":"string","enum":["MISSING","IN_REVIEW","DONE","NOT_DELIVERED","NOT_RELEVANT"]},{"type":"string","enum":["missing","in_review","done","not_delivered","not_relevant"]}]}},"additionalProperties":false}]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"deficiencyReportId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Delete deficiency report category","tags":["Document Platform"],"description":"Permanently delete a deficiency report category and all its subcategories and associated documents. Admin only.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"deficiencyReportId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/deficiency-reports/batch":{"put":{"summary":"Batch update deficiency report category statuses","tags":["Document Platform"],"description":"Update statuses for multiple deficiency report categories in a single request","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"updates":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["missing","in_review","done","not_delivered","not_relevant"]}},"required":["id","status"],"additionalProperties":false}}},"required":["updates"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/deficiency-reports/export.xlsx":{"post":{"summary":"Export deficiency report as XLSX","tags":["Document Platform"],"description":"Render the supplied deficiency report data as a styled XLSX workbook. The body carries the already-template-joined rows and the localized title.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deficiencyReport":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"nameId":{"type":"string"},"customerId":{"type":"string"},"buildingId":{"type":"string"},"name":{"type":"string"},"theme":{"type":"string"},"createdAt":{"type":"string"},"checked":{"type":"boolean"},"status":{"type":"string"},"comment":{"type":"string"},"nameParentId":{"type":"string"},"laws":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"link":{"type":"string"}},"required":["title","link"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"removedAt":{"type":"string"}},"required":["id"],"additionalProperties":{}}},"subcategories":{"type":"array","items":{}}},"required":["id","nameId","customerId","buildingId","name","theme","createdAt"],"additionalProperties":{}}},"locale":{"type":"string","enum":["en","no","fr","sv","fi","da"]},"title":{"type":"string"},"filterByLawRequired":{"type":"boolean"}},"required":["deficiencyReport","locale"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/search":{"get":{"summary":"Search documents","tags":["Document Platform"],"description":"Search for documents across buildings with optional filtering by discipline, document type, and floor","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"string"},"in":"query","name":"buildingIds","required":false,"description":"Comma-separated list of building UUIDs"},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"projectId","required":false,"description":"Project UUID for project-scoped document access"},{"schema":{"type":"string"},"in":"query","name":"propertyIds","required":false,"description":"Comma-separated list of portfolio UUIDs"},{"schema":{"type":"string"},"in":"query","name":"query","required":false},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":100},"in":"query","name":"numberOfHits","required":false},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false},{"schema":{"type":"string"},"in":"query","name":"discipline","required":false},{"schema":{"type":"string"},"in":"query","name":"documentType","required":false},{"schema":{"type":"string"},"in":"query","name":"floor","required":false},{"schema":{"type":"string"},"in":"query","name":"sortField","required":false},{"schema":{"type":"boolean"},"in":"query","name":"disableFuzziness","required":false},{"schema":{"type":"boolean"},"in":"query","name":"useAiFilenames","required":false},{"schema":{"type":"string"},"in":"query","name":"aggregationFields","required":false,"description":"Comma-separated list of aggregation fields"},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/v2/search":{"get":{"summary":"Search documents with pagination metadata","tags":["Document Platform"],"description":"Search for documents with document-level FGA filtering. Returns hasMore for infinite scroll.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"string"},"in":"query","name":"buildingIds","required":false,"description":"Comma-separated list of building UUIDs"},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"projectId","required":false,"description":"Project UUID for project-scoped document access"},{"schema":{"type":"string"},"in":"query","name":"propertyIds","required":false,"description":"Comma-separated list of portfolio UUIDs"},{"schema":{"type":"string"},"in":"query","name":"query","required":false},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":100},"in":"query","name":"numberOfHits","required":true,"description":"Number of hits to return"},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":true,"description":"Offset to start from"},{"schema":{"type":"string"},"in":"query","name":"discipline","required":false},{"schema":{"type":"string"},"in":"query","name":"documentType","required":false},{"schema":{"type":"string"},"in":"query","name":"floor","required":false},{"schema":{"type":"string"},"in":"query","name":"sortField","required":false},{"schema":{"type":"boolean"},"in":"query","name":"disableFuzziness","required":false},{"schema":{"type":"boolean"},"in":"query","name":"useAiFilenames","required":false},{"schema":{"type":"string"},"in":"query","name":"aggregationFields","required":false,"description":"Comma-separated list of aggregation fields"},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"disableFilenameFallback","required":false,"description":"Skip the filename fallback on a search with no hits (typeahead)"},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/documents/discover/intent":{"post":{"summary":"Resolve an extraction into document categories","tags":["Document Platform"],"description":"Maps an extraction's name, description and column names (or a phrase the user typed) onto NS 3451 category codes, so matching documents can then be retrieved deterministically.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":2000},"datapointNames":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","maxLength":200}},"promptOverride":{"type":"string","minLength":1,"maxLength":500}},"required":["datapointNames"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"categories":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"}},"required":["code","label"],"additionalProperties":false}},"intentSummary":{"type":"string"},"rationale":{"type":"string"}},"required":["categories","intentSummary","rationale"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/documents/discover":{"post":{"summary":"Find documents in given categories across a batch of buildings","tags":["Document Platform"],"description":"Deterministic category-filtered search, FGA-filtered per document. Called once per building batch so the client can render results progressively. When intentSummary is sent, the batch is additionally scored against it by a model (metered as doc_discovery_rerank), with each rationale written in `locale` (else the stored user locale, else English); the document set itself is unaffected.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"categoryCodes":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"buildingIds":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"remainingBudget":{"type":"integer","minimum":0,"maximum":9007199254740991},"intentSummary":{"type":"string","minLength":1,"maxLength":500},"locale":{"type":"string","enum":["en","no","fr","sv","fi","da"]}},"required":["categoryCodes","buildingIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"filename":{"type":"string"},"categoryCode":{"type":"string"},"folderPath":{"type":"string"},"documentDate":{"type":"string"},"relevanceScore":{"type":"integer","minimum":0,"maximum":100},"rationale":{"type":"string"}},"required":["documentId","buildingId","filename"],"additionalProperties":false}},"totalMatches":{"type":"integer","minimum":0,"maximum":9007199254740991},"capReached":{"type":"boolean"}},"required":["documents","totalMatches","capReached"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/deficiency-reports/{deficiencyReportCategoryId}/documents/{documentId}":{"post":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"deficiencyReportCategoryId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}},"put":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"deficiencyReportCategoryId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/deficiency-reports/documents":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/checklists/my-checklist-instances":{"get":{"summary":"Get accessible checklists","tags":["Document Platform"],"description":"Retrieve all checklists the current user has access to via explicit assignments or inherited access (customer/portfolio/building). Returns checklists grouped with their buildings array.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List of checklists grouped with buildings","content":{"application/json":{"schema":{"description":"List of checklists grouped with buildings","type":"array","items":{"type":"object","properties":{"checklistId":{"type":"string"},"checklistName":{"type":"string"},"customerId":{"type":"string"},"versionFamilyId":{"type":"string"},"versionNumber":{"type":"number"},"updatedAt":{"type":"string"},"buildings":{"type":"array","items":{"type":"object","properties":{"buildingId":{"type":"string"},"buildingName":{"type":"string"}}}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/":{"get":{"summary":"Get all checklists","tags":["Document Platform"],"description":"Retrieve checklists for a customer, filtered by user access permissions","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List of checklists with user emails","content":{"application/json":{"schema":{"description":"List of checklists with user emails","type":"array","items":{"type":"object","additionalProperties":true}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}":{"get":{"summary":"Get checklist by ID","tags":["Document Platform"],"description":"Retrieve detailed information for a specific checklist","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Checklist details","content":{"application/json":{"schema":{"description":"Checklist details","type":"object","additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/create":{"post":{"summary":"Create new checklist","tags":["Document Platform"],"description":"Create a new checklist with items and automatically create root folder","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":1000},"settings_requireApproval":{"type":"boolean"},"settings_responsibleUserIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":1000},"order":{"type":"number","minimum":0}},"required":["name"],"additionalProperties":false}}},"required":["name","description"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Created checklist","content":{"application/json":{"schema":{"description":"Created checklist","type":"object","properties":{"checklistId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"customerId":{"type":"string"},"type":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"},"groups":{"type":"array"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/versions":{"post":{"summary":"Create checklist version","tags":["Document Platform"],"description":"Create the next version of a checklist by copying its structure and settings","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"checklistId":{"type":"string"},"customerId":{"type":"string"},"versionFamilyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"versionNumber":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"versionSuccessorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"createdBy":{"type":"string"},"deletedAt":{"nullable":true,"type":"string"},"deletedBy":{"nullable":true,"type":"string"},"deleted":{"type":"boolean"},"numberOfBuildings":{"type":"number"},"groups":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"createdBy":{"type":"string"}},"required":["title"],"additionalProperties":false}},"type":{"type":"string","enum":["default","project"]},"projectId":{"type":"string"},"settings_requireApproval":{"type":"boolean"},"settings_responsibleUserIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["checklistId","customerId","name","deleted","groups"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/update":{"put":{"summary":"Update checklist","tags":["Document Platform"],"description":"Update an existing checklist name, description, or items","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":1000},"settings_requireApproval":{"type":"boolean"},"settings_responsibleUserIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":1000},"order":{"type":"number","minimum":0}},"required":["name"],"additionalProperties":false}}},"required":["name","description"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Updated checklist","content":{"application/json":{"schema":{"description":"Updated checklist","type":"object","additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/delete":{"put":{"summary":"Delete checklist","tags":["Document Platform"],"description":"Soft delete a checklist and mark it as deleted","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Deletion confirmation","content":{"application/json":{"schema":{"description":"Deletion confirmation","type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/batch-delete":{"put":{"summary":"Batch delete checklists","tags":["Document Platform"],"description":"Delete multiple checklists at once","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"checklistIds":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["checklistIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Batch deletion results","content":{"application/json":{"schema":{"description":"Batch deletion results","type":"object","properties":{"message":{"type":"string"},"results":{"type":"array"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/assign-buildings":{"post":{"summary":"Assign checklist to buildings","tags":["Document Platform"],"description":"Assign a checklist to one or more buildings","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"buildingIds":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["buildingIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Assignment results","content":{"application/json":{"schema":{"description":"Assignment results","type":"object","properties":{"message":{"type":"string"},"results":{"type":"array"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/assigned-buildings":{"get":{"summary":"Get assigned buildings","tags":["Document Platform"],"description":"Retrieve all buildings that are assigned to a checklist","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List of assigned buildings with details","content":{"application/json":{"schema":{"description":"List of assigned buildings with details","type":"array"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/delete-buildings":{"delete":{"summary":"Remove buildings from checklist","tags":["Document Platform"],"description":"Remove one or more buildings from a checklist assignment","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"buildingIds":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["buildingIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Removal confirmation","content":{"application/json":{"schema":{"description":"Removal confirmation","type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/check-access":{"get":{"summary":"Check checklist access","tags":["Document Platform"],"description":"Check if the current user has access to a checklist instance and optionally a checklist item. Returns authorized if user has access at either the checklist level or item level.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"checklistItemId","required":false},{"schema":{"type":"string","enum":["minimal_access","administrate","read","edit","upload","parent"]},"in":"query","name":"relation","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Access check result","content":{"application/json":{"schema":{"description":"Access check result","type":"object","properties":{"authorized":{"type":"boolean"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/items":{"get":{"summary":"Get checklist items","tags":["Document Platform"],"description":"Retrieve all items that belong to a specific checklist","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List of checklist items","content":{"application/json":{"schema":{"description":"List of checklist items","type":"array"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/items/grouped":{"get":{"summary":"Get grouped checklist items","tags":["Document Platform"],"description":"Retrieve checklist items organized by their assigned groups","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Checklist items organized by groups","content":{"application/json":{"schema":{"description":"Checklist items organized by groups","type":"object","additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/checklist-item/create":{"post":{"summary":"Create checklist item","tags":["Document Platform"],"description":"Create a new item within a checklist","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":1000},"order":{"type":"number","minimum":0},"parentFolderId":{"type":"string"},"frequency":{"type":"string"},"frequencyDays":{"type":"integer","minimum":0,"maximum":9007199254740991},"tags":{"type":"array","items":{"type":"string"}},"itemType":{"type":"string","enum":["document","question"]},"answerOptions":{"minItems":2,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"label":{"type":"string","minLength":1,"maxLength":200},"disposition":{"type":"string","enum":["compliant","non-compliant","exempt"]}},"required":["id","label","disposition"],"additionalProperties":false}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Created checklist item","content":{"application/json":{"schema":{"description":"Created checklist item","type":"object","additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/checklist-item/{checklistItemId}/duplicate":{"post":{"summary":"Duplicate checklist item","tags":["Document Platform"],"description":"Duplicate an existing checklist item","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistItemId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Duplicated checklist item","content":{"application/json":{"schema":{"description":"Duplicated checklist item","type":"object","additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/checklist-item/{checklistItemId}/update":{"put":{"summary":"Update checklist item","tags":["Document Platform"],"description":"Update an existing checklist item properties","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":1000},"order":{"type":"number","minimum":0},"parentFolderId":{"type":"string"},"frequency":{"type":"string"},"frequencyDays":{"type":"integer","minimum":0,"maximum":9007199254740991},"tags":{"type":"array","items":{"type":"string"}},"itemType":{"type":"string","enum":["document","question"]},"answerOptions":{"minItems":2,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"label":{"type":"string","minLength":1,"maxLength":200},"disposition":{"type":"string","enum":["compliant","non-compliant","exempt"]}},"required":["id","label","disposition"],"additionalProperties":false}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistItemId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Updated checklist item","content":{"application/json":{"schema":{"description":"Updated checklist item","type":"object","additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/checklist-item/{checklistItemId}/delete":{"delete":{"summary":"Delete checklist item","tags":["Document Platform"],"description":"Hard delete a checklist item","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistItemId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Checklist item deleted","content":{"application/json":{"schema":{"description":"Checklist item deleted","type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/checklist-items/batch-delete":{"delete":{"summary":"Batch delete checklist items","tags":["Document Platform"],"description":"Hard delete specific checklist items by their IDs","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"checklistItemIds":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["checklistItemIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Checklist items hard deleted","content":{"application/json":{"schema":{"description":"Checklist items hard deleted","type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/checklist-item/{checklistItemId}/building/{buildingId}/document-suggestions":{"get":{"summary":"Get document suggestions","tags":["Document Platform"],"description":"Get suggested documents for a checklist item in a specific building","parameters":[{"schema":{"type":"number"},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistItemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List of suggested documents","content":{"application/json":{"schema":{"description":"List of suggested documents","type":"array"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/create-from-template":{"post":{"summary":"Create checklist from template","tags":["Document Platform"],"description":"Create a new checklist using a predefined template key with folders and items","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"templateKey":{"type":"string"},"locale":{"default":"no","type":"string"}},"required":["templateKey"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Created checklist from template","content":{"application/json":{"schema":{"description":"Created checklist from template","type":"object","additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/templates":{"get":{"summary":"List available checklist templates","tags":["Document Platform"],"description":"Returns all registered templates with their name and description","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List of available templates","content":{"application/json":{"schema":{"description":"List of available templates","type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/templates/{templateKey}":{"get":{"summary":"Get template folder structure","tags":["Document Platform"],"description":"Returns a template with its folder tree and checklist items","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"templateKey","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Template with folder tree and items","content":{"application/json":{"schema":{"description":"Template with folder tree and items","type":"object","additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/add-from-template":{"post":{"summary":"Add folders from template to existing checklist","tags":["Document Platform"],"description":"Adds selected folders (with subfolders and checklist items) from a built-in template or project template to an existing checklist","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["selectedFolderPaths"],"properties":{"templateKey":{"type":"string"},"sourceProjectId":{"type":"string"},"selectedFolderPaths":{"type":"array","items":{"type":"string"}},"parentFolderId":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Result of adding folders from template","content":{"application/json":{"schema":{"description":"Result of adding folders from template","type":"object","properties":{"foldersCreated":{"type":"number"},"itemsCreated":{"type":"number"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/add-group":{"put":{"summary":"Add group to checklist","tags":["Document Platform"],"description":"Add a new group to organize checklist items","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Updated checklist with new group","content":{"application/json":{"schema":{"description":"Updated checklist with new group","type":"object","additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/group/{groupId}/update-group":{"put":{"summary":"Update checklist group","tags":["Document Platform"],"description":"Update the title of a specific group within a checklist","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Updated checklist with modified group","content":{"application/json":{"schema":{"description":"Updated checklist with modified group","type":"object","additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/group/{groupId}/delete-group":{"put":{"summary":"Delete checklist group","tags":["Document Platform"],"description":"Delete a group from a checklist and reassign its items","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"checklistItemIds":{"type":"array","items":{"type":"string"}}},"required":["checklistItemIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Updated checklist with deleted group","content":{"application/json":{"schema":{"description":"Updated checklist with deleted group","type":"object","additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/":{"get":{"summary":"Get building checklists","tags":["Document Platform"],"description":"Retrieve all available checklists for a building with user email mapping","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items":{"get":{"summary":"Get checklist items","tags":["Document Platform"],"description":"Retrieve all available items for a checklist in a building","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/grouped":{"get":{"summary":"Get grouped checklist items","tags":["Document Platform"],"description":"Retrieve checklist items organized by their assigned groups","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}":{"get":{"summary":"Get checklist item details","tags":["Document Platform"],"description":"Retrieve detailed information for a specific checklist item in a building","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}/attachments":{"post":{"summary":"Attach documents to checklist item","tags":["Document Platform"],"description":"Attach one or more documents to a checklist item","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"filename":{"type":"string"}},"required":["id","filename"],"additionalProperties":false}}},"required":["documents"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"get":{"summary":"Get checklist item attachments","tags":["Document Platform"],"description":"Retrieve all documents attached to a checklist item","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/attachments/bulk":{"post":{"summary":"Bulk attach documents to checklist items","tags":["Document Platform"],"description":"Attach one or more documents to multiple project requirements in a single request.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"filename":{"type":"string"}},"required":["id","filename"],"additionalProperties":false}},"itemIds":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["documents","itemIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}/documents/batch/create":{"post":{"summary":"Batch create documents for checklist item","tags":["Document Platform"],"description":"Create multiple document entries for a specific checklist item","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documents"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}/delete-attachments/{id}":{"put":{"summary":"Delete checklist item attachment","tags":["Document Platform"],"description":"Soft delete a single document attachment from a checklist item","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}/delete-attachments":{"put":{"summary":"Delete multiple checklist item attachments","tags":["Document Platform"],"description":"Soft delete multiple document attachments from a checklist item","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"onlyPendingAiSuggestions":{"type":"boolean"},"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["ids"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}/attachments/{associationId}/approval-status":{"put":{"summary":"Update individual document approval status","tags":["Document Platform"],"description":"Update the approval status of a specific document in a checklist item","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"approvalStatus":{"type":"string","enum":["approved","declined","pending"]},"assignedUserId":{"type":"string"},"reason":{"type":"string"},"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["approvalStatus"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"associationId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}/update-approval-status":{"put":{"summary":"Update bulk approval status of documents from a checklist item","tags":["Document Platform"],"description":"Update the bulk approval status of documents from a checklist item","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"approvalStatus":{"type":"string","enum":["approved","declined","pending"]},"assignedUserId":{"type":"string"},"reason":{"type":"string"},"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["approvalStatus"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}/assign":{"post":{"summary":"Assign user to checklist item","tags":["Document Platform"],"description":"Assign or unassign a user to a specific checklist item","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/assign":{"post":{"summary":"Batch assign user to checklist items","tags":["Document Platform"],"description":"Assign or unassign a user to multiple checklist items at once","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"nullable":true,"type":"string","minLength":1},"itemIds":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["userId","itemIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}/assign-subcontractor":{"post":{"summary":"Assign subcontractor to checklist item","tags":["Document Platform"],"description":"Assign or unassign a subcontractor (company) to a project requirement. Project checklists only — default checklists use /assign with userId.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subcontractorId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["subcontractorId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/assign-subcontractor":{"post":{"summary":"Batch assign subcontractor to checklist items","tags":["Document Platform"],"description":"Assign or unassign a subcontractor (company) to multiple project requirements at once.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subcontractorId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"itemIds":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["subcontractorId","itemIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/folders/{folderId}/assign-subcontractor":{"post":{"summary":"Assign subcontractor to folder items","tags":["Document Platform"],"description":"Assign a subcontractor (company) to every item under a folder subtree in a project.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subcontractorId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["subcontractorId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}/assign-tenant":{"post":{"summary":"Assign building tenant to checklist item","tags":["Document Platform"],"description":"Assign or unassign a building tenant (company) to a checklist item. Building/default checklists — projects use /assign-subcontractor with projectId.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subcontractorId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["subcontractorId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/assign-tenant":{"post":{"summary":"Batch assign building tenant to checklist items","tags":["Document Platform"],"description":"Assign or unassign a building tenant (company) to multiple checklist items at once.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subcontractorId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"itemIds":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["subcontractorId","itemIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/assign-tenant":{"post":{"summary":"Assign building tenant to a whole checklist","tags":["Document Platform"],"description":"Assign or unassign a building tenant (company) to an entire checklist instance in this building (T-8512).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subcontractorId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["subcontractorId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}/invite":{"post":{"summary":"Invite and assign user to checklist item","tags":["Document Platform"],"description":"Invite a new user and assign them to a specific checklist item","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/folders/{folderId}/assign":{"post":{"summary":"Assign user to folder items","tags":["Document Platform"],"description":"Assign a user to all items within a specific folder","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/folders/{folderId}/invite":{"post":{"summary":"Invite and assign user to folder items","tags":["Document Platform"],"description":"Invite a new user and assign them to all items within a specific folder","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}/create-checklist-item-building-associations":{"post":{"summary":"Create checklist item building association","tags":["Document Platform"],"description":"Create an association between a checklist item and a building with optional status and date","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentDate":{"type":"string"},"status":{"type":"string","enum":["missing","document-missing","date-missing","compliant-no-renewal","overdue","approaching-renewal","compliant","error-calculating-due-date","answer-missing","non-compliant","exempt"]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}/update-checklist-item-building-associations":{"put":{"summary":"Update checklist item building association","tags":["Document Platform"],"description":"Update an existing checklist item building association with new document date","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentDate":{"type":"string"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}/create-checklist-item-building-associations/add-notes":{"post":{"summary":"Create checklist item building association with note","tags":["Document Platform"],"description":"Create a checklist item building association and add a note to it","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"},"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}/update-checklist-item-building-associations/add-notes":{"put":{"summary":"Update checklist item building association note","tags":["Document Platform"],"description":"Update the note for an existing checklist item building association","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"},"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}/notes":{"post":{"summary":"Add a note comment","tags":["Document Platform"],"description":"Add a comment to the notes history on a checklist item building association","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":2000},"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["content"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}/notes/{commentId}":{"delete":{"summary":"Delete a note comment","tags":["Document Platform"],"description":"Delete a comment from the notes history on a checklist item building association","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"commentId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}/select-answer":{"put":{"summary":"Select answer on a question checklist item","tags":["Document Platform"],"description":"Set or clear the selected answer for a question-type checklist item on a specific building. Pass null to clear.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"selectedAnswerId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["selectedAnswerId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/report":{"get":{"summary":"Download checklist report","tags":["Document Platform"],"description":"Download an Excel report for all items in a checklist","parameters":[{"schema":{"type":"string"},"in":"query","name":"filename","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/approval":{"get":{"summary":"Get checklist approval state","tags":["Document Platform"],"description":"Get the instance-level approval state (in_progress / pending_approval / approved / rejected) for a building checklist","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/submit-for-approval":{"post":{"summary":"Submit checklist for approval","tags":["Document Platform"],"description":"Mark a completed checklist instance as pending approval and notify the chosen approver","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"approverUserId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["approverUserId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/approve":{"post":{"summary":"Approve checklist","tags":["Document Platform"],"description":"Approve a checklist instance that is pending approval","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/reject":{"post":{"summary":"Reject checklist","tags":["Document Platform"],"description":"Reject a checklist instance that is pending approval, recording a reason and reopening it for editing","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":2000},"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["reason"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/withdraw-approval":{"post":{"summary":"Withdraw checklist approval request","tags":["Document Platform"],"description":"Cancel a pending approval request, returning the checklist instance to in_progress","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/reopen-approval":{"post":{"summary":"Reopen signed checklist","tags":["Document Platform"],"description":"Reopen an approved checklist instance for editing, returning it to in_progress (instance admin only)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/export-pdf":{"post":{"summary":"Export checklist as PDF","tags":["Document Platform"],"description":"Render the current checklist to a PDF and file it into the building's Checklists folder","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/access/{relation}":{"get":{"summary":"Check checklist access","tags":["Document Platform"],"description":"Check if the current user has a specific access level to a checklist instance","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","enum":["minimal_access","administrate","read","edit","upload"]},"in":"path","name":"relation","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}/access/{relation}":{"get":{"summary":"Check checklist item access","tags":["Document Platform"],"description":"Check if the current user has a specific access level to a checklist item instance","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","enum":["minimal_access","administrate","read","edit","upload"]},"in":"path","name":"relation","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}/image-attachments":{"post":{"summary":"Attach image documents to checklist item","tags":["Document Platform"],"description":"Attach one or more existing image documents to a checklist item","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"filename":{"type":"string"}},"required":["id","filename"],"additionalProperties":false}}},"required":["documents"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}},"get":{"summary":"Get checklist item image attachments","tags":["Document Platform"],"description":"Retrieve all image documents attached to a checklist item","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}/delete-image-attachments/{id}":{"put":{"summary":"Delete checklist item image attachment","tags":["Document Platform"],"description":"Soft delete a single image attachment from a checklist item","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}/delete-image-attachments":{"put":{"summary":"Delete multiple checklist item image attachments","tags":["Document Platform"],"description":"Soft delete multiple image attachment entries from a checklist item","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["ids"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}/image-attachments/{associationId}/approval-status":{"put":{"summary":"Update image attachment approval status","tags":["Document Platform"],"description":"Update the approval status of a specific image attachment on a checklist item","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"approvalStatus":{"type":"string","enum":["approved","declined","pending"]},"assignedUserId":{"type":"string"},"reason":{"type":"string"},"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["approvalStatus"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"associationId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}/update-image-attachments-approval-status":{"put":{"summary":"Bulk update image attachment approval status","tags":["Document Platform"],"description":"Update the approval status of all image attachments on a checklist item","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"approvalStatus":{"type":"string","enum":["approved","declined","pending"]},"assignedUserId":{"type":"string"},"reason":{"type":"string"},"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["approvalStatus"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/items/{itemId}/image-attachments/batch/create":{"post":{"summary":"Batch create image documents for checklist item","tags":["Document Platform"],"description":"Create multiple image Document rows for a checklist item (upload metadata). Use the attach endpoint to link them to the item.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documents"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"itemId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/generate-suggestions":{"post":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"workflowId":{"type":"string"}},"required":["success","message","workflowId"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/suggestions-state":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"suggestionsGeneratedAt":{"nullable":true,"type":"string"},"hasPendingAiSuggestions":{"type":"boolean"},"runningJob":{"nullable":true,"type":"object","properties":{"workflowId":{"type":"string"},"kind":{"type":"string","enum":["generate","clear"]}},"required":["workflowId","kind"],"additionalProperties":false}},"required":["suggestionsGeneratedAt","hasPendingAiSuggestions","runningJob"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/suggestions/{workflowId}/status":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"workflowId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"workflowId":{"type":"string"},"progress":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["preparing","running","completed","failed"]},"totalItems":{"type":"number"},"processedItems":{"type":"number"},"attachedDocuments":{"type":"number"},"itemsWithNoMatch":{"type":"number"},"removedDocuments":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string"},"message":{"type":"string"}},"required":["itemId","message"],"additionalProperties":false}},"startedAt":{"type":"string"},"completedAt":{"nullable":true,"type":"string"},"message":{"type":"string"}},"required":["status","totalItems","processedItems","attachedDocuments","itemsWithNoMatch","errors","startedAt","completedAt","message"],"additionalProperties":false}},"required":["success","message","workflowId","progress"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/{buildingId}/building-checklists/{checklistId}/clear-generated-suggestions":{"post":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"workflowId":{"type":"string"}},"required":["success","message","workflowId"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/{buildingId}/tenants/suggestions/{executionId}":{"get":{"tags":["Document Platform"],"parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000},"in":"query","name":"offset","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["template"]},"origin":{"type":"string","enum":["customer","findable"]},"workflowId":{"type":"string"},"name":{"nullable":true,"type":"string","maxLength":513},"description":{"nullable":true,"type":"string","maxLength":1025},"columnCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"columns":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"displayName":{"nullable":true,"type":"string","maxLength":129},"kind":{"type":"string"}},"required":["label","displayName","kind"],"additionalProperties":false}},"columnsTruncated":{"type":"boolean"},"updatedAt":{"nullable":true,"type":"string"}},"required":["kind","origin","workflowId","name","description","columnCount","columns","columnsTruncated","updatedAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["execution"]},"executionId":{"type":"string"},"name":{"nullable":true,"type":"string","maxLength":513},"status":{"type":"string","enum":["draft","idle","pending","running","finished","failed"]},"templateId":{"nullable":true,"type":"string"},"source":{"type":"string","enum":["user","insight_card"]},"isPrivate":{"type":"boolean"},"createdAt":{"type":"string"},"startedAt":{"nullable":true,"type":"string"},"finishedAt":{"nullable":true,"type":"string"},"documentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"groupCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"columnCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"path":{"type":"string"}},"required":["kind","executionId","name","status","templateId","source","isPrivate","createdAt","startedAt","finishedAt","documentCount","groupCount","columnCount","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["execution_detail"]},"executionId":{"type":"string"},"name":{"nullable":true,"type":"string","maxLength":513},"status":{"type":"string","enum":["draft","idle","pending","running","finished","failed"]},"templateId":{"nullable":true,"type":"string"},"source":{"type":"string","enum":["user","insight_card"]},"isPrivate":{"type":"boolean"},"createdAt":{"type":"string"},"startedAt":{"nullable":true,"type":"string"},"finishedAt":{"nullable":true,"type":"string"},"documentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"groupCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"columnCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"path":{"type":"string"},"description":{"nullable":true,"type":"string","maxLength":1025},"columns":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"displayName":{"nullable":true,"type":"string","maxLength":129},"kind":{"type":"string"}},"required":["label","displayName","kind"],"additionalProperties":false}},"columnsTruncated":{"type":"boolean"}},"required":["kind","executionId","name","status","templateId","source","isPrivate","createdAt","startedAt","finishedAt","documentCount","groupCount","columnCount","path","description","columns","columnsTruncated"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["document_output"]},"documentId":{"type":"string"},"documentName":{"nullable":true,"type":"string","maxLength":513},"label":{"type":"string"},"status":{"type":"string","enum":["single","notFound","multiple","failed"]},"value":{"nullable":true,"type":"string","maxLength":2001},"valueTruncated":{"type":"boolean"},"confidence":{"nullable":true,"type":"string","enum":["low","medium","high"]},"edited":{"type":"boolean"},"page":{"nullable":true,"type":"number"}},"required":["kind","documentId","documentName","label","status","value","valueTruncated","confidence","edited","page"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["group_output"]},"groupId":{"type":"string"},"groupName":{"nullable":true,"type":"string","maxLength":513},"label":{"type":"string"},"status":{"type":"string","enum":["unavailable"]},"readableDocumentCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","groupId","groupName","label","status","readableDocumentCount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["group_result"]},"groupId":{"type":"string"},"groupName":{"nullable":true,"type":"string","maxLength":513},"label":{"type":"string"},"status":{"type":"string","enum":["single","notFound","multiple","failed"]},"value":{"nullable":true,"type":"string","maxLength":2001},"valueTruncated":{"type":"boolean"},"confidence":{"nullable":true,"type":"string","enum":["low","medium","high"]},"inputDocumentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"contributions":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string"},"documentName":{"nullable":true,"type":"string","maxLength":513},"status":{"type":"string","enum":["single","notFound","multiple","failed"]},"value":{"nullable":true,"type":"string","maxLength":2001},"valueTruncated":{"type":"boolean"},"confidence":{"nullable":true,"type":"string","enum":["low","medium","high"]},"page":{"nullable":true,"type":"number"}},"required":["documentId","documentName","status","value","valueTruncated","confidence","page"],"additionalProperties":false}},"contributionsTruncated":{"type":"boolean"}},"required":["kind","groupId","groupName","label","status","value","valueTruncated","confidence","inputDocumentCount","contributions","contributionsTruncated"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["column_summary"]},"label":{"type":"string"},"displayName":{"nullable":true,"type":"string","maxLength":513},"found":{"type":"integer","minimum":0,"maximum":9007199254740991},"notFound":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"unavailable":{"type":"integer","minimum":0,"maximum":9007199254740991},"edited":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","label","displayName","found","notFound","failed","unavailable","edited"],"additionalProperties":false}]}},"nextCursor":{"type":"string"},"truncated":{"type":"boolean"},"accessFiltered":{"type":"boolean"},"resultsPath":{"type":"string"},"scanComplete":{"type":"boolean"},"groups":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"groupId":{"type":"string"},"name":{"type":"string","maxLength":255},"rows":{"maxItems":300,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["template"]},"origin":{"type":"string","enum":["customer","findable"]},"workflowId":{"type":"string"},"name":{"nullable":true,"type":"string","maxLength":513},"description":{"nullable":true,"type":"string","maxLength":1025},"columnCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"columns":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"displayName":{"nullable":true,"type":"string","maxLength":129},"kind":{"type":"string"}},"required":["label","displayName","kind"],"additionalProperties":false}},"columnsTruncated":{"type":"boolean"},"updatedAt":{"nullable":true,"type":"string"}},"required":["kind","origin","workflowId","name","description","columnCount","columns","columnsTruncated","updatedAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["execution"]},"executionId":{"type":"string"},"name":{"nullable":true,"type":"string","maxLength":513},"status":{"type":"string","enum":["draft","idle","pending","running","finished","failed"]},"templateId":{"nullable":true,"type":"string"},"source":{"type":"string","enum":["user","insight_card"]},"isPrivate":{"type":"boolean"},"createdAt":{"type":"string"},"startedAt":{"nullable":true,"type":"string"},"finishedAt":{"nullable":true,"type":"string"},"documentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"groupCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"columnCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"path":{"type":"string"}},"required":["kind","executionId","name","status","templateId","source","isPrivate","createdAt","startedAt","finishedAt","documentCount","groupCount","columnCount","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["execution_detail"]},"executionId":{"type":"string"},"name":{"nullable":true,"type":"string","maxLength":513},"status":{"type":"string","enum":["draft","idle","pending","running","finished","failed"]},"templateId":{"nullable":true,"type":"string"},"source":{"type":"string","enum":["user","insight_card"]},"isPrivate":{"type":"boolean"},"createdAt":{"type":"string"},"startedAt":{"nullable":true,"type":"string"},"finishedAt":{"nullable":true,"type":"string"},"documentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"groupCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"columnCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"path":{"type":"string"},"description":{"nullable":true,"type":"string","maxLength":1025},"columns":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"displayName":{"nullable":true,"type":"string","maxLength":129},"kind":{"type":"string"}},"required":["label","displayName","kind"],"additionalProperties":false}},"columnsTruncated":{"type":"boolean"}},"required":["kind","executionId","name","status","templateId","source","isPrivate","createdAt","startedAt","finishedAt","documentCount","groupCount","columnCount","path","description","columns","columnsTruncated"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["document_output"]},"documentId":{"type":"string"},"documentName":{"nullable":true,"type":"string","maxLength":513},"label":{"type":"string"},"status":{"type":"string","enum":["single","notFound","multiple","failed"]},"value":{"nullable":true,"type":"string","maxLength":2001},"valueTruncated":{"type":"boolean"},"confidence":{"nullable":true,"type":"string","enum":["low","medium","high"]},"edited":{"type":"boolean"},"page":{"nullable":true,"type":"number"}},"required":["kind","documentId","documentName","label","status","value","valueTruncated","confidence","edited","page"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["group_output"]},"groupId":{"type":"string"},"groupName":{"nullable":true,"type":"string","maxLength":513},"label":{"type":"string"},"status":{"type":"string","enum":["unavailable"]},"readableDocumentCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","groupId","groupName","label","status","readableDocumentCount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["group_result"]},"groupId":{"type":"string"},"groupName":{"nullable":true,"type":"string","maxLength":513},"label":{"type":"string"},"status":{"type":"string","enum":["single","notFound","multiple","failed"]},"value":{"nullable":true,"type":"string","maxLength":2001},"valueTruncated":{"type":"boolean"},"confidence":{"nullable":true,"type":"string","enum":["low","medium","high"]},"inputDocumentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"contributions":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string"},"documentName":{"nullable":true,"type":"string","maxLength":513},"status":{"type":"string","enum":["single","notFound","multiple","failed"]},"value":{"nullable":true,"type":"string","maxLength":2001},"valueTruncated":{"type":"boolean"},"confidence":{"nullable":true,"type":"string","enum":["low","medium","high"]},"page":{"nullable":true,"type":"number"}},"required":["documentId","documentName","status","value","valueTruncated","confidence","page"],"additionalProperties":false}},"contributionsTruncated":{"type":"boolean"}},"required":["kind","groupId","groupName","label","status","value","valueTruncated","confidence","inputDocumentCount","contributions","contributionsTruncated"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["column_summary"]},"label":{"type":"string"},"displayName":{"nullable":true,"type":"string","maxLength":513},"found":{"type":"integer","minimum":0,"maximum":9007199254740991},"notFound":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"unavailable":{"type":"integer","minimum":0,"maximum":9007199254740991},"edited":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","label","displayName","found","notFound","failed","unavailable","edited"],"additionalProperties":false}]}}},"required":["groupId","name","rows"],"additionalProperties":false}},"state":{"type":"string","enum":["draft","idle","pending","running","finished","failed"]},"unitCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"reading":{"maxItems":20,"type":"array","items":{"type":"string"}}},"required":["items","truncated"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/tenants/":{"get":{"summary":"List tenants for a building","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"post":{"summary":"Create a building tenant","tags":["Document Platform"],"description":"Creates an internal tenant record. Contacts are saved without invitations or group membership. Existing tenant access is unchanged. Company names are unique within the building. Linked Collections and tasks must belong to this building; linking does not grant access.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"phone":{"nullable":true,"type":"string"},"contactPersons":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"email":{},"phone":{"nullable":true,"type":"string"},"isPrimary":{"type":"boolean"},"role":{"type":"string","minLength":1,"maxLength":120}},"required":["name","email"],"additionalProperties":false}},"deadlineDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"tenantProfile":{"type":"object","properties":{"sourceDocuments":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"page":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["documentId"],"additionalProperties":false}},"occupancies":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"space":{"type":"string","minLength":1,"maxLength":255},"status":{"type":"string","enum":["planned","active","former"]},"startsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["space","status"],"additionalProperties":false}},"internalOwner":{"type":"string","minLength":1,"maxLength":255},"notes":{"type":"string","maxLength":10000},"collectionIds":{"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"taskIds":{"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"keyDates":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":255},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["label","date"],"additionalProperties":false}},"responsibilities":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"area":{"type":"string","minLength":1,"maxLength":255},"kind":{"type":"string","enum":["repair","building_insurance"]},"holder":{"type":"string","enum":["landlord","tenant","shared"]},"note":{"type":"string","maxLength":2000},"sourceDocuments":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"page":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["documentId"],"additionalProperties":false}},"taskIds":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["area"],"additionalProperties":false}}},"additionalProperties":false}},"required":["name","contactPersons"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Conflict - the resource is busy or in a conflicting state.","content":{"application/json":{"schema":{"description":"Conflict - the resource is busy or in a conflicting state.","type":"object","properties":{"error":{"type":"string","enum":["ConflictError","CustomerDeletingConflictError","MutationLeaseConflictError","LastOwnerError","DuplicateCompanyNameError","folder_not_empty"]},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/tenants/{subcontractorId}":{"get":{"summary":"Get a building tenant","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"subcontractorId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"patch":{"summary":"Update a building tenant","tags":["Document Platform"],"description":"Updates internal tenant details without invitations or membership changes. Legacy records retain contact membership reconciliation. Supply the complete contactPersons or tenantProfile value when replacing either; omission preserves it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"phone":{"nullable":true,"type":"string"},"contactPersons":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"email":{},"phone":{"nullable":true,"type":"string"},"isPrimary":{"type":"boolean"},"role":{"type":"string","minLength":1,"maxLength":120}},"required":["name","email"],"additionalProperties":false}},"deadlineDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"tenantProfile":{"type":"object","properties":{"sourceDocuments":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"page":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["documentId"],"additionalProperties":false}},"occupancies":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"space":{"type":"string","minLength":1,"maxLength":255},"status":{"type":"string","enum":["planned","active","former"]},"startsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["space","status"],"additionalProperties":false}},"internalOwner":{"type":"string","minLength":1,"maxLength":255},"notes":{"type":"string","maxLength":10000},"collectionIds":{"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"taskIds":{"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"keyDates":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":255},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["label","date"],"additionalProperties":false}},"responsibilities":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"area":{"type":"string","minLength":1,"maxLength":255},"kind":{"type":"string","enum":["repair","building_insurance"]},"holder":{"type":"string","enum":["landlord","tenant","shared"]},"note":{"type":"string","maxLength":2000},"sourceDocuments":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"page":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["documentId"],"additionalProperties":false}},"taskIds":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["area"],"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"subcontractorId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Conflict - the resource is busy or in a conflicting state.","content":{"application/json":{"schema":{"description":"Conflict - the resource is busy or in a conflicting state.","type":"object","properties":{"error":{"type":"string","enum":["ConflictError","CustomerDeletingConflictError","MutationLeaseConflictError","LastOwnerError","DuplicateCompanyNameError","folder_not_empty"]},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Delete a building tenant","tags":["Document Platform"],"description":"Soft-deletes the tenant, clears its item-level and whole-checklist `assignedSubcontractorId` references across the building, and tears down its FGA group (revoking every `checklist_instance:upload` grant it accrued). On full success the response is 204; if the assignment-clear or FGA-teardown steps partially fail, the response is 207 with a `warnings` array — the DB row is always soft-deleted regardless.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"subcontractorId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/tenants/bulk":{"post":{"summary":"Create several building tenants","tags":["Document Platform"],"description":"Creates up to 25 internal tenant records in order, with the same rules as the single create. Each tenant succeeds or fails on its own: the response lists one outcome per submitted tenant. A name already in the building, or already created earlier in the batch, is `duplicate`; a link outside the building is `invalid`. A request that runs out of time returns the tenants it did not reach as `not_attempted`: nothing was written for them, and the client sends them again.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenants":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"phone":{"nullable":true,"type":"string"},"contactPersons":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"email":{},"phone":{"nullable":true,"type":"string"},"isPrimary":{"type":"boolean"},"role":{"type":"string","minLength":1,"maxLength":120}},"required":["name","email"],"additionalProperties":false}},"deadlineDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"tenantProfile":{"type":"object","properties":{"sourceDocuments":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"page":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["documentId"],"additionalProperties":false}},"occupancies":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"space":{"type":"string","minLength":1,"maxLength":255},"status":{"type":"string","enum":["planned","active","former"]},"startsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["space","status"],"additionalProperties":false}},"internalOwner":{"type":"string","minLength":1,"maxLength":255},"notes":{"type":"string","maxLength":10000},"collectionIds":{"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"taskIds":{"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"keyDates":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":255},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["label","date"],"additionalProperties":false}},"responsibilities":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"area":{"type":"string","minLength":1,"maxLength":255},"kind":{"type":"string","enum":["repair","building_insurance"]},"holder":{"type":"string","enum":["landlord","tenant","shared"]},"note":{"type":"string","maxLength":2000},"sourceDocuments":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"page":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["documentId"],"additionalProperties":false}},"taskIds":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["area"],"additionalProperties":false}}},"additionalProperties":false}},"required":["name","contactPersons"],"additionalProperties":false}}},"required":["tenants"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"outcome":{"type":"string","enum":["created","duplicate","invalid","failed","not_attempted"]},"tenantId":{"type":"string"},"hasWarnings":{"type":"boolean"}},"required":["index","outcome"],"additionalProperties":false}}},"required":["results"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/tenants/":{"get":{"summary":"List tenants across buildings","tags":["Document Platform"],"description":"Every tenant the caller may read, across the customer, each row carrying the name of its building. The same company appears once per building it is registered in.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"customerId":{"type":"string"},"projectId":{"type":"string"},"buildingId":{"type":"string"},"groupId":{"type":"string"},"accessMode":{"type":"string","enum":["internal"]},"tenantProfile":{"type":"object","properties":{"sourceDocuments":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"page":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["documentId"],"additionalProperties":false}},"occupancies":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"space":{"type":"string","minLength":1,"maxLength":255},"status":{"type":"string","enum":["planned","active","former"]},"startsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["space","status"],"additionalProperties":false}},"internalOwner":{"type":"string","minLength":1,"maxLength":255},"notes":{"type":"string","maxLength":10000},"collectionIds":{"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"taskIds":{"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"keyDates":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":255},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["label","date"],"additionalProperties":false}},"responsibilities":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"area":{"type":"string","minLength":1,"maxLength":255},"kind":{"type":"string","enum":["repair","building_insurance"]},"holder":{"type":"string","enum":["landlord","tenant","shared"]},"note":{"type":"string","maxLength":2000},"sourceDocuments":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"page":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["documentId"],"additionalProperties":false}},"taskIds":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["area"],"additionalProperties":false}}},"additionalProperties":false},"tenantActivity":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"by":{"type":"string"},"kind":{"type":"string","enum":["created","updated"]}},"required":["at","by","kind"],"additionalProperties":false}},"name":{"type":"string"},"phone":{"nullable":true,"type":"string"},"contactPersons":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"email":{},"phone":{"nullable":true,"type":"string"},"isPrimary":{"type":"boolean"},"role":{"type":"string","minLength":1,"maxLength":120}},"required":["name","email"],"additionalProperties":false}},"deadlineDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"mergedIntoSubcontractorId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingName":{"type":"string"}},"required":["id","customerId","buildingId","groupId","name","contactPersons","createdAt","createdBy","updatedAt","updatedBy","buildingName"],"additionalProperties":false}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/tenants/read-sheet":{"post":{"summary":"Read a tenant spreadsheet with AI","tags":["Document Platform"],"description":"Turns the sheets of a tenant spreadsheet, whatever their layout, into tenant rows for the import preview. Each row cites the sheet and row it came from, and its building match is a suggestion. Nothing is created.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"maxLength":255},"locale":{"type":"string","enum":["en","no","sv","da","fi","fr"]},"sheets":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"rows":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"row":{"type":"integer","minimum":1,"maximum":9007199254740991},"cells":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":300}}},"required":["row","cells"],"additionalProperties":false}}},"required":["name","rows"],"additionalProperties":false}}},"required":["fileName","sheets"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"string","maxLength":600},"tenants":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"sheet":{"type":"string","maxLength":100},"row":{"type":"integer","minimum":1,"maximum":9007199254740991},"building":{"type":"string","maxLength":300},"buildingId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company":{"type":"string","maxLength":300},"contactName":{"type":"string","maxLength":300},"email":{"type":"string","maxLength":300},"phone":{"type":"string","maxLength":100},"role":{"type":"string","maxLength":200},"space":{"type":"string","maxLength":300},"startsOn":{"type":"string","maxLength":10},"endsOn":{"type":"string","maxLength":10},"owner":{"type":"string","maxLength":300}},"required":["sheet","row","building","buildingId","company","contactName","email","phone","role","space","startsOn","endsOn","owner"],"additionalProperties":false}},"leftOut":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"sheet":{"type":"string","maxLength":100},"row":{"type":"integer","minimum":1,"maximum":9007199254740991},"reason":{"type":"string","maxLength":300}},"required":["sheet","row","reason"],"additionalProperties":false}}},"required":["summary","tenants","leftOut"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests - the hourly limit of sheet reads is reached.","content":{"application/json":{"schema":{"description":"Too Many Requests - the hourly limit of sheet reads is reached.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}},"503":{"description":"Service Unavailable - a downstream dependency is degraded.","content":{"application/json":{"schema":{"description":"Service Unavailable - a downstream dependency is degraded.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/overview/":{"get":{"summary":"Get checklist overview","tags":["Document Platform"],"description":"Retrieve overview information for a specific checklist","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/overview/actionable-buildings":{"get":{"summary":"Get actionable buildings","tags":["Document Platform"],"description":"Retrieve buildings that require action for a checklist with sorting and limit options","parameters":[{"schema":{"type":"string","enum":["asc","desc"]},"in":"query","name":"sort","required":false},{"schema":{"anyOf":[{"type":"number"},{"type":"string","enum":["ALL"]}]},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/overview/building-checklist-items":{"get":{"summary":"Get building checklist items","tags":["Document Platform"],"description":"Retrieve all checklist items associated with buildings for a specific checklist","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/folders":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string"}},"required":["path"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true}],"responses":{"200":{"description":"Default Response"}}},"get":{"parameters":[{"schema":{"nullable":true,"type":"string"},"in":"query","name":"prefix","required":false},{"schema":{"nullable":true,"type":"string"},"in":"query","name":"path","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string"},"in":"query","name":"path","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/checklists/{checklistId}/folders/{folderId}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true}],"responses":{"200":{"description":"Default Response"}}},"put":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/checklists/{checklistId}/folders/{folderId}/duplicate":{"post":{"summary":"Duplicate checklist folder","tags":["Document Platform"],"description":"Duplicate an existing checklist folder","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Duplicated checklist folder","content":{"application/json":{"schema":{"description":"Duplicated checklist folder","type":"object","additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/folders/{folderId}/rename":{"patch":{"summary":"Rename checklist folder","tags":["Document Platform"],"description":"Rename a checklist folder within its parent directory","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Renamed folder","content":{"application/json":{"schema":{"description":"Renamed folder","type":"object","additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/checklists/{checklistId}/folders/children":{"get":{"parameters":[{"schema":{"type":"string","nullable":true},"in":"query","name":"parentFolderId","required":false},{"schema":{"type":"string","nullable":true},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","enum":["name","createdAt"],"nullable":true},"in":"query","name":"sortBy","required":false},{"schema":{"type":"string","enum":["asc","desc"],"nullable":true},"in":"query","name":"sortDirection","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/checklists/{checklistId}/folders/children":{"get":{"parameters":[{"schema":{"type":"string","nullable":true},"in":"query","name":"parentFolderId","required":false},{"schema":{"type":"string","nullable":true},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","enum":["name","createdAt"],"nullable":true},"in":"query","name":"sortBy","required":false},{"schema":{"type":"string","enum":["asc","desc"],"nullable":true},"in":"query","name":"sortDirection","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/checklists/{checklistId}/folders/nested":{"get":{"parameters":[{"schema":{"type":"string","nullable":true},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","enum":["name","createdAt"],"nullable":true},"in":"query","name":"sortBy","required":false},{"schema":{"type":"string","enum":["asc","desc"],"nullable":true},"in":"query","name":"sortDirection","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/users/{userId}/permissions/batch":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resources":{"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string","minLength":1},"resourceId":{"type":"string","minLength":1},"relation":{"type":"string","minLength":1}},"required":["resourceType","resourceId","relation"],"additionalProperties":false}}},"required":["resources"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resources":{"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string","minLength":1},"resourceId":{"type":"string","minLength":1},"relation":{"type":"string","minLength":1}},"required":["resourceType","resourceId","relation"],"additionalProperties":false}}},"required":["resources"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/permissions/grant/building/{buildingId}/user/{userId}":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resourceGrants":{"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string","enum":["building","collection","project"]},"resourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"relation":{"type":"string","enum":["administrate","read","edit","upload","operations"]}},"required":["resourceType","resourceId","relation"],"additionalProperties":false}}},"required":["resourceGrants"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/permissions/revoke/building/{buildingId}/user/{userId}":{"delete":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resourceGrants":{"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string","enum":["building","collection","project"]},"resourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"relation":{"type":"string","enum":["administrate","read","edit","upload","operations"]}},"required":["resourceType","resourceId","relation"],"additionalProperties":false}}},"required":["resourceGrants"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/permissions/invite/building/{buildingId}":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"resourceGrants":{"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string","enum":["building","collection","project"]},"resourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"relation":{"type":"string","enum":["administrate","read","edit","upload","operations"]}},"required":["resourceType","resourceId","relation"],"additionalProperties":false}}},"required":["email","resourceGrants"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/permissions/invite/building/{buildingId}/resend":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["email"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/permissions/grant/collection/{collectionId}/user/{userId}":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resourceGrants":{"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string","enum":["collection"]},"resourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"relation":{"type":"string","enum":["administrate","read","edit","upload"]}},"required":["resourceType","resourceId","relation"],"additionalProperties":false}}},"required":["resourceGrants"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"collectionId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/permissions/revoke/collection/{collectionId}/user/{userId}":{"delete":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resourceGrants":{"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string","enum":["collection"]},"resourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"relation":{"type":"string","enum":["administrate","read","edit","upload"]}},"required":["resourceType","resourceId","relation"],"additionalProperties":false}}},"required":["resourceGrants"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"collectionId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/permissions/invite/collection/{collectionId}":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"resourceGrants":{"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string","enum":["collection"]},"resourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"relation":{"type":"string","enum":["administrate","read","edit","upload"]}},"required":["resourceType","resourceId","relation"],"additionalProperties":false}}},"required":["email","resourceGrants"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"collectionId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/permissions/grant/project/{projectId}/user/{userId}":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resourceGrants":{"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string","enum":["project"]},"resourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"relation":{"type":"string","enum":["administrate","read","edit","upload"]}},"required":["resourceType","resourceId","relation"],"additionalProperties":false}}},"required":["resourceGrants"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/permissions/revoke/project/{projectId}/user/{userId}":{"delete":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resourceGrants":{"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string","enum":["project"]},"resourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"relation":{"type":"string","enum":["administrate","read","edit","upload"]}},"required":["resourceType","resourceId","relation"],"additionalProperties":false}}},"required":["resourceGrants"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/permissions/invite/project/{projectId}":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"resourceGrants":{"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string","enum":["project"]},"resourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"relation":{"type":"string","enum":["administrate","read","edit","upload"]}},"required":["resourceType","resourceId","relation"],"additionalProperties":false}}},"required":["email","resourceGrants"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/permissions/invite/project/{projectId}/resend":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["email"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/users/permissions/check/batch":{"post":{"summary":"Batch check FGA permissions","tags":["Document Platform"],"description":"Check whether the current user has each (resourceType, resourceId, relation) tuple. Up to 100 checks per request; larger sets must be chunked. Validates resource types, resource IDs, and relations per check.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"checks":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string"},"resourceId":{"type":"string"},"relation":{"type":"string"}},"required":["resourceType","resourceId","relation"],"additionalProperties":false}}},"required":["checks"],"additionalProperties":false}}}},"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"checks":{"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string"},"resourceId":{"type":"string"},"relation":{"type":"string"},"authorized":{"type":"boolean"}},"required":["resourceType","resourceId","relation","authorized"],"additionalProperties":false}}},"required":["checks"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/users/permissions/check/{resourceType}/{resourceId}/{relation}":{"get":{"parameters":[{"schema":{"type":"string","enum":["findable","organization","portfolio","building","project","document","user","group","collection","folder","checklist_instance","checklist_item_instance","extraction"]},"in":"path","name":"resourceType","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"resourceId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"relation","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/users/permissions/check/{resourceType}/any":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"resourceType","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/users/internal-admin":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/users/internal-tier":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/users/check-admin":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entityType":{"type":"string"},"entityId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["entityType","entityId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response"}}}},"/users/{userId}/permissions/list/{resourceType}/{resourceId}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"userId","required":true},{"schema":{"type":"string"},"in":"path","name":"resourceType","required":true},{"schema":{"type":"string"},"in":"path","name":"resourceId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/permissions/list/customer/{customerId}/users":{"get":{"parameters":[{"schema":{"type":"string","enum":["document-platform","construction"]},"in":"query","name":"origin","required":false},{"schema":{"type":"string"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/permissions/list/users/{resourceType}/{resourceId}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"resourceType","required":true},{"schema":{"type":"string"},"in":"path","name":"resourceId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/permissions/list/customer/{customerId}/building/{buildingId}/users":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/permissions/list/customer/{customerId}/building/{buildingId}/v2/users":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/permissions/available-grants/building/{buildingId}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/permissions/available-grants/customer/{customerId}":{"get":{"parameters":[{"schema":{"type":"string","enum":["document-platform","construction"]},"in":"query","name":"origin","required":false},{"schema":{"type":"string"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/permissions/list/collection/{collectionId}/users":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"collectionId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/permissions/available-grants/collection/{collectionId}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"collectionId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/permissions/list/project/{projectId}/users":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/permissions/list/project/{projectId}/v2/users":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/permissions/customer/{customerId}/users/{userId}/impersonate":{"post":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/permissions/impersonation/status":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/permissions/impersonation/end":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/integration-api-keys/{integrationType}":{"get":{"summary":"Get integration credentials status","tags":["Document Platform"],"description":"Return non-secret organisation credential status and fields","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","enum":["dalux","plania","famac","interaxo","dalux_box"]},"in":"path","name":"integrationType","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean"},"integrationType":{"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"fields":{"type":"object","additionalProperties":{"type":"string"}},"secretFields":{"type":"array","items":{"type":"string"}}},"required":["configured","integrationType","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"put":{"summary":"Save integration credentials","tags":["Document Platform"],"description":"Create or update organisation credentials for an integration","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"type":"string","minLength":1}},"required":["apiKey"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","enum":["dalux","plania","famac","interaxo","dalux_box"]},"in":"path","name":"integrationType","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Delete integration credentials","tags":["Document Platform"],"description":"Remove organisation credentials for an integration","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","enum":["dalux","plania","famac","interaxo","dalux_box"]},"in":"path","name":"integrationType","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/company-integrations/google-drive/oauth/start":{"get":{"summary":"Start Google Drive OAuth","tags":["Document Platform"],"description":"Return the Google consent URL used to connect the organisation’s Google Drive","parameters":[{"schema":{"type":"string"},"in":"query","name":"returnPath","required":false},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/company-integrations/google-drive/status":{"get":{"summary":"Google Drive connection status","tags":["Document Platform"],"description":"Whether the organisation has a stored Google Drive credential","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/company-integrations/google-drive/credentials":{"delete":{"summary":"Disconnect Google Drive","tags":["Document Platform"],"description":"Remove the organisation’s stored Google Drive credential","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/company-integrations/google-drive/test-connection":{"post":{"summary":"Test Google Drive connection","tags":["Document Platform"],"description":"Validate the organisation’s stored Google Drive credential","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/company-integrations/mappings/{integrationType}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"integrationType","required":true}],"responses":{"200":{"description":"Default Response"}}},"put":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"integrationType","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"integrationType","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/company-integrations/mappings/{integrationType}/targets":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"integrationType","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/company-integrations/mappings/{integrationType}/preview":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"integrationType","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/company-integrations/catalogue":{"get":{"summary":"Get organisation integration catalogue","tags":["Document Platform"],"description":"Return connection and building coverage for all integrations","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"integrations":{"minItems":7,"maxItems":7,"type":"array","items":{"type":"object","properties":{"integrationId":{"type":"string","enum":["famac","dalux","plania","interaxo","sharepoint","google-drive","dalux-box"]},"connectionStatus":{"type":"string","enum":["configured","not_configured","unknown"]},"operationalStatus":{"type":"string","enum":["enabled","disabled","not_applicable"]},"eligibleBuildingCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"linkedBuildingCount":{"nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["integrationId","connectionStatus","eligibleBuildingCount","linkedBuildingCount"],"additionalProperties":false}}},"required":["integrations"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/company-integrations/sharepoint/building-links":{"post":{"summary":"Get SharePoint building links","tags":["Document Platform"],"description":"Return permission-filtered SharePoint link and sync state","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"buildingIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["buildingIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"links":{"type":"array","items":{"type":"object","properties":{"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"linked":{"nullable":true,"type":"boolean"},"syncStatus":{"nullable":true,"type":"string","enum":["pending","syncing","synced","error"]},"lastSyncedAt":{"nullable":true,"type":"string"},"folderName":{"nullable":true,"type":"string"}},"required":["buildingId","linked","syncStatus","lastSyncedAt"],"additionalProperties":false}}},"required":["links"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/company-integrations/sharepoint/coverage":{"get":{"summary":"Get SharePoint connection coverage","tags":["Document Platform"],"description":"Folders with recent SharePoint activity that are not connected yet, over a 90-day activity window. Derived from import outcomes only.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"generatedAt":{"type":"string"},"windowDays":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"subscriptions":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"enabled":{"type":"integer","minimum":0,"maximum":9007199254740991},"disabled":{"type":"integer","minimum":0,"maximum":9007199254740991},"syncStatus":{"type":"object","additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"lastSyncedAt":{"type":"string"}},"required":["total","enabled","disabled","syncStatus"],"additionalProperties":false},"summary":{"type":"object","properties":{"buckets":{"type":"object","properties":{"working":{"type":"integer","minimum":0,"maximum":9007199254740991},"deleted":{"type":"integer","minimum":0,"maximum":9007199254740991},"blocked":{"type":"integer","minimum":0,"maximum":9007199254740991},"benign":{"type":"integer","minimum":0,"maximum":9007199254740991},"unreachableRoot":{"type":"integer","minimum":0,"maximum":9007199254740991},"unreachableFolder":{"type":"integer","minimum":0,"maximum":9007199254740991},"unknown":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["working","deleted","blocked","benign","unreachableRoot","unreachableFolder","unknown"],"additionalProperties":false},"distinctItems":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalRecords":{"type":"integer","minimum":0,"maximum":9007199254740991},"coverageDenominator":{"type":"integer","minimum":0,"maximum":9007199254740991},"unreachableRatio":{"nullable":true,"type":"number"},"folderGaps":{"type":"array","items":{"type":"object","properties":{"folder":{"type":"string"},"itemCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"isNullGuid":{"type":"boolean"},"dismissed":{"type":"boolean"},"buildingName":{"type":"string"},"buildingId":{"type":"string"}},"required":["folder","itemCount","isNullGuid"],"additionalProperties":false}},"rootExtensions":{"type":"object","additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"nullGuidItemCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"unreachableByMonth":{"type":"object","additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"conflictingItems":{"type":"integer","minimum":0,"maximum":9007199254740991},"unknownReasons":{"type":"array","items":{"type":"string"}},"newestRecordedAt":{"type":"string"}},"required":["buckets","distinctItems","totalRecords","coverageDenominator","unreachableRatio","folderGaps","rootExtensions","nullGuidItemCount","unreachableByMonth","conflictingItems","unknownReasons"],"additionalProperties":false},"alarms":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["silent-integration","root-stranded-content","orphaned-building-reference","scope-misconfiguration","unconnected-folders","stalled-sync","no-activity","healthy"]},"severity":{"type":"string","enum":["critical","warning","ok"]},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"folderCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"idleDays":{"type":"integer","minimum":0,"maximum":9007199254740991},"ratio":{"type":"number"}},"required":["id","severity","count"],"additionalProperties":false}},"severity":{"type":"string","enum":["critical","warning","ok"]},"truncated":{"type":"boolean"},"cached":{"type":"boolean"}},"required":["customerId","generatedAt","windowDays","subscriptions","summary","alarms","severity","truncated","cached"],"additionalProperties":false}}}},"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["pending"]}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/company-integrations/sharepoint/coverage/dismissals":{"post":{"summary":"Dismiss or restore a SharePoint coverage folder","tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"folder":{"type":"string","minLength":1},"dismissed":{"type":"boolean"}},"required":["folder","dismissed"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"folders":{"type":"array","items":{"type":"string"}}},"required":["folders"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/company-integrations/status":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/company-integrations/batch-sync":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/company-integrations/{integrationType}/failed-documents":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"integrationType","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/company-integrations/{integrationType}/failed-documents/retry":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"integrationType","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/company-integrations/{integrationType}/org-schedule":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"integrationType","required":true}],"responses":{"200":{"description":"Default Response"}}},"put":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"integrationType","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"integrationType","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/source-migrations/":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}},"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/source-migrations/{migrationId}/cancel":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"migrationId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/dsync/directory-groups":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/dsync/group-mappings":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/dsync/group-mappings/{groupId}":{"delete":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/integrations/sharepoint/customers/{customerId}/buildings/{buildingId}/sharepoint-document-count":{"get":{"summary":"Get SharePoint document count","tags":["Document Platform"],"description":"Count documents in a building that are present in SharePoint (have a SharePoint item id) — note this includes Findable uploads exported to SharePoint, not only imports","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/buildings/{buildingId}/sharepoint-exported-count":{"get":{"summary":"Get SharePoint exported document count","tags":["Document Platform"],"description":"Count documents in a building that have been exported to SharePoint","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/buildings/{buildingId}/subscriptions":{"get":{"summary":"Get SharePoint subscriptions","tags":["Document Platform"],"description":"List all SharePoint subscriptions for a building","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"post":{"summary":"Create SharePoint subscription","tags":["Document Platform"],"description":"Create a new SharePoint subscription for a building to sync documents","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"folderId":{"type":"string","maxLength":256,"pattern":"^[\\w!-]+$"},"siteId":{"type":"string","minLength":1},"driveId":{"type":"string","minLength":1},"subscribedFolderIds":{"type":"array","items":{"type":"string","minLength":1}},"analysisId":{"type":"string","minLength":1},"sensitiveAcknowledged":{"type":"boolean"}},"required":["siteId","driveId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/sites":{"get":{"summary":"Get SharePoint sites for an organisation","tags":["Document Platform"],"description":"List all available SharePoint sites for an organisation","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/sites/configured":{"get":{"summary":"Get the SharePoint sites an organisation already syncs from","tags":["Document Platform"],"description":"List the sites existing building subscriptions use, most used first, so setup can offer them","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"sites":{"type":"array","items":{"type":"object","properties":{"siteId":{"type":"string"},"webUrl":{"type":"string"},"displayName":{"type":"string"},"buildingCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["siteId","webUrl","buildingCount"],"additionalProperties":false}}},"required":["sites"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/sites/find":{"get":{"summary":"Find an organisation SharePoint site by name","tags":["Document Platform"],"description":"Find a SharePoint site by tenant and site name","parameters":[{"schema":{"type":"string","maxLength":2048,"format":"uri"},"in":"query","name":"siteUrl","required":true},{"schema":{"type":"string","minLength":1},"in":"query","name":"siteName","required":true},{"schema":{"type":"string","minLength":1},"in":"query","name":"tenantName","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/sites/{siteId}":{"get":{"summary":"Get an organisation SharePoint site by ID","tags":["Document Platform"],"description":"Retrieve detailed information for a specific SharePoint site","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"siteId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/sites/{siteId}/drives":{"get":{"summary":"Get SharePoint drives for an organisation","tags":["Document Platform"],"description":"List all drives for a SharePoint site","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"siteId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/buildings/{buildingId}/sites":{"get":{"summary":"Get SharePoint sites","tags":["Document Platform"],"description":"List all available SharePoint sites for a customer","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/buildings/{buildingId}/sites/configured":{"get":{"summary":"Get the SharePoint sites the organisation already syncs from","tags":["Document Platform"],"description":"List the sites existing building subscriptions use, most used first, so building setup can offer them","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"sites":{"type":"array","items":{"type":"object","properties":{"siteId":{"type":"string"},"webUrl":{"type":"string"},"displayName":{"type":"string"},"buildingCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["siteId","webUrl","buildingCount"],"additionalProperties":false}}},"required":["sites"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/buildings/{buildingId}/sites/{siteId}":{"get":{"summary":"Get SharePoint site by ID","tags":["Document Platform"],"description":"Retrieve detailed information for a specific SharePoint site","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"siteId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/buildings/{buildingId}/sites/find":{"get":{"summary":"Find SharePoint site by name","tags":["Document Platform"],"description":"Find a SharePoint site by tenant and site name","parameters":[{"schema":{"type":"string","maxLength":2048,"format":"uri"},"in":"query","name":"siteUrl","required":true},{"schema":{"type":"string","minLength":1},"in":"query","name":"siteName","required":true},{"schema":{"type":"string","minLength":1},"in":"query","name":"tenantName","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/buildings/{buildingId}/analysis":{"post":{"summary":"Start SharePoint building analysis","tags":["Document Platform"],"description":"Run the mandatory pre-import metadata analysis for a building before choosing folders to sync","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"siteId":{"type":"string","minLength":1},"driveId":{"type":"string","minLength":1}},"required":["siteId","driveId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/buildings/{buildingId}/analysis/latest":{"get":{"summary":"Get latest SharePoint building analysis","tags":["Document Platform"],"description":"Read the building's most recent analysis run, or null if none","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/buildings/{buildingId}/analysis/{analysisId}":{"get":{"summary":"Get SharePoint building analysis","tags":["Document Platform"],"description":"Read a building analysis run and its current status","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"analysisId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/buildings/{buildingId}/subscriptions/{subscriptionId}":{"put":{"summary":"Update SharePoint subscription","tags":["Document Platform"],"description":"Update an existing SharePoint subscription for a building","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"disabled":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"subscriptionId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Delete SharePoint subscription","tags":["Document Platform"],"description":"Delete an existing SharePoint subscription for a building","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"subscriptionId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/buildings/{buildingId}/subscriptions/{subscriptionId}/sync":{"post":{"summary":"Sync SharePoint subscription","tags":["Document Platform"],"description":"Initiate synchronization for a SharePoint subscription with optional force sync. Answers 409 when the subscription is disabled or being deleted.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"forceSync":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"subscriptionId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"syncRunId":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Conflict - the resource is busy or in a conflicting state.","content":{"application/json":{"schema":{"description":"Conflict - the resource is busy or in a conflicting state.","type":"object","properties":{"error":{"type":"string","enum":["ConflictError","CustomerDeletingConflictError","MutationLeaseConflictError","LastOwnerError","DuplicateCompanyNameError","folder_not_empty"]},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/buildings/{buildingId}/export":{"post":{"summary":"Initiate SharePoint export","tags":["Document Platform"],"description":"Queue all exportable documents in a building for export to SharePoint. Use forceExport to re-export documents that have already been exported.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"forceExport":{"type":"boolean"},"cursor":{"type":"string","minLength":1}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/buildings/{buildingId}/sites/{siteId}/drives":{"get":{"summary":"Get SharePoint drives","tags":["Document Platform"],"description":"List all drives (document libraries) for a SharePoint site","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"siteId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/buildings/{buildingId}/sites/{siteId}/drives/{driveId}/children":{"get":{"summary":"Get SharePoint drive children","tags":["Document Platform"],"description":"List all child items (files and folders) for a SharePoint drive item","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"itemId","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"pageToken","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"siteId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"driveId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/credentials":{"post":{"summary":"Create SharePoint credentials","tags":["Document Platform"],"description":"Create SharePoint API credentials for a customer","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"clientId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"clientSecret":{"type":"string","minLength":1}},"required":["tenantId","clientId","clientSecret"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"tenantId":{"type":"string"},"clientId":{"type":"string"},"mode":{"type":"string"},"defaultDriveId":{"type":"string"},"atlasExportConfig":{"type":"object","properties":{"columns":{"type":"object","properties":{"predictedPath":{"type":"string","minLength":1,"maxLength":255},"predictedFilename":{"type":"string","minLength":1,"maxLength":255},"isDuplicate":{"type":"string","minLength":1,"maxLength":255},"duplicateOf":{"type":"string","minLength":1,"maxLength":255},"confidence":{"type":"string","minLength":1,"maxLength":255},"reasoning":{"type":"string","minLength":1,"maxLength":255}},"required":["predictedPath","predictedFilename","isDuplicate","duplicateOf","confidence","reasoning"],"additionalProperties":false}},"required":["columns"],"additionalProperties":false}},"required":["customerId","tenantId","clientId"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"get":{"summary":"Get SharePoint credentials","tags":["Document Platform"],"description":"Retrieve SharePoint API credentials for a customer","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"tenantId":{"type":"string"},"clientId":{"type":"string"},"mode":{"type":"string"},"defaultDriveId":{"type":"string"},"atlasExportConfig":{"type":"object","properties":{"columns":{"type":"object","properties":{"predictedPath":{"type":"string","minLength":1,"maxLength":255},"predictedFilename":{"type":"string","minLength":1,"maxLength":255},"isDuplicate":{"type":"string","minLength":1,"maxLength":255},"duplicateOf":{"type":"string","minLength":1,"maxLength":255},"confidence":{"type":"string","minLength":1,"maxLength":255},"reasoning":{"type":"string","minLength":1,"maxLength":255}},"required":["predictedPath","predictedFilename","isDuplicate","duplicateOf","confidence","reasoning"],"additionalProperties":false}},"required":["columns"],"additionalProperties":false}},"required":["customerId","tenantId","clientId"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"put":{"summary":"Update SharePoint credentials","tags":["Document Platform"],"description":"Update SharePoint API credentials for a customer","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"clientId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"clientSecret":{"type":"string","minLength":1},"defaultDriveId":{"type":"string"}},"required":["tenantId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"tenantId":{"type":"string"},"clientId":{"type":"string"},"mode":{"type":"string"},"defaultDriveId":{"type":"string"},"atlasExportConfig":{"type":"object","properties":{"columns":{"type":"object","properties":{"predictedPath":{"type":"string","minLength":1,"maxLength":255},"predictedFilename":{"type":"string","minLength":1,"maxLength":255},"isDuplicate":{"type":"string","minLength":1,"maxLength":255},"duplicateOf":{"type":"string","minLength":1,"maxLength":255},"confidence":{"type":"string","minLength":1,"maxLength":255},"reasoning":{"type":"string","minLength":1,"maxLength":255}},"required":["predictedPath","predictedFilename","isDuplicate","duplicateOf","confidence","reasoning"],"additionalProperties":false}},"required":["columns"],"additionalProperties":false}},"required":["customerId","tenantId","clientId"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Delete SharePoint credentials","tags":["Document Platform"],"description":"Delete SharePoint API credentials for a customer. Answers 409 while subscriptions remain.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Conflict - the resource is busy or in a conflicting state.","content":{"application/json":{"schema":{"description":"Conflict - the resource is busy or in a conflicting state.","type":"object","properties":{"error":{"type":"string","enum":["ConflictError","CustomerDeletingConflictError","MutationLeaseConflictError","LastOwnerError","DuplicateCompanyNameError","folder_not_empty"]},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/sites/check":{"post":{"tags":["Document Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"siteUrl":{"type":"string","maxLength":2048,"format":"uri"}},"required":["siteUrl"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":"string","enum":["ok","no-credentials","access-denied","not-found","graph-error"]},"site":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"displayName":{"type":"string"},"description":{"type":"string"},"webUrl":{"type":"string"}},"required":["id"],"additionalProperties":{}},"libraryCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"httpStatus":{"type":"number"},"failedStep":{"type":"string","enum":["site","libraries"]},"graphError":{"type":"object","properties":{"code":{"type":"string","maxLength":200},"message":{"type":"string","maxLength":1000}},"additionalProperties":false}},"required":["verdict"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/buildings/{buildingId}/folder-grants":{"get":{"summary":"List SharePoint folder grants for a building","tags":["Document Platform"],"description":"Folders the customer’s Microsoft administrator has granted the Findable application read access to","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"folderGrants":{"type":"array","items":{"type":"object","properties":{"siteId":{"type":"string","minLength":1,"maxLength":512},"driveId":{"type":"string","maxLength":256,"pattern":"^[\\w!-]+$"},"folderId":{"type":"string","maxLength":256,"pattern":"^[\\w!-]+$"},"folderUrl":{"type":"string","maxLength":2048,"format":"uri"},"name":{"type":"string","maxLength":512},"grantedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["siteId","driveId","folderId","folderUrl","grantedAt"],"additionalProperties":false}}},"required":["folderGrants"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/folder-grants":{"get":{"summary":"List SharePoint folder grants","tags":["Document Platform"],"description":"Folders the customer’s Microsoft administrator has granted the Findable application read access to","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"folderGrants":{"type":"array","items":{"type":"object","properties":{"siteId":{"type":"string","minLength":1,"maxLength":512},"driveId":{"type":"string","maxLength":256,"pattern":"^[\\w!-]+$"},"folderId":{"type":"string","maxLength":256,"pattern":"^[\\w!-]+$"},"folderUrl":{"type":"string","maxLength":2048,"format":"uri"},"name":{"type":"string","maxLength":512},"grantedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["siteId","driveId","folderId","folderUrl","grantedAt"],"additionalProperties":false}}},"required":["folderGrants"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"post":{"summary":"Record a SharePoint folder grant","tags":["Document Platform"],"description":"Verifies the folder is readable with the customer’s saved application credentials, then records it","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"siteId":{"type":"string","minLength":1,"maxLength":512},"driveId":{"type":"string","maxLength":256,"pattern":"^[\\w!-]+$"},"folderId":{"type":"string","maxLength":256,"pattern":"^[\\w!-]+$"},"folderUrl":{"type":"string","maxLength":2048,"format":"uri"}},"required":["siteId","driveId","folderId","folderUrl"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"folderGrants":{"type":"array","items":{"type":"object","properties":{"siteId":{"type":"string","minLength":1,"maxLength":512},"driveId":{"type":"string","maxLength":256,"pattern":"^[\\w!-]+$"},"folderId":{"type":"string","maxLength":256,"pattern":"^[\\w!-]+$"},"folderUrl":{"type":"string","maxLength":2048,"format":"uri"},"name":{"type":"string","maxLength":512},"grantedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["siteId","driveId","folderId","folderUrl","grantedAt"],"additionalProperties":false}}},"required":["folderGrants"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/folder-grants/{driveId}/{folderId}":{"delete":{"summary":"Forget a SharePoint folder grant","tags":["Document Platform"],"description":"Removes Findable’s record of the grant. The Microsoft permission itself is revoked in SharePoint","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","maxLength":256,"pattern":"^[\\w!-]+$"},"in":"path","name":"driveId","required":true},{"schema":{"type":"string","maxLength":256,"pattern":"^[\\w!-]+$"},"in":"path","name":"folderId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"folderGrants":{"type":"array","items":{"type":"object","properties":{"siteId":{"type":"string","minLength":1,"maxLength":512},"driveId":{"type":"string","maxLength":256,"pattern":"^[\\w!-]+$"},"folderId":{"type":"string","maxLength":256,"pattern":"^[\\w!-]+$"},"folderUrl":{"type":"string","maxLength":2048,"format":"uri"},"name":{"type":"string","maxLength":512},"grantedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["siteId","driveId","folderId","folderUrl","grantedAt"],"additionalProperties":false}}},"required":["folderGrants"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/integrations/sharepoint/customers/{customerId}/credentials/test":{"post":{"summary":"Test SharePoint connection","tags":["Document Platform"],"description":"Reports whether a customer’s SharePoint app registration can reach Microsoft Graph, and what is wrong when it cannot","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":"string","enum":["ok","no-credentials","invalid-client","no-consent","graph-error"]},"grantedPermissions":{"type":"array","items":{"type":"string"}},"scope":{"type":"string","enum":["tenant-wide","site-scoped","folder-scoped"]},"siteCount":{"type":"number"},"httpStatus":{"type":"number"},"graphErrorCode":{"type":"string"},"detail":{"type":"string"}},"required":["verdict"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/folders/":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","minLength":1},"sharepointItemId":{"type":"string"},"isPrivate":{"type":"boolean"}},"required":["path"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}},"get":{"parameters":[{"schema":{"type":"string"},"in":"query","name":"prefix","required":false},{"schema":{"type":"string"},"in":"query","name":"path","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string"},"in":"query","name":"path","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/folders/{folderId}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true}],"responses":{"200":{"description":"Default Response"}}},"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string"}},"required":["path"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/folders/{folderId}/ancestors":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/folders/{folderId}/move":{"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"targetFolderId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["targetFolderId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/folders/{folderId}/make-private":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"targetFolderId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["targetFolderId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/folders/{folderId}/rename":{"patch":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255}},"required":["name"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/folders/children":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"parentFolderId","required":false},{"schema":{"type":"string","enum":["private","public","all"]},"in":"query","name":"mode","required":false},{"schema":{"type":"boolean"},"in":"query","name":"includeDocuments","required":false},{"schema":{"type":"string"},"in":"query","name":"documentsCursor","required":false},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":1000},"in":"query","name":"documentsLimit","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/folders/v2/children":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"parentFolderId","required":false},{"schema":{"type":"string","enum":["private","public","all"]},"in":"query","name":"mode","required":false},{"schema":{"type":"boolean"},"in":"query","name":"includeDocuments","required":false},{"schema":{"type":"string"},"in":"query","name":"documentsCursor","required":false},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":1000},"in":"query","name":"documentsLimit","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/folders/{folderId}/access":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true}],"responses":{"200":{"description":"Default Response"}}},"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"relation":{"type":"string","enum":["administrate","edit","upload","read"]},"expiresAt":{"nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["userId","relation"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/folders/{folderId}/access/{userId}":{"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"relation":{"type":"string","enum":["administrate","edit","upload","read"]},"expiresAt":{"nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["relation"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/folders/{folderId}/access/{userId}/expiry":{"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expiresAt":{"nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["expiresAt"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/folders/{folderId}/access/groups":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"relation":{"type":"string","enum":["administrate","edit","upload","read"]},"expiresAt":{"nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["groupId","relation"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/folders/{folderId}/access/groups/{groupId}":{"delete":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/folders/{folderId}/access/groups/{groupId}/expiry":{"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expiresAt":{"nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["expiresAt"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/folders/{folderId}/documents/publish":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["documentIds"],"properties":{"documentIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"description":"Array of document IDs to publish"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"workflowId":{"type":"string"}},"required":["success","message","workflowId"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/{buildingId}/folders/{folderId}/documents/import":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["documentIds"],"properties":{"documentIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"description":"Array of document IDs to make private"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"workflowId":{"type":"string"}},"required":["success","message","workflowId"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/{buildingId}/folders/{folderId}/documents":{"delete":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["documentIds"],"properties":{"documentIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"description":"Array of document IDs to permanently delete"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"workflowId":{"type":"string"}},"required":["success","message","workflowId"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/{buildingId}/folders/{folderId}/documents/bulk-op/{workflowId}/status":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"folderId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"workflowId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"workflowId":{"type":"string"},"progress":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["preparing","running","completed","failed"]},"operation":{"type":"string","enum":["publish","make-private","purge"]},"totalRequested":{"type":"number"},"totalProcessed":{"type":"number"},"totalBatches":{"type":"number"},"currentBatch":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"message":{"type":"string"}},"required":["documentIds","message"],"additionalProperties":false}},"startedAt":{"type":"string"},"completedAt":{"nullable":true,"type":"string"},"message":{"type":"string"}},"required":["status","operation","totalRequested","totalProcessed","totalBatches","currentBatch","errors","startedAt","completedAt","message"],"additionalProperties":false}},"required":["success","message","workflowId","progress"],"additionalProperties":false}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/download/jobs/{jobId}":{"get":{"summary":"Get prepared download status","tags":["Document Platform"],"description":"Returns the current ZIP generation status for a queued document download, including signed download URLs once ready.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"jobId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","nullable":true,"enum":[null]},{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string","enum":["pending","failed"]},"createdAt":{"type":"string"}},"required":["jobId","status"]},{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string","enum":["completed"]},"createdAt":{"type":"string"},"generatedZips":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string"},"fileSize":{"type":"number"},"createdAt":{"type":"string"},"signedUrl":{"type":"string"}},"required":["fileName","signedUrl"]}}},"required":["jobId","status","generatedZips"]}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/buildings/{buildingId}/documents/download/prepare":{"post":{"summary":"Prepare document download","tags":["Document Platform"],"description":"Prepares a download for selected documents and/or folders. Returns either a direct download URL for small selections, or queues an async job and returns a message indicating the user will receive an email when ready.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":500,"description":"Array of document IDs to download (max 500)"},"folderIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100,"description":"Array of folder IDs to download (max 100, all child documents will be included)"}},"anyOf":[{"required":["documentIds"],"properties":{"documentIds":{"minItems":1}}},{"required":["folderIds"],"properties":{"folderIds":{"minItems":1}}}]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"downloadUrl":{"type":"string"},"fileCount":{"type":"number"},"totalSizeBytes":{"type":"number"},"expiresAt":{"type":"string"}},"required":["type","downloadUrl","fileCount","totalSizeBytes","expiresAt"]},{"type":"object","properties":{"type":{"type":"string","enum":["async"]},"jobId":{"type":"string"},"fileCount":{"type":"number"},"totalSizeBytes":{"type":"number"},"message":{"type":"string"}},"required":["type","jobId","fileCount","totalSizeBytes","message"]}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/task-tags":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}},"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tagName"],"properties":{"tagName":{"type":"string","minLength":1,"maxLength":255},"color":{"type":"string","minLength":7,"maxLength":7,"pattern":"^#[0-9a-fA-F]{6}$"},"description":{"type":"string","maxLength":500},"metadataType":{"type":"string","enum":["task-tag","information-type","system","location"]}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/task-tags/{tagId}":{"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tagName":{"type":"string","minLength":1,"maxLength":255},"color":{"type":"string","minLength":7,"maxLength":7,"pattern":"^#[0-9a-fA-F]{6}$"},"description":{"type":"string","maxLength":500}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"tagId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"tagId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/task-tags/merge":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sourceTagIds","targetTagId"],"properties":{"sourceTagIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":50},"targetTagId":{"type":"string","minLength":1}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/task-tags/usage":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tagIds"],"properties":{"tagIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":50}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/task-tags/migrate":{"post":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/document-metadata/information-types":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/document-metadata/systems":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/document-metadata/locations":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/document-metadata/information-type-overrides":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/document-metadata/information-type-overrides/standard":{"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["key"],"properties":{"key":{"type":"string","minLength":1,"maxLength":255},"disabled":{"type":"boolean"},"label":{"type":"string","maxLength":255}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/document-metadata/information-type-overrides/custom":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["label"],"properties":{"label":{"type":"string","minLength":1,"maxLength":255},"group":{"type":"string","enum":["attestation","description","image","user_manual","operation","identification","compliance","product_info","protocol","drawing","maintenance","other"]}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/document-metadata/information-type-overrides/custom/{overrideId}":{"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"label":{"type":"string","minLength":1,"maxLength":255},"group":{"type":"string","enum":["attestation","description","image","user_manual","operation","identification","compliance","product_info","protocol","drawing","maintenance","other"]}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"overrideId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/document-metadata/information-type-overrides/{overrideId}":{"delete":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"overrideId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/locations":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}},"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"locationType":{"type":"string","enum":["floor","zone","room"]},"parentEntryId":{"type":"string","minLength":36,"maxLength":36},"sortOrder":{"type":"integer","minimum":0}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/buildings/{buildingId}/locations/{locationId}":{"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"locationType":{"type":"string","enum":["floor","zone","room"]},"parentEntryId":{"type":"string","minLength":36,"maxLength":36},"sortOrder":{"type":"integer","minimum":0}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"locationId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"locationId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/projects/{projectId}":{"get":{"summary":"Get project by ID","tags":["Document Platform"],"description":"Retrieve detailed information for a specific project.\n\nA project the caller may read but which belongs to a different customer than the one in the path answers 404 with `error: \"ProjectNotInCustomer\"` and the owning `customerId`, so a client that arrived through a link can switch to the right customer instead of showing \"not found\". The id is only disclosed to callers who already hold read access on the project.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"customerId":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"put":{"summary":"Update project","tags":["Document Platform"],"description":"Update an existing project properties","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"projectName":{"type":"string","minLength":1,"maxLength":200},"buildingName":{"type":"string"},"buildingId":{"type":"string"},"locationCode":{"type":"string"},"status":{"nullable":true,"type":"string","enum":["COMPLETED","CANCELLED","PLANNING","CONSTRUCTING"]},"settings_NS3451":{"type":"boolean"},"settings_filename_descriptive":{"type":"boolean"},"settings_locationCode":{"type":"boolean"},"settings_informationType":{"type":"boolean"},"settings_TFM":{"type":"boolean"},"settings_drawing_locationCode":{"type":"boolean"},"settings_drawing_floor":{"type":"boolean"},"settings_drawing_subject":{"type":"boolean"},"settings_drawing_code":{"type":"boolean"},"settings_drawing_serialNumber":{"type":"boolean"},"settings_required_buildingCategory":{"type":"boolean"},"settings_required_informationType":{"type":"boolean"},"settings_required_serialNumber":{"type":"boolean"},"settings_required_tfmCode":{"type":"boolean"},"settings_requireApproval":{"type":"boolean"},"contactEmail":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"version":{"type":"number"},"settings_show_deliveries":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Conflict - the resource is busy or in a conflicting state.","content":{"application/json":{"schema":{"description":"Conflict - the resource is busy or in a conflicting state.","type":"object","properties":{"error":{"type":"string","enum":["ConflictError","CustomerDeletingConflictError","MutationLeaseConflictError","LastOwnerError","DuplicateCompanyNameError","folder_not_empty"]},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Delete project","tags":["Document Platform"],"description":"Delete an existing project","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/":{"get":{"summary":"Get projects by customer","tags":["Document Platform"],"description":"Retrieve all projects for a specific customer","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/buildings/{buildingId}":{"post":{"summary":"Create new project","tags":["Document Platform"],"description":"Create a new project for a specific building","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"buildingName":{"type":"string"},"buildingAddress":{"type":"string"},"buildingArchived":{"type":"boolean"},"contactEmail":{"type":"string"},"locationCode":{"type":"string"},"settings_locationCode":{"type":"boolean"},"settings_informationType":{"type":"boolean"},"settings_TFM":{"type":"boolean"},"settings_NS3451":{"type":"boolean"},"settings_drawing_locationCode":{"type":"boolean"},"settings_drawing_floor":{"type":"boolean"},"settings_drawing_subject":{"type":"boolean"},"settings_drawing_code":{"type":"boolean"},"settings_drawing_serialNumber":{"type":"boolean"},"settings_filename_descriptive":{"type":"boolean"},"settings_show_deliveries":{"type":"boolean"},"settings_required_buildingCategory":{"type":"boolean"},"settings_required_informationType":{"type":"boolean"},"settings_required_serialNumber":{"type":"boolean"},"settings_required_tfmCode":{"type":"boolean"},"settings_requireApproval":{"type":"boolean"},"lastActivityAt":{"type":"string"},"version":{"type":"number"},"endDate":{"type":"string"},"startDate":{"type":"string"},"status":{"nullable":true,"type":"string","enum":["COMPLETED","CANCELLED","PLANNING","CONSTRUCTING"]}},"required":["name"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/{projectId}/my-features":{"get":{"summary":"Get my project features","tags":["Document Platform"],"description":"Get the current user's active features for a project","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"features":{"type":"array","items":{"type":"string"},"description":"List of feature names the user has (e.g., can_upload_checklist_docs, can_read_checklist_docs)"}},"required":["features"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/{projectId}/upload-only-users":{"get":{"summary":"Get upload-only users for a project","tags":["Document Platform"],"description":"Retrieve list of users with upload-only access to a project (users with upload relation but not edit or administrate)","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/{projectId}/buildings/{buildingId}/checklists/{checklistId}/assigned-users":{"get":{"summary":"Get assigned users to checklist items","tags":["Document Platform"],"description":"Retrieve list of users assigned to checklist items for a specific project","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/{projectId}/buildings/{buildingId}/checklists/{checklistId}/assigned-subcontractors":{"get":{"summary":"Get assigned subcontractors to project checklist items","tags":["Document Platform"],"description":"Retrieve project requirements grouped by their assigned subcontractor (company).","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"checklistId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/templates":{"get":{"summary":"Get template projects","tags":["Document Platform"],"description":"Retrieve all template projects for a specific customer","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/{projectId}/template-status":{"patch":{"summary":"Set project template status","tags":["Document Platform"],"description":"Toggle whether a project is marked as a template","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"isTemplate":{"type":"boolean"}},"required":["isTemplate"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/{projectId}/template-folders":{"get":{"summary":"Get project template folder structure","tags":["Document Platform"],"description":"Returns a project template's checklist folder structure in ChecklistFolderTemplate shape","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Template folder structure","content":{"application/json":{"schema":{"description":"Template folder structure","type":"object","additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/{projectId}/buildings/{buildingId}/create-from-template":{"post":{"summary":"Create project requirements from template","tags":["Document Platform"],"description":"Create project requirements checklist from a predefined folder template with items and folders","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"templateKey":{"type":"string","enum":["ns-3456","mandatory","empty","brann","elektro","hms","juridiske-dokumenter","heis","bygg-generelt","milj-sertifisering","tegninger","vvs","automatisering","serviceavtaler","golden-thread-en","anuk-en","hmo-licencing-en","mobilisation-documents-en","ppm-planned-preventative-maintenance-en"]}},"required":["templateKey"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/{projectId}/buildings/{buildingId}/create-from-project-template":{"post":{"summary":"Create project requirements from project template","tags":["Document Platform"],"description":"Create project requirements checklist by cloning from another project that is marked as a template","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"templateProjectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["templateProjectId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/{projectId}/move-to-building":{"post":{"summary":"Move project to another building","tags":["Document Platform"],"description":"Start an async workflow to move a project and all its documents, collections and folders to another building. Returns a workflowId; poll /status for progress.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"toBuildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["toBuildingId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"security":[{"apiKey":[]}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"workflowId":{"type":"string"}},"required":["success","message","workflowId"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Conflict - the resource is busy or in a conflicting state.","content":{"application/json":{"schema":{"description":"Conflict - the resource is busy or in a conflicting state.","type":"object","properties":{"error":{"type":"string","enum":["ConflictError","CustomerDeletingConflictError","MutationLeaseConflictError","LastOwnerError","DuplicateCompanyNameError","folder_not_empty"]},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/{projectId}/move-to-building/{workflowId}/status":{"get":{"summary":"Get progress of a running or recently-completed project move.","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"workflowId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"workflowId":{"type":"string"},"progress":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["preparing","running","completed","failed"]},"totalRequested":{"type":"number"},"totalProcessed":{"type":"number"},"totalBatches":{"type":"number"},"currentBatch":{"type":"number"},"movedDocuments":{"type":"number"},"movedCollections":{"type":"number"},"movedChecklistAssociations":{"type":"number"},"counterErrorCount":{"default":0,"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"message":{"type":"string"}},"required":["documentIds","message"],"additionalProperties":false}},"stepErrors":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}},"startedAt":{"type":"string"},"completedAt":{"nullable":true,"type":"string"},"message":{"type":"string"}},"required":["status","totalRequested","totalProcessed","totalBatches","currentBatch","movedDocuments","movedCollections","movedChecklistAssociations","counterErrorCount","errors","stepErrors","warnings","startedAt","completedAt","message"],"additionalProperties":false}},"required":["success","message","workflowId","progress"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/{projectId}/preview-filenames":{"get":{"summary":"Preview bulk filename updates in a project","tags":["Document Platform"],"description":"Preview what the new filenames would be without making any changes. Returns a list of documents with their current and proposed new filenames.","parameters":[{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"useLocationCode","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"useInformationType","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"useTFMCode","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/{projectId}/update-filenames":{"post":{"summary":"Bulk update document filenames in a project","tags":["Document Platform"],"description":"Update all document filenames in a project using the filename builder with configurable settings. Documents that have already been updated (hasUpdatedFilename=true) are skipped. Optionally provide overrides to use custom filenames for specific documents.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"object","properties":{"useLocationCode":{"type":"boolean"},"useInformationType":{"type":"boolean"},"useTFMCode":{"type":"boolean"}},"required":["useLocationCode","useInformationType","useTFMCode"],"additionalProperties":false},"overrides":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"filename":{"type":"string","minLength":1}},"required":["documentId","filename"],"additionalProperties":false}}},"required":["settings"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/{projectId}/bulk-update-metadata":{"post":{"summary":"Bulk update document metadata in a project","tags":["Document Platform"],"description":"Update building category and/or information type for multiple documents in a project. Used for fixing metadata before bulk filename updates.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"updates":{"type":"object","properties":{"buildingCategory":{"type":"string"},"informationTypes":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}},"required":["documentIds","updates"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/{projectId}/subcontractors/":{"get":{"summary":"List subcontractors for a project","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"post":{"summary":"Create a subcontractor","tags":["Document Platform"],"description":"Creates a subcontractor and its FGA group with project:upload access. Each contact-person email is resolved against the customer's WorkOS org: existing org users are added directly without a WorkOS invitation; new emails receive an invitation.\n\nIMPORTANT — partial success: responds 201 when everything succeeded, or 207 with the created subcontractor plus a `warnings` array when it was created but one or more contact persons could not be given access. 207 does NOT mean 'maybe created' — the company exists and is returned in both cases. This mirrors the DELETE route. The rollback boundary is the first sent WorkOS invitation: before it, a failure rolls back completely and returns an error; after it, the create commits, because WorkOS exposes no way to revoke an invitation and a rollback would leave the invitee holding a link to a company that no longer exists.\n\nCompany names are unique per project (trimmed, case-insensitive). A duplicate is refused with 409 `DuplicateCompanyNameError` before anything is written, so the request is a no-op — clients should surface it as validation on the name field, not as a failed create. Names of removed subcontractors become available again.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"phone":{"nullable":true,"type":"string"},"contactPersons":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"email":{},"phone":{"nullable":true,"type":"string"},"isPrimary":{"type":"boolean"},"role":{"type":"string","minLength":1,"maxLength":120}},"required":["name","email"],"additionalProperties":false}},"deadlineDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["name","contactPersons"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Conflict - the resource is busy or in a conflicting state.","content":{"application/json":{"schema":{"description":"Conflict - the resource is busy or in a conflicting state.","type":"object","properties":{"error":{"type":"string","enum":["ConflictError","CustomerDeletingConflictError","MutationLeaseConflictError","LastOwnerError","DuplicateCompanyNameError","folder_not_empty"]},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/{projectId}/subcontractors/{subcontractorId}":{"get":{"summary":"Get a subcontractor","tags":["Document Platform"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"subcontractorId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"patch":{"summary":"Update a subcontractor","tags":["Document Platform"],"description":"Updates a subcontractor.\n\nIMPORTANT — contactPersons contract: clients SHOULD always send the full `contactPersons` list (not just deltas) on any update that may need to converge FGA. The service treats an omitted `contactPersons` field as 'no change requested', which means a previous failed FGA-sync attempt cannot be remediated by a partial update — only by a future request that includes the contactPersons array. The frontend SubcontractorDialog enforces this contract; direct API callers must do the same.\n\nIMPORTANT — 500 semantics: a 500 response from this endpoint does NOT mean 'no changes were made'. The DB write commits before the FGA membership sync; if the sync fails, the row already reflects the new state but the FGA group is stale.\n\nRecovery is NOT self-healing on retry: a retried PATCH with the same `contactPersons` array computes its diff against the now-persisted post-write list, produces an empty diff, and skips the FGA sync entirely — so the same request will succeed without fixing anything. The actual recovery paths are: (a) a future legitimate contact-list change whose diff happens to cover the missed entries, or (b) an operator-driven two-step PATCH (mutate the list to force a non-empty diff, then PATCH back). Operators are paged on the `subcontractor.update.fga_sync_failed` log event to drive (b). A background reconciliation job that obviates this manual recovery is tracked separately.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"phone":{"nullable":true,"type":"string"},"contactPersons":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"email":{},"phone":{"nullable":true,"type":"string"},"isPrimary":{"type":"boolean"},"role":{"type":"string","minLength":1,"maxLength":120}},"required":["name","email"],"additionalProperties":false}},"deadlineDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"subcontractorId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Conflict - the resource is busy or in a conflicting state.","content":{"application/json":{"schema":{"description":"Conflict - the resource is busy or in a conflicting state.","type":"object","properties":{"error":{"type":"string","enum":["ConflictError","CustomerDeletingConflictError","MutationLeaseConflictError","LastOwnerError","DuplicateCompanyNameError","folder_not_empty"]},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Delete a subcontractor","tags":["Document Platform"],"description":"Soft-deletes the subcontractor, clears `assignedSubcontractorId` from every open requirement assignment in the building, and tears down its FGA group (revoking project:upload from every contact person). On full success the response is 204; if the assignment-clear or FGA-teardown steps partially fail, the response is 207 with a `warnings` array — the DB row is always soft-deleted regardless.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"subcontractorId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/{projectId}/archive-preflight/":{"post":{"summary":"Start the preflight scan of a ZIP uploaded into a project","tags":["Document Platform"],"description":"Registers an archive uploaded with the `project-archive` target and scans its contents before anything is imported. Pass `checklistItemId` when the archive was dropped on one requirement: every extracted document is then linked to it. Without it the documents are matched to the uploader's requirements after the import.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"objectKey":{"type":"string","minLength":1},"checklistItemId":{"type":"string","minLength":1},"filename":{"type":"string","minLength":1,"maxLength":1024}},"required":["documentId","objectKey"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"projectId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"preflightId":{"type":"string"},"buildingId":{"type":"string"},"customerId":{"type":"string"},"documentId":{"type":"string"},"objectKey":{"type":"string"},"status":{"type":"string","enum":["scanning","ready","awaiting_approval","approved","importing","completed","cancelling","cancelled","failed"]},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"error":{"type":"string"},"totals":{"type":"object","properties":{"folders":{"type":"integer","minimum":0,"maximum":9007199254740991},"documents":{"type":"integer","minimum":0,"maximum":9007199254740991},"bytes":{"type":"number","minimum":0},"compressedBytes":{"type":"number","minimum":0},"archives":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["folders","documents","bytes","compressedBytes","archives"],"additionalProperties":false},"approval":{"type":"object","properties":{"requestedAt":{"type":"string"},"requestedBy":{"type":"string"},"requestedDocs":{"type":"integer","minimum":0,"maximum":9007199254740991},"approvedAt":{"type":"string"},"approvedBy":{"type":"string"}},"required":["requestedAt","requestedBy","requestedDocs"],"additionalProperties":false},"selection":{"type":"object","properties":{"folderIds":{"type":"array","items":{"type":"string"}},"projectedDocs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["folderIds","projectedDocs"],"additionalProperties":false},"importTotals":{"type":"object","properties":{"extracted":{"type":"integer","minimum":0,"maximum":9007199254740991},"created":{"type":"integer","minimum":0,"maximum":9007199254740991},"duplicates":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["extracted","created","duplicates","failed"],"additionalProperties":false},"projectId":{"type":"string"},"checklistItemId":{"type":"string"},"subcontractorId":{"type":"string"},"assignedOnly":{"type":"boolean"},"uploadedBy":{"type":"string"},"filename":{"type":"string"},"matching":{"type":"object","properties":{"status":{"type":"string","enum":["waiting","matching","done","skipped","failed"]},"matchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"unmatchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"type":"string","enum":["locked","no_requirements","no_documents"]},"updatedAt":{"type":"string"}},"required":["status","updatedAt"],"additionalProperties":false}},"required":["preflightId","buildingId","customerId","documentId","objectKey","status","startedAt"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"get":{"summary":"List a project's ZIP uploads","tags":["Document Platform"],"description":"The archive uploads into this project the caller may see, newest first: all of them for a project editor, otherwise only their own.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"projectId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"runs":{"type":"array","items":{"type":"object","properties":{"preflightId":{"type":"string"},"buildingId":{"type":"string"},"customerId":{"type":"string"},"documentId":{"type":"string"},"objectKey":{"type":"string"},"status":{"type":"string","enum":["scanning","ready","awaiting_approval","approved","importing","completed","cancelling","cancelled","failed"]},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"error":{"type":"string"},"totals":{"type":"object","properties":{"folders":{"type":"integer","minimum":0,"maximum":9007199254740991},"documents":{"type":"integer","minimum":0,"maximum":9007199254740991},"bytes":{"type":"number","minimum":0},"compressedBytes":{"type":"number","minimum":0},"archives":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["folders","documents","bytes","compressedBytes","archives"],"additionalProperties":false},"approval":{"type":"object","properties":{"requestedAt":{"type":"string"},"requestedBy":{"type":"string"},"requestedDocs":{"type":"integer","minimum":0,"maximum":9007199254740991},"approvedAt":{"type":"string"},"approvedBy":{"type":"string"}},"required":["requestedAt","requestedBy","requestedDocs"],"additionalProperties":false},"selection":{"type":"object","properties":{"folderIds":{"type":"array","items":{"type":"string"}},"projectedDocs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["folderIds","projectedDocs"],"additionalProperties":false},"importTotals":{"type":"object","properties":{"extracted":{"type":"integer","minimum":0,"maximum":9007199254740991},"created":{"type":"integer","minimum":0,"maximum":9007199254740991},"duplicates":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["extracted","created","duplicates","failed"],"additionalProperties":false},"projectId":{"type":"string"},"checklistItemId":{"type":"string"},"subcontractorId":{"type":"string"},"assignedOnly":{"type":"boolean"},"uploadedBy":{"type":"string"},"filename":{"type":"string"},"matching":{"type":"object","properties":{"status":{"type":"string","enum":["waiting","matching","done","skipped","failed"]},"matchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"unmatchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"type":"string","enum":["locked","no_requirements","no_documents"]},"updatedAt":{"type":"string"}},"required":["status","updatedAt"],"additionalProperties":false}},"required":["preflightId","buildingId","customerId","documentId","objectKey","status","startedAt"],"additionalProperties":false}}},"required":["runs"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/{projectId}/archive-preflight/{preflightId}":{"get":{"summary":"Get a project ZIP upload","tags":["Document Platform"],"description":"A single archive upload into this project.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"preflightId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"preflightId":{"type":"string"},"buildingId":{"type":"string"},"customerId":{"type":"string"},"documentId":{"type":"string"},"objectKey":{"type":"string"},"status":{"type":"string","enum":["scanning","ready","awaiting_approval","approved","importing","completed","cancelling","cancelled","failed"]},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"error":{"type":"string"},"totals":{"type":"object","properties":{"folders":{"type":"integer","minimum":0,"maximum":9007199254740991},"documents":{"type":"integer","minimum":0,"maximum":9007199254740991},"bytes":{"type":"number","minimum":0},"compressedBytes":{"type":"number","minimum":0},"archives":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["folders","documents","bytes","compressedBytes","archives"],"additionalProperties":false},"approval":{"type":"object","properties":{"requestedAt":{"type":"string"},"requestedBy":{"type":"string"},"requestedDocs":{"type":"integer","minimum":0,"maximum":9007199254740991},"approvedAt":{"type":"string"},"approvedBy":{"type":"string"}},"required":["requestedAt","requestedBy","requestedDocs"],"additionalProperties":false},"selection":{"type":"object","properties":{"folderIds":{"type":"array","items":{"type":"string"}},"projectedDocs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["folderIds","projectedDocs"],"additionalProperties":false},"importTotals":{"type":"object","properties":{"extracted":{"type":"integer","minimum":0,"maximum":9007199254740991},"created":{"type":"integer","minimum":0,"maximum":9007199254740991},"duplicates":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["extracted","created","duplicates","failed"],"additionalProperties":false},"projectId":{"type":"string"},"checklistItemId":{"type":"string"},"subcontractorId":{"type":"string"},"assignedOnly":{"type":"boolean"},"uploadedBy":{"type":"string"},"filename":{"type":"string"},"matching":{"type":"object","properties":{"status":{"type":"string","enum":["waiting","matching","done","skipped","failed"]},"matchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"unmatchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"type":"string","enum":["locked","no_requirements","no_documents"]},"updatedAt":{"type":"string"}},"required":["status","updatedAt"],"additionalProperties":false}},"required":["preflightId","buildingId","customerId","documentId","objectKey","status","startedAt"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/{projectId}/archive-preflight/{preflightId}/folder-tree":{"get":{"summary":"Get the folder tree of a project ZIP upload","tags":["Document Platform"],"description":"The archive's folder tree with per-folder document counts, for choosing what to import. Bounded; `truncated` flags an omitted tail.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"preflightId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"folders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parentId":{"type":"string"},"depth":{"type":"integer","minimum":0,"maximum":9007199254740991},"directDocs":{"type":"integer","minimum":0,"maximum":9007199254740991},"directBytes":{"type":"number","minimum":0},"totalDocs":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalBytes":{"type":"number","minimum":0},"types":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"bytes":{"type":"number","minimum":0}},"required":["type","count","bytes"],"additionalProperties":false}},"directArchives":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalArchives":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","name","depth","directDocs","directBytes","totalDocs","totalBytes","types","directArchives","totalArchives"],"additionalProperties":false}},"truncated":{"type":"boolean"}},"required":["folders","truncated"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/{projectId}/archive-preflight/{preflightId}/import-request":{"post":{"summary":"Request import of a project ZIP selection","tags":["Document Platform"],"description":"Record the chosen folders and run the building's document allowance check. Returns the run: importing when the documents fit, or awaiting_approval when Findable has to approve the volume first.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"selectedFolderIds":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"string","maxLength":1024}}},"required":["selectedFolderIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"preflightId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"preflightId":{"type":"string"},"buildingId":{"type":"string"},"customerId":{"type":"string"},"documentId":{"type":"string"},"objectKey":{"type":"string"},"status":{"type":"string","enum":["scanning","ready","awaiting_approval","approved","importing","completed","cancelling","cancelled","failed"]},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"error":{"type":"string"},"totals":{"type":"object","properties":{"folders":{"type":"integer","minimum":0,"maximum":9007199254740991},"documents":{"type":"integer","minimum":0,"maximum":9007199254740991},"bytes":{"type":"number","minimum":0},"compressedBytes":{"type":"number","minimum":0},"archives":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["folders","documents","bytes","compressedBytes","archives"],"additionalProperties":false},"approval":{"type":"object","properties":{"requestedAt":{"type":"string"},"requestedBy":{"type":"string"},"requestedDocs":{"type":"integer","minimum":0,"maximum":9007199254740991},"approvedAt":{"type":"string"},"approvedBy":{"type":"string"}},"required":["requestedAt","requestedBy","requestedDocs"],"additionalProperties":false},"selection":{"type":"object","properties":{"folderIds":{"type":"array","items":{"type":"string"}},"projectedDocs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["folderIds","projectedDocs"],"additionalProperties":false},"importTotals":{"type":"object","properties":{"extracted":{"type":"integer","minimum":0,"maximum":9007199254740991},"created":{"type":"integer","minimum":0,"maximum":9007199254740991},"duplicates":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["extracted","created","duplicates","failed"],"additionalProperties":false},"projectId":{"type":"string"},"checklistItemId":{"type":"string"},"subcontractorId":{"type":"string"},"assignedOnly":{"type":"boolean"},"uploadedBy":{"type":"string"},"filename":{"type":"string"},"matching":{"type":"object","properties":{"status":{"type":"string","enum":["waiting","matching","done","skipped","failed"]},"matchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"unmatchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"type":"string","enum":["locked","no_requirements","no_documents"]},"updatedAt":{"type":"string"}},"required":["status","updatedAt"],"additionalProperties":false}},"required":["preflightId","buildingId","customerId","documentId","objectKey","status","startedAt"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/{projectId}/archive-preflight/{preflightId}/cancel":{"post":{"summary":"Cancel a project ZIP upload","tags":["Document Platform"],"description":"Cancel an upload that is waiting for folder choice or approval, and remove its archive and scan output.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"preflightId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"preflightId":{"type":"string"},"buildingId":{"type":"string"},"customerId":{"type":"string"},"documentId":{"type":"string"},"objectKey":{"type":"string"},"status":{"type":"string","enum":["scanning","ready","awaiting_approval","approved","importing","completed","cancelling","cancelled","failed"]},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"error":{"type":"string"},"totals":{"type":"object","properties":{"folders":{"type":"integer","minimum":0,"maximum":9007199254740991},"documents":{"type":"integer","minimum":0,"maximum":9007199254740991},"bytes":{"type":"number","minimum":0},"compressedBytes":{"type":"number","minimum":0},"archives":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["folders","documents","bytes","compressedBytes","archives"],"additionalProperties":false},"approval":{"type":"object","properties":{"requestedAt":{"type":"string"},"requestedBy":{"type":"string"},"requestedDocs":{"type":"integer","minimum":0,"maximum":9007199254740991},"approvedAt":{"type":"string"},"approvedBy":{"type":"string"}},"required":["requestedAt","requestedBy","requestedDocs"],"additionalProperties":false},"selection":{"type":"object","properties":{"folderIds":{"type":"array","items":{"type":"string"}},"projectedDocs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["folderIds","projectedDocs"],"additionalProperties":false},"importTotals":{"type":"object","properties":{"extracted":{"type":"integer","minimum":0,"maximum":9007199254740991},"created":{"type":"integer","minimum":0,"maximum":9007199254740991},"duplicates":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["extracted","created","duplicates","failed"],"additionalProperties":false},"projectId":{"type":"string"},"checklistItemId":{"type":"string"},"subcontractorId":{"type":"string"},"assignedOnly":{"type":"boolean"},"uploadedBy":{"type":"string"},"filename":{"type":"string"},"matching":{"type":"object","properties":{"status":{"type":"string","enum":["waiting","matching","done","skipped","failed"]},"matchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"unmatchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"type":"string","enum":["locked","no_requirements","no_documents"]},"updatedAt":{"type":"string"}},"required":["status","updatedAt"],"additionalProperties":false}},"required":["preflightId","buildingId","customerId","documentId","objectKey","status","startedAt"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/{projectId}/archive-preflight/{preflightId}/unmatched":{"get":{"summary":"List a project ZIP's documents that are on no requirement","tags":["Document Platform"],"description":"The imported archive's documents that are linked to none of the project's requirements, for manual assignment.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"preflightId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"path":{"type":"string"},"informationTypes":{"type":"array","items":{"type":"string"}}},"required":["id","filename"],"additionalProperties":false}}},"required":["documents"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/projects/{projectId}/archive-preflight/{preflightId}/assign":{"post":{"summary":"Link a project ZIP's documents to requirements","tags":["Document Platform"],"description":"Manually link documents from this archive to requirements, as pending. A caller who cannot edit the project may only use the requirements assigned to them. Already-linked pairs are skipped.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assignments":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"checklistItemIds":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","minLength":1}}},"required":["documentId","checklistItemIds"],"additionalProperties":false}}},"required":["assignments"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"preflightId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"attached":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["attached"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-templates/":{"get":{"summary":"Get workflows","tags":["Document Platform"],"description":"Retrieve all workflows for a customer","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"post":{"summary":"Create workflow","tags":["Document Platform"],"description":"Create a new workflow for a customer","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"datapoints":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["text"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["list"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["tag"]},"options":{"minItems":1,"type":"array","items":{"type":"string"},"description":"Allowed values for tag/multipleTags (3-6 options covering common cases)."}},"required":["label","displayName","description","kind","options"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["date"]},"format":{"nullable":true,"description":"Date format string. The format should only specified in this field, not in the description of the datapoint. The format string should conform to the patterns supported by the date-fns library.","type":"string"}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["boolean"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["multipleTags"]},"options":{"minItems":1,"type":"array","items":{"type":"string"},"description":"Allowed values for tag/multipleTags (3-6 options covering common cases)."}},"required":["label","displayName","description","kind","options"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["currency"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["numeric"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["verbatim"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["percentage"]}},"required":["label","displayName","description","kind"],"additionalProperties":false}]}},"documentIds":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documentId","buildingId"],"additionalProperties":false}},"documentSource":{"type":"string","enum":["findable","upload"]},"documentGroups":{"type":"array","items":{"type":"object","properties":{"groupId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"documentIds":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documentId","buildingId"],"additionalProperties":false}},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["groupId","documentIds"],"additionalProperties":false}}},"required":["name","datapoints"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-templates/{workflowId}":{"get":{"summary":"Get workflow","tags":["Document Platform"],"description":"Retrieve a specific workflow by ID","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"workflowId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Delete workflow","tags":["Document Platform"],"description":"Soft delete a workflow","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"workflowId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"patch":{"summary":"Update workflow","tags":["Document Platform"],"description":"Update a workflow template","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"datapoints":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["text"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["list"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["tag"]},"options":{"minItems":1,"type":"array","items":{"type":"string"},"description":"Allowed values for tag/multipleTags (3-6 options covering common cases)."}},"required":["label","displayName","description","kind","options"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["date"]},"format":{"nullable":true,"description":"Date format string. The format should only specified in this field, not in the description of the datapoint. The format string should conform to the patterns supported by the date-fns library.","type":"string"}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["boolean"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["multipleTags"]},"options":{"minItems":1,"type":"array","items":{"type":"string"},"description":"Allowed values for tag/multipleTags (3-6 options covering common cases)."}},"required":["label","displayName","description","kind","options"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["currency"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["numeric"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["verbatim"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["percentage"]}},"required":["label","displayName","description","kind"],"additionalProperties":false}]}},"documentIds":{"nullable":true,"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documentId","buildingId"],"additionalProperties":false}},"documentSource":{"nullable":true,"type":"string","enum":["findable","upload"]},"documentGroups":{"nullable":true,"type":"array","items":{"type":"object","properties":{"groupId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"documentIds":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documentId","buildingId"],"additionalProperties":false}},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["groupId","documentIds"],"additionalProperties":false}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"workflowId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-templates/{workflowId}/duplicate":{"post":{"summary":"Duplicate workflow","tags":["Document Platform"],"description":"Create a copy of an existing workflow template","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"workflowId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/mine":{"get":{"summary":"Get current user workflow executions","tags":["Document Platform"],"description":"Retrieve workflow executions created by the current user, optionally filtered by status and visibility","parameters":[{"schema":{"type":"array","items":{"type":"string","enum":["draft","idle","pending","running","finished","failed"]}},"in":"query","name":"status","required":false},{"schema":{"default":"all","type":"string","enum":["public","private","all"]},"in":"query","name":"visibility","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/mine/stats":{"get":{"summary":"Get current user workflow execution stats","tags":["Document Platform"],"description":"Retrieve aggregated stats (documents processed, datapoints extracted) for the current user","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"documentsProcessed":{"type":"number"},"datapointsExtracted":{"type":"number"}},"required":["documentsProcessed","datapointsExtracted"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/cell-usage":{"get":{"summary":"Get customer workflow cell usage","tags":["Document Platform"],"description":"Retrieve rolling 30-day workflow (Extract) cell consumption and the customer cap","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"consumedLast30d":{"type":"integer","minimum":0,"maximum":9007199254740991},"cap":{"nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"perRunDocumentLimit":{"type":"integer","minimum":300,"maximum":9007199254740991},"nextRelease":{"nullable":true,"type":"object","properties":{"at":{"type":"string"},"cells":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["at","cells"],"additionalProperties":false}},"required":["consumedLast30d","cap","perRunDocumentLimit"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/":{"get":{"summary":"Get all workflow executions","tags":["Document Platform"],"description":"Retrieve all workflow executions for a customer. Use GET /paginated for cursor-based pagination in the UI.","parameters":[{"schema":{"default":"all","type":"string","enum":["public","private","all"]},"in":"query","name":"visibility","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"post":{"summary":"Create workflow execution","tags":["Document Platform"],"description":"Create a new execution for a workflow. The run starts private to its creator; a rerun (sourceExecutionId) needs read on the run it came from (404 otherwise, as for a run that does not exist) and keeps its visibility. Share it through PATCH /:executionId/visibility or /:executionId/access.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"documentIds":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documentId","buildingId"],"additionalProperties":false}},"datapoints":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["text"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["list"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["tag"]},"options":{"minItems":1,"type":"array","items":{"type":"string"},"description":"Allowed values for tag/multipleTags (3-6 options covering common cases)."}},"required":["label","displayName","description","kind","options"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["date"]},"format":{"nullable":true,"description":"Date format string. The format should only specified in this field, not in the description of the datapoint. The format string should conform to the patterns supported by the date-fns library.","type":"string"}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["boolean"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["multipleTags"]},"options":{"minItems":1,"type":"array","items":{"type":"string"},"description":"Allowed values for tag/multipleTags (3-6 options covering common cases)."}},"required":["label","displayName","description","kind","options"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["currency"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["numeric"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["verbatim"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["percentage"]}},"required":["label","displayName","description","kind"],"additionalProperties":false}]}},"documentGroups":{"type":"array","items":{"type":"object","properties":{"groupId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"documentIds":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documentId","buildingId"],"additionalProperties":false}},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["groupId","documentIds"],"additionalProperties":false}},"workflowId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceExecutionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["name","documentIds","datapoints"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"boolean"},"in":"query","name":"start","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/paginated":{"get":{"summary":"Get workflow executions (paginated)","tags":["Document Platform"],"description":"Retrieve workflow executions for a customer with cursor-based pagination and filtering","parameters":[{"schema":{"default":"all","type":"string","enum":["public","private","all"]},"in":"query","name":"visibility","required":true},{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"default":"all","type":"string","enum":["all","mine","others"]},"in":"query","name":"owner","required":true},{"schema":{"default":"all","type":"string","enum":["all","completed","running","draft","failed"]},"in":"query","name":"status","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/drafts":{"post":{"summary":"Create workflow draft","tags":["Document Platform"],"description":"Create a new draft workflow execution. The draft starts private to its creator; a rerun (sourceExecutionId) needs read on the run it came from (404 otherwise, as for a run that does not exist) and keeps its visibility. Share it through PATCH /:executionId/visibility or /:executionId/access.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"documentIds":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documentId","buildingId"],"additionalProperties":false}},"datapoints":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["text"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["list"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["tag"]},"options":{"minItems":1,"type":"array","items":{"type":"string"},"description":"Allowed values for tag/multipleTags (3-6 options covering common cases)."}},"required":["label","displayName","description","kind","options"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["date"]},"format":{"nullable":true,"description":"Date format string. The format should only specified in this field, not in the description of the datapoint. The format string should conform to the patterns supported by the date-fns library.","type":"string"}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["boolean"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["multipleTags"]},"options":{"minItems":1,"type":"array","items":{"type":"string"},"description":"Allowed values for tag/multipleTags (3-6 options covering common cases)."}},"required":["label","displayName","description","kind","options"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["currency"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["numeric"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["verbatim"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["percentage"]}},"required":["label","displayName","description","kind"],"additionalProperties":false}]}},"documentSource":{"type":"string","enum":["findable","upload"]},"documentScope":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["collection"]},"collectionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["kind","collectionId","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["category"]},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["kind","buildingId","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["discovery"]},"categoryCodes":{"type":"array","items":{"type":"string"}},"name":{"type":"string"}},"required":["kind","categoryCodes","name"],"additionalProperties":false}]},"documentGroups":{"type":"array","items":{"type":"object","properties":{"groupId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"documentIds":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documentId","buildingId"],"additionalProperties":false}},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["groupId","documentIds"],"additionalProperties":false}},"workflowId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceExecutionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["name"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/{executionId}":{"get":{"summary":"Get workflow execution","tags":["Document Platform"],"description":"Retrieve a specific workflow execution by ID","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"patch":{"summary":"Update workflow draft","tags":["Document Platform"],"description":"Update a draft workflow execution","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"documentIds":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documentId","buildingId"],"additionalProperties":false}},"datapoints":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["text"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["list"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["tag"]},"options":{"minItems":1,"type":"array","items":{"type":"string"},"description":"Allowed values for tag/multipleTags (3-6 options covering common cases)."}},"required":["label","displayName","description","kind","options"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["date"]},"format":{"nullable":true,"description":"Date format string. The format should only specified in this field, not in the description of the datapoint. The format string should conform to the patterns supported by the date-fns library.","type":"string"}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["boolean"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["multipleTags"]},"options":{"minItems":1,"type":"array","items":{"type":"string"},"description":"Allowed values for tag/multipleTags (3-6 options covering common cases)."}},"required":["label","displayName","description","kind","options"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["currency"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["numeric"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["verbatim"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["percentage"]}},"required":["label","displayName","description","kind"],"additionalProperties":false}]}},"documentSource":{"type":"string","enum":["findable","upload"]},"documentScope":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["collection"]},"collectionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["kind","collectionId","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["category"]},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["kind","buildingId","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["discovery"]},"categoryCodes":{"type":"array","items":{"type":"string"}},"name":{"type":"string"}},"required":["kind","categoryCodes","name"],"additionalProperties":false}]},"documentGroups":{"type":"array","items":{"type":"object","properties":{"groupId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"documentIds":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documentId","buildingId"],"additionalProperties":false}},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["groupId","documentIds"],"additionalProperties":false}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Delete workflow execution","tags":["Document Platform"],"description":"Delete a workflow execution","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/{executionId}/document-order":{"patch":{"summary":"Update document order","tags":["Document Platform"],"description":"Update the document display order for a workflow execution","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentOrder":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["documentOrder"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/{executionId}/visibility":{"patch":{"summary":"Set extraction visibility","tags":["Document Platform"],"description":"Mark extraction as private or public. New runs start private, so making one public is how its creator shares it with the organisation. Requires administrate on the extraction.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"isPrivate":{"type":"boolean"}},"required":["isPrivate"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/{executionId}/access":{"post":{"summary":"Grant extraction access","tags":["Document Platform"],"description":"Grant a user read, edit, or administrate access to a private extraction. Requires administrate on the extraction.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"relation":{"type":"string","enum":["read","edit","administrate"]},"subject":{"type":"object","properties":{"resourceType":{"type":"string","enum":["user"]},"resourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["resourceType","resourceId"],"additionalProperties":false}},"required":["relation","subject"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Revoke extraction access","tags":["Document Platform"],"description":"Revoke all access for a user on a private extraction. Cannot revoke your own access. Requires administrate.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"object","properties":{"resourceType":{"type":"string","enum":["user"]},"resourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["resourceType","resourceId"],"additionalProperties":false}},"required":["subject"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"patch":{"summary":"Update extraction access","tags":["Document Platform"],"description":"Change a user's access level (read, edit, administrate) on a private extraction. Cannot update your own. Requires administrate.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"object","properties":{"resourceType":{"type":"string","enum":["user"]},"resourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["resourceType","resourceId"],"additionalProperties":false},"relation":{"type":"string","enum":["read","edit","administrate"]}},"required":["subject","relation"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"get":{"summary":"List users with extraction access","tags":["Document Platform"],"description":"List users who have been granted access to this (private) extraction and their relation. Requires read on the extraction.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"relation":{"type":"string","enum":["read","edit","administrate"]}},"required":["id","email","relation"],"additionalProperties":false}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/{executionId}/access/eligible-users":{"get":{"summary":"List eligible users for extraction access","tags":["Document Platform"],"description":"List users in the same customer organisation who can be granted access to this extraction. Requires read on the extraction.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["id","email"],"additionalProperties":false}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/{executionId}/start":{"post":{"summary":"Start workflow execution","tags":["Document Platform"],"description":"Start a draft or idle workflow execution","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/{executionId}/columns":{"post":{"summary":"Add columns to a finished execution","tags":["Document Platform"],"description":"Add new datapoint columns to a finished workflow execution, or to one that has run before and is idle waiting to run columns added earlier. The execution transitions to idle state and can be re-run to process all new columns together.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"datapoints":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["text"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["list"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["tag"]},"options":{"minItems":1,"type":"array","items":{"type":"string"},"description":"Allowed values for tag/multipleTags (3-6 options covering common cases)."}},"required":["label","displayName","description","kind","options"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["date"]},"format":{"nullable":true,"description":"Date format string. The format should only specified in this field, not in the description of the datapoint. The format string should conform to the patterns supported by the date-fns library.","type":"string"}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["boolean"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["multipleTags"]},"options":{"minItems":1,"type":"array","items":{"type":"string"},"description":"Allowed values for tag/multipleTags (3-6 options covering common cases)."}},"required":["label","displayName","description","kind","options"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["currency"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["numeric"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["verbatim"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string"},"wizardDescription":{"type":"string"},"suggestedIcon":{"type":"string"},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"includeFileMetadata":{"type":"boolean"},"metadataSource":{"type":"string","enum":["discipline","asBuilt","drawingType","isDrawing","drawingNumber","drawingRevision","drawingTitle","drawingDate","documentDate","floor","zone","serialNumber","informationTypes","buildingCategory","language","pageCount"]},"kind":{"type":"string","enum":["percentage"]}},"required":["label","displayName","description","kind"],"additionalProperties":false}]}}},"required":["datapoints"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/{executionId}/documents":{"post":{"summary":"Add documents to an execution","tags":["Document Platform"],"description":"Add documents to an execution without re-running it in full (T-9324). While a run is pending/running the documents are queued and extracted automatically when it finishes (`outcome: queued`); on a finished or idle execution they are merged immediately and a selective follow-up run starts (`outcome: started`, or `saved` if the run could not start, e.g. quota exceeded). Strictly additive — documents already on the execution are ignored (`outcome: no-change`).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"minItems":1,"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documentId","buildingId"],"additionalProperties":false}}},"required":["documentIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/{executionId}/groups":{"patch":{"summary":"Edit the groups and documents of a finished execution","tags":["Document Platform"],"description":"Replace the documents and groups of a finished workflow execution — e.g. add a forgotten document to a group. The execution transitions to idle state and can be re-run to process only the changed units.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documentId","buildingId"],"additionalProperties":false}},"documentGroups":{"type":"array","items":{"type":"object","properties":{"groupId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"documentIds":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documentId","buildingId"],"additionalProperties":false}},"firstRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["groupId","documentIds"],"additionalProperties":false}}},"required":["documentIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/{executionId}/summary":{"post":{"summary":"Generate execution summary","tags":["Document Platform"],"description":"Generate or regenerate an AI-powered executive summary for a finished workflow execution. Returns 202 Accepted - poll the execution for the updated summary.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/{executionId}/export":{"get":{"summary":"Export workflow execution","tags":["Document Platform"],"description":"Export a workflow execution as a file","parameters":[{"schema":{"type":"string","enum":["csv","xlsx","json"]},"in":"query","name":"format","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/{executionId}/outputs/":{"post":{"summary":"Create workflow execution output","tags":["Document Platform"],"description":"**DEPRECATED**: This route is deprecated. Please use `/internal/customers/:customerId/workflow-executions/:executionId/outputs` instead. This route will be removed in a future version.\n\nCreate a new output datapoint for a workflow execution","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"result":{"oneOf":[{"type":"object","properties":{"label":{"type":"string"},"kind":{"type":"string","enum":["single"]},"value":{},"reasoning":{"type":"string"},"confidence":{"type":"string","enum":["low","medium","high"]},"citation":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["notAvailable"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["page"]},"pageNumber":{"type":"number"}},"required":["kind","pageNumber"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["passage"]},"pageNumber":{"type":"number"},"startIndex":{"type":"number"},"endIndex":{"type":"number"}},"required":["kind","pageNumber","startIndex","endIndex"],"additionalProperties":false}]},"userEdit":{"type":"object","properties":{"value":{},"editedBy":{"type":"string"},"editedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["value","editedBy","editedAt"],"additionalProperties":false},"provenance":{"type":"string","enum":["documentMetadata"]}},"required":["label","kind","value","reasoning","confidence"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string"},"kind":{"type":"string","enum":["notFound"]},"reasoning":{"type":"string"},"confidence":{"type":"string","enum":["low","medium","high"]},"userEdit":{"type":"object","properties":{"value":{},"editedBy":{"type":"string"},"editedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["value","editedBy","editedAt"],"additionalProperties":false}},"required":["label","kind","reasoning","confidence"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string"},"kind":{"type":"string","enum":["multiple"]},"value":{"type":"array","items":{}},"reasoning":{"type":"string"},"selectedIndex":{"type":"number"},"confidence":{"type":"string","enum":["low","medium","high"]},"citation":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["notAvailable"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["page"]},"pageNumber":{"type":"number"}},"required":["kind","pageNumber"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["passage"]},"pageNumber":{"type":"number"},"startIndex":{"type":"number"},"endIndex":{"type":"number"}},"required":["kind","pageNumber","startIndex","endIndex"],"additionalProperties":false}]}},"userEdit":{"type":"object","properties":{"value":{},"editedBy":{"type":"string"},"editedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["value","editedBy","editedAt"],"additionalProperties":false}},"required":["label","kind","value","reasoning","confidence"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string"},"kind":{"type":"string","enum":["failed"]},"error":{"type":"string","maxLength":1000},"userEdit":{"type":"object","properties":{"value":{},"editedBy":{"type":"string"},"editedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["value","editedBy","editedAt"],"additionalProperties":false}},"required":["label","kind"],"additionalProperties":false}]},"documentId":{"type":"string"},"extractionModel":{"type":"string"},"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cachedReadTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cacheCreationTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"llmCallCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"activityAttempt":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["result","documentId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true}],"deprecated":true,"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"get":{"summary":"Get workflow execution outputs","tags":["Document Platform"],"description":"Retrieve all outputs for an execution, grouped by document. Optionally filter by timestamp.","parameters":[{"schema":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"in":"query","name":"after","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/{executionId}/outputs/groups":{"get":{"summary":"Get workflow execution group outputs","tags":["Document Platform"],"description":"Retrieve resolved group-level outputs for an execution, grouped by group id.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/{executionId}/outputs/stream":{"get":{"summary":"Stream workflow execution outputs","tags":["Document Platform"],"description":"Stream all outputs for an execution, optionally after a timestamp","parameters":[{"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"in":"query","name":"afterTimestamp","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/{executionId}/outputs/{documentId}":{"delete":{"summary":"Delete workflow execution outputs for document","tags":["Document Platform"],"description":"Delete all outputs for a specific document in an execution","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/{executionId}/outputs/{documentId}/{label}/selected":{"patch":{"summary":"Update selected index for workflow execution output","tags":["Document Platform"],"description":"Update the selected index for a multiple-value output","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"selectedIndex":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["selectedIndex"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true},{"schema":{"type":"string"},"in":"path","name":"label","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/{executionId}/outputs/{documentId}/{label}/edit":{"patch":{"summary":"Edit workflow execution output value","tags":["Document Platform"],"description":"Set a manual value override on a cell. The AI value is preserved for revert and audit. The value is validated against the column's datapoint kind.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{}},"required":["value"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true},{"schema":{"type":"string"},"in":"path","name":"label","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Revert workflow execution output value","tags":["Document Platform"],"description":"Remove the manual value override on a cell, restoring the AI value.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true},{"schema":{"type":"string"},"in":"path","name":"label","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/{executionId}/outputs/groups/{groupId}/{label}/edit":{"patch":{"summary":"Edit workflow execution group output value","tags":["Document Platform"],"description":"Set a manual value override on a group's resolved cell. Per-document contributions are left untouched.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{}},"required":["value"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true},{"schema":{"type":"string"},"in":"path","name":"label","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"summary":"Revert workflow execution group output value","tags":["Document Platform"],"description":"Remove the manual value override on a group's resolved cell, restoring the AI value.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true},{"schema":{"type":"string"},"in":"path","name":"label","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/{executionId}/uploads/initiate":{"post":{"summary":"Initiate workflow document upload","tags":["Document Platform"],"description":"Get a presigned URL to upload a document directly to a workflow execution. Documents are stored in a hidden system building.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","minLength":1},"fileSize":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":104857600},"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["filename","fileSize"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/{executionId}/uploads/confirm":{"post":{"summary":"Confirm workflow document upload","tags":["Document Platform"],"description":"Confirm that a document has been uploaded and create the document record in a folder for the execution.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"filename":{"type":"string","minLength":1},"size":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["documentId","filename","size"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflow-executions/{executionId}/uploads/":{"get":{"summary":"List uploaded documents for execution","tags":["Document Platform"],"description":"List all documents that have been uploaded directly to this workflow execution.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"executionId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflows/generate":{"post":{"summary":"Generate workflow","tags":["Document Platform"],"description":"Generate a complete workflow (title, description, datapoints) from a natural language description using AI","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":1500,"description":"Natural language description of what to extract (max 1500 characters)"},"maxDatapoints":{"description":"Maximum number of datapoints to generate (max 100)","type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":100}},"required":["prompt"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"datapoints":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"kind":{"type":"string","enum":["text"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"kind":{"type":"string","enum":["list"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"kind":{"type":"string","enum":["tag"]},"options":{"minItems":1,"type":"array","items":{"type":"string"},"description":"Allowed values for tag/multipleTags (3-6 options covering common cases)."}},"required":["label","displayName","description","kind","options"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"kind":{"type":"string","enum":["date"]},"format":{"nullable":true,"description":"Date format string. The format should only specified in this field, not in the description of the datapoint. The format string should conform to the patterns supported by the date-fns library.","type":"string"}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"kind":{"type":"string","enum":["boolean"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"kind":{"type":"string","enum":["multipleTags"]},"options":{"minItems":1,"type":"array","items":{"type":"string"},"description":"Allowed values for tag/multipleTags (3-6 options covering common cases)."}},"required":["label","displayName","description","kind","options"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"kind":{"type":"string","enum":["currency"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"kind":{"type":"string","enum":["numeric"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"kind":{"type":"string","enum":["verbatim"]}},"required":["label","displayName","description","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"kind":{"type":"string","enum":["percentage"]}},"required":["label","displayName","description","kind"],"additionalProperties":false}]}}},"required":["title","description","datapoints"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflows/generate-with-wizard":{"post":{"summary":"Generate workflow with wizard UI fields","tags":["Document Platform"],"description":"Generate a complete workflow with TurboTax-style wizard questions, descriptions, and icons for each datapoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":1500,"description":"Natural language description of what to extract (max 1500 characters)"},"maxDatapoints":{"description":"Maximum number of datapoints to generate (max 100)","type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":100}},"required":["prompt"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"datapoints":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string","description":"An engaging, conversational question to ask the user (e.g., \"Who owns the property?\", \"When does the lease kick off?\"). Should be friendly and approachable."},"wizardDescription":{"type":"string","description":"A brief, helpful explanation of what this datapoint captures and why it matters (e.g., \"We'll find the landlord's name and details from your documents.\")."},"suggestedIcon":{"type":"string","description":"Lucide icon name matching the datapoint type. Use: Calendar for dates, Banknote for currency, Hash for numeric, Percent for percentage, CheckCircle for boolean, Tag for tag/multipleTags, List for list, FileText for text/verbatim. Other contextual icons like Building2, Users, MapPin are also valid."},"kind":{"type":"string","enum":["text"]}},"required":["label","displayName","description","wizardQuestion","wizardDescription","suggestedIcon","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string","description":"An engaging, conversational question to ask the user (e.g., \"Who owns the property?\", \"When does the lease kick off?\"). Should be friendly and approachable."},"wizardDescription":{"type":"string","description":"A brief, helpful explanation of what this datapoint captures and why it matters (e.g., \"We'll find the landlord's name and details from your documents.\")."},"suggestedIcon":{"type":"string","description":"Lucide icon name matching the datapoint type. Use: Calendar for dates, Banknote for currency, Hash for numeric, Percent for percentage, CheckCircle for boolean, Tag for tag/multipleTags, List for list, FileText for text/verbatim. Other contextual icons like Building2, Users, MapPin are also valid."},"kind":{"type":"string","enum":["list"]}},"required":["label","displayName","description","wizardQuestion","wizardDescription","suggestedIcon","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string","description":"An engaging, conversational question to ask the user (e.g., \"Who owns the property?\", \"When does the lease kick off?\"). Should be friendly and approachable."},"wizardDescription":{"type":"string","description":"A brief, helpful explanation of what this datapoint captures and why it matters (e.g., \"We'll find the landlord's name and details from your documents.\")."},"suggestedIcon":{"type":"string","description":"Lucide icon name matching the datapoint type. Use: Calendar for dates, Banknote for currency, Hash for numeric, Percent for percentage, CheckCircle for boolean, Tag for tag/multipleTags, List for list, FileText for text/verbatim. Other contextual icons like Building2, Users, MapPin are also valid."},"kind":{"type":"string","enum":["tag"]},"options":{"minItems":1,"type":"array","items":{"type":"string"},"description":"Allowed values for tag/multipleTags (3-6 options covering common cases)."}},"required":["label","displayName","description","wizardQuestion","wizardDescription","suggestedIcon","kind","options"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string","description":"An engaging, conversational question to ask the user (e.g., \"Who owns the property?\", \"When does the lease kick off?\"). Should be friendly and approachable."},"wizardDescription":{"type":"string","description":"A brief, helpful explanation of what this datapoint captures and why it matters (e.g., \"We'll find the landlord's name and details from your documents.\")."},"suggestedIcon":{"type":"string","description":"Lucide icon name matching the datapoint type. Use: Calendar for dates, Banknote for currency, Hash for numeric, Percent for percentage, CheckCircle for boolean, Tag for tag/multipleTags, List for list, FileText for text/verbatim. Other contextual icons like Building2, Users, MapPin are also valid."},"kind":{"type":"string","enum":["date"]},"format":{"nullable":true,"description":"Date format string. The format should only specified in this field, not in the description of the datapoint. The format string should conform to the patterns supported by the date-fns library.","type":"string"}},"required":["label","displayName","description","wizardQuestion","wizardDescription","suggestedIcon","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string","description":"An engaging, conversational question to ask the user (e.g., \"Who owns the property?\", \"When does the lease kick off?\"). Should be friendly and approachable."},"wizardDescription":{"type":"string","description":"A brief, helpful explanation of what this datapoint captures and why it matters (e.g., \"We'll find the landlord's name and details from your documents.\")."},"suggestedIcon":{"type":"string","description":"Lucide icon name matching the datapoint type. Use: Calendar for dates, Banknote for currency, Hash for numeric, Percent for percentage, CheckCircle for boolean, Tag for tag/multipleTags, List for list, FileText for text/verbatim. Other contextual icons like Building2, Users, MapPin are also valid."},"kind":{"type":"string","enum":["boolean"]}},"required":["label","displayName","description","wizardQuestion","wizardDescription","suggestedIcon","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string","description":"An engaging, conversational question to ask the user (e.g., \"Who owns the property?\", \"When does the lease kick off?\"). Should be friendly and approachable."},"wizardDescription":{"type":"string","description":"A brief, helpful explanation of what this datapoint captures and why it matters (e.g., \"We'll find the landlord's name and details from your documents.\")."},"suggestedIcon":{"type":"string","description":"Lucide icon name matching the datapoint type. Use: Calendar for dates, Banknote for currency, Hash for numeric, Percent for percentage, CheckCircle for boolean, Tag for tag/multipleTags, List for list, FileText for text/verbatim. Other contextual icons like Building2, Users, MapPin are also valid."},"kind":{"type":"string","enum":["multipleTags"]},"options":{"minItems":1,"type":"array","items":{"type":"string"},"description":"Allowed values for tag/multipleTags (3-6 options covering common cases)."}},"required":["label","displayName","description","wizardQuestion","wizardDescription","suggestedIcon","kind","options"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string","description":"An engaging, conversational question to ask the user (e.g., \"Who owns the property?\", \"When does the lease kick off?\"). Should be friendly and approachable."},"wizardDescription":{"type":"string","description":"A brief, helpful explanation of what this datapoint captures and why it matters (e.g., \"We'll find the landlord's name and details from your documents.\")."},"suggestedIcon":{"type":"string","description":"Lucide icon name matching the datapoint type. Use: Calendar for dates, Banknote for currency, Hash for numeric, Percent for percentage, CheckCircle for boolean, Tag for tag/multipleTags, List for list, FileText for text/verbatim. Other contextual icons like Building2, Users, MapPin are also valid."},"kind":{"type":"string","enum":["currency"]}},"required":["label","displayName","description","wizardQuestion","wizardDescription","suggestedIcon","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string","description":"An engaging, conversational question to ask the user (e.g., \"Who owns the property?\", \"When does the lease kick off?\"). Should be friendly and approachable."},"wizardDescription":{"type":"string","description":"A brief, helpful explanation of what this datapoint captures and why it matters (e.g., \"We'll find the landlord's name and details from your documents.\")."},"suggestedIcon":{"type":"string","description":"Lucide icon name matching the datapoint type. Use: Calendar for dates, Banknote for currency, Hash for numeric, Percent for percentage, CheckCircle for boolean, Tag for tag/multipleTags, List for list, FileText for text/verbatim. Other contextual icons like Building2, Users, MapPin are also valid."},"kind":{"type":"string","enum":["numeric"]}},"required":["label","displayName","description","wizardQuestion","wizardDescription","suggestedIcon","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string","description":"An engaging, conversational question to ask the user (e.g., \"Who owns the property?\", \"When does the lease kick off?\"). Should be friendly and approachable."},"wizardDescription":{"type":"string","description":"A brief, helpful explanation of what this datapoint captures and why it matters (e.g., \"We'll find the landlord's name and details from your documents.\")."},"suggestedIcon":{"type":"string","description":"Lucide icon name matching the datapoint type. Use: Calendar for dates, Banknote for currency, Hash for numeric, Percent for percentage, CheckCircle for boolean, Tag for tag/multipleTags, List for list, FileText for text/verbatim. Other contextual icons like Building2, Users, MapPin are also valid."},"kind":{"type":"string","enum":["verbatim"]}},"required":["label","displayName","description","wizardQuestion","wizardDescription","suggestedIcon","kind"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"Unique snake_case identifier (e.g., \"effective_date\", \"contract_value\"). Lowercase with underscores."},"displayName":{"type":"string","minLength":1,"description":"Human-readable column header in Title Case (e.g., \"Effective Date\")."},"description":{"type":"string","minLength":1,"description":"Clear instructions for what information to extract. Be specific about what to look for."},"wizardQuestion":{"type":"string","description":"An engaging, conversational question to ask the user (e.g., \"Who owns the property?\", \"When does the lease kick off?\"). Should be friendly and approachable."},"wizardDescription":{"type":"string","description":"A brief, helpful explanation of what this datapoint captures and why it matters (e.g., \"We'll find the landlord's name and details from your documents.\")."},"suggestedIcon":{"type":"string","description":"Lucide icon name matching the datapoint type. Use: Calendar for dates, Banknote for currency, Hash for numeric, Percent for percentage, CheckCircle for boolean, Tag for tag/multipleTags, List for list, FileText for text/verbatim. Other contextual icons like Building2, Users, MapPin are also valid."},"kind":{"type":"string","enum":["percentage"]}},"required":["label","displayName","description","wizardQuestion","wizardDescription","suggestedIcon","kind"],"additionalProperties":false}]}}},"required":["title","description","datapoints"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/workflows/clarify-prompt":{"post":{"summary":"Clarify a vague prompt","tags":["Document Platform"],"description":"Generate suggestions for a short/vague prompt to help users be more specific about what they want to extract","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":1500,"description":"The short/vague prompt to clarify (max 1500 characters)"}},"required":["prompt"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"suggestions":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","description":"Short, clickable label (3-6 words)"},"prompt":{"type":"string","maxLength":400,"description":"A concise but detailed prompt to use (max 400 characters). Focus on the key data points to extract."},"description":{"type":"string","description":"Brief explanation of what this extraction focuses on"}},"required":["label","prompt","description"],"additionalProperties":false}}},"required":["suggestions"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/findable-workflow-templates/":{"get":{"summary":"Get all Findable workflow templates","tags":["Document Platform"],"description":"Retrieve all Findable workflow templates","security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/findable-workflow-templates/{workflowId}":{"get":{"summary":"Get Findable workflow template","tags":["Document Platform"],"description":"Retrieve a specific Findable workflow template by ID","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"workflowId","required":true}],"security":[{"apiKey":[]}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Not Found","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/customers/{customerId}/groups/":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string","maxLength":500},"linkedTo":{"type":"string","pattern":"^(customer|portfolio|building|project|collection)#.+$"},"templateId":{"type":"string"},"entityDefaults":{"type":"object","properties":{"organization":{"nullable":true,"type":"object","properties":{"relation":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]}},"required":["relation"],"additionalProperties":false},"portfolio":{"nullable":true,"type":"object","properties":{"relation":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]},"syncAll":{"type":"boolean"},"additionalRelations":{"nullable":true,"type":"array","items":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]}}},"required":["relation","syncAll"],"additionalProperties":false},"building":{"nullable":true,"type":"object","properties":{"relation":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]},"syncAll":{"type":"boolean"},"additionalRelations":{"nullable":true,"type":"array","items":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]}}},"required":["relation","syncAll"],"additionalProperties":false},"project":{"nullable":true,"type":"object","properties":{"relation":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]},"syncAll":{"type":"boolean"},"additionalRelations":{"nullable":true,"type":"array","items":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]}}},"required":["relation","syncAll"],"additionalProperties":false}},"additionalProperties":false},"features":{"type":"array","items":{"type":"string","enum":["can_chat","can_search","can_use_mcp","can_manage_integrations","can_access_document_inbox","can_manage_task_tags","can_view_extract","can_run_extract","can_view_tasks","can_edit_tasks","can_manage_task_files","can_manage_task_comments","can_create_insight_cards","can_upload_checklist_docs","can_read_checklist_docs"]}},"entities":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string","enum":["organization","portfolio","building","project","collection"]},"entityId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"relation":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]}},"required":["entityType","entityId"],"additionalProperties":false}},"memberIds":{"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["name","linkedTo"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}},"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/groups/recommend":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","minLength":5,"maxLength":1000}},"required":["description"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/groups/{groupId}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response"}}},"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","maxLength":500},"linkedTo":{"type":"string","pattern":"^(customer|portfolio|building|project|collection)#.+$"},"features":{"type":"array","items":{"type":"string","enum":["can_chat","can_search","can_use_mcp","can_manage_integrations","can_access_document_inbox","can_manage_task_tags","can_view_extract","can_run_extract","can_view_tasks","can_edit_tasks","can_manage_task_files","can_manage_task_comments","can_create_insight_cards","can_upload_checklist_docs","can_read_checklist_docs"]}},"entities":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string","enum":["organization","portfolio","building","project","collection"]},"entityId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"relation":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]}},"required":["entityType","entityId","relation"],"additionalProperties":false}},"entityDefaults":{"type":"object","properties":{"organization":{"nullable":true,"type":"object","properties":{"relation":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]}},"required":["relation"],"additionalProperties":false},"portfolio":{"nullable":true,"type":"object","properties":{"relation":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]},"syncAll":{"type":"boolean"},"additionalRelations":{"nullable":true,"type":"array","items":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]}}},"required":["relation","syncAll"],"additionalProperties":false},"building":{"nullable":true,"type":"object","properties":{"relation":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]},"syncAll":{"type":"boolean"},"additionalRelations":{"nullable":true,"type":"array","items":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]}}},"required":["relation","syncAll"],"additionalProperties":false},"project":{"nullable":true,"type":"object","properties":{"relation":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]},"syncAll":{"type":"boolean"},"additionalRelations":{"nullable":true,"type":"array","items":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]}}},"required":["relation","syncAll"],"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/groups/{groupId}/name":{"patch":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255}},"required":["name"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/groups/{groupId}/permissions":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entityType":{"type":"string","enum":["organization","portfolio","building","project","collection"]},"entityId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"relation":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]}},"required":["entityType","entityId","relation"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entityType":{"type":"string","enum":["organization","portfolio","building","project","collection"]},"entityId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"relation":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]}},"required":["entityType","entityId","relation"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/groups/{groupId}/members":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["userIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response"}}},"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["userIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/groups/buildings/{buildingId}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/groups/buildings/{buildingId}/{groupId}/members":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response"}}},"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["userIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["userIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/groups/buildings/{buildingId}/{groupId}":{"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","maxLength":500},"linkedTo":{"type":"string","pattern":"^(customer|portfolio|building|project|collection)#.+$"},"features":{"type":"array","items":{"type":"string","enum":["can_chat","can_search","can_use_mcp","can_manage_integrations","can_access_document_inbox","can_manage_task_tags","can_view_extract","can_run_extract","can_view_tasks","can_edit_tasks","can_manage_task_files","can_manage_task_comments","can_create_insight_cards","can_upload_checklist_docs","can_read_checklist_docs"]}},"entities":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string","enum":["organization","portfolio","building","project","collection"]},"entityId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"relation":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]}},"required":["entityType","entityId","relation"],"additionalProperties":false}},"entityDefaults":{"type":"object","properties":{"organization":{"nullable":true,"type":"object","properties":{"relation":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]}},"required":["relation"],"additionalProperties":false},"portfolio":{"nullable":true,"type":"object","properties":{"relation":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]},"syncAll":{"type":"boolean"},"additionalRelations":{"nullable":true,"type":"array","items":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]}}},"required":["relation","syncAll"],"additionalProperties":false},"building":{"nullable":true,"type":"object","properties":{"relation":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]},"syncAll":{"type":"boolean"},"additionalRelations":{"nullable":true,"type":"array","items":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]}}},"required":["relation","syncAll"],"additionalProperties":false},"project":{"nullable":true,"type":"object","properties":{"relation":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]},"syncAll":{"type":"boolean"},"additionalRelations":{"nullable":true,"type":"array","items":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]}}},"required":["relation","syncAll"],"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/groups/buildings/{buildingId}/{groupId}/name":{"patch":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255}},"required":["name"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/groups/projects/{projectId}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/groups/projects/{projectId}/{groupId}/members":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response"}}},"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["userIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["userIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/groups/projects/{projectId}/{groupId}":{"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","maxLength":500},"linkedTo":{"type":"string","pattern":"^(customer|portfolio|building|project|collection)#.+$"},"features":{"type":"array","items":{"type":"string","enum":["can_chat","can_search","can_use_mcp","can_manage_integrations","can_access_document_inbox","can_manage_task_tags","can_view_extract","can_run_extract","can_view_tasks","can_edit_tasks","can_manage_task_files","can_manage_task_comments","can_create_insight_cards","can_upload_checklist_docs","can_read_checklist_docs"]}},"entities":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string","enum":["organization","portfolio","building","project","collection"]},"entityId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"relation":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]}},"required":["entityType","entityId","relation"],"additionalProperties":false}},"entityDefaults":{"type":"object","properties":{"organization":{"nullable":true,"type":"object","properties":{"relation":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]}},"required":["relation"],"additionalProperties":false},"portfolio":{"nullable":true,"type":"object","properties":{"relation":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]},"syncAll":{"type":"boolean"},"additionalRelations":{"nullable":true,"type":"array","items":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]}}},"required":["relation","syncAll"],"additionalProperties":false},"building":{"nullable":true,"type":"object","properties":{"relation":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]},"syncAll":{"type":"boolean"},"additionalRelations":{"nullable":true,"type":"array","items":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]}}},"required":["relation","syncAll"],"additionalProperties":false},"project":{"nullable":true,"type":"object","properties":{"relation":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]},"syncAll":{"type":"boolean"},"additionalRelations":{"nullable":true,"type":"array","items":{"type":"string","enum":["administrate","edit","upload","read","operations","minimal_access"]}}},"required":["relation","syncAll"],"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/groups/projects/{projectId}/{groupId}/name":{"patch":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255}},"required":["name"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/group-templates/":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/onboarding/chat":{"post":{"summary":"Send onboarding chat message","tags":["Document Platform","Onboarding"],"description":"Send a message during the onboarding flow for name extraction or purpose classification.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","maxLength":1000},"step":{"type":"string","enum":["name","purpose"]},"conversationHistory":{"default":[],"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string"}},"required":["role","content"],"additionalProperties":false}},"locale":{"type":"string","enum":["en","no","fr","sv","fi","da"]}},"required":["message","step","conversationHistory"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/onboarding/extract-name":{"post":{"summary":"Extract name from message","tags":["Document Platform","Onboarding"],"description":"Silently scan a user message for a name. Returns null fields if no name is found.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","maxLength":1000},"locale":{"type":"string","enum":["en","no","fr","sv","fi","da"]}},"required":["message"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/onboarding/buildings/{buildingId}/chat-thread":{"post":{"summary":"Seed onboarding conversation into a chat thread","tags":["Document Platform","Onboarding"],"description":"Persist the full onboarding conversation as initial messages in a new chat thread so the user sees their onboarding history when arriving at Ask.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"threadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string","minLength":1,"maxLength":2000},"messages":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","system"]},"content":{"type":"string","minLength":1,"maxLength":10000}},"required":["role","content"],"additionalProperties":false}}},"required":["threadId","messages"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/reviews/buildings/{buildingId}/metadata":{"post":{"summary":"Queue selected PDFs for a configured metadata review","tags":["Reviews"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"fieldSetId":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"}},"required":["documentIds","fieldSetId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"country":{"type":"string"},"fieldSet":{"type":"object","properties":{"id":{"type":"string","minLength":1},"labelKey":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"fields":{"minItems":1,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"labelKey":{"type":"string","minLength":1},"kind":{"type":"string","enum":["text","date","boolean","single_select","multi_select"]},"options":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["key","labelKey","kind"],"additionalProperties":false}}},"required":["id","labelKey","version","fields"],"additionalProperties":false},"createdDocumentIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"alreadyQueuedDocumentIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"alreadyLabelledDocumentIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"skippedExistingReviewDocumentIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["country","fieldSet","createdDocumentIds","alreadyQueuedDocumentIds","alreadyLabelledDocumentIds","skippedExistingReviewDocumentIds"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":{}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":{}}}}}}}},"/customers/{customerId}/reviews/claim":{"post":{"summary":"Claim the next pending review for a country","tags":["Reviews"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"country":{"type":"string"},"ordering":{"default":"random","type":"string","enum":["confidence-asc","confidence-desc","random"]},"skippedDocumentIds":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"onlyPendingReReview":{"default":false,"type":"boolean"},"documentType":{"type":"string","minLength":1,"maxLength":200}},"required":["country","ordering","skippedDocumentIds","onlyPendingReReview"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/reviews/claim/{documentId}":{"post":{"summary":"Claim a specific pending review by document ID","tags":["Reviews"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/reviews/reviewed":{"get":{"summary":"List reviewed items for a customer and country","tags":["Reviews"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"country","required":true},{"schema":{"type":"integer","minimum":1,"maximum":10000},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string"},"in":"query","name":"nextToken","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/reviews/pending/count":{"get":{"summary":"Count pending reviews for a customer and country (restricted by reviewer config when userId is implicit)","tags":["Reviews"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"country","required":true},{"schema":{},"in":"query","name":"onlyPendingReReview","required":true},{"schema":{"type":"string","minLength":1,"maxLength":200},"in":"query","name":"documentType","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/reviews/":{"get":{"summary":"List all reviews for a customer","tags":["Reviews"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"country","required":false},{"schema":{"type":"integer","minimum":1,"maximum":10000},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string"},"in":"query","name":"nextToken","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/reviews/overview":{"get":{"summary":"Paginated review items for the overview","tags":["Reviews"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"country","required":false},{"schema":{"type":"string"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"string"},"in":"query","name":"reviewedBy","required":false},{"schema":{"type":"string"},"in":"query","name":"predictedDocumentType","required":false},{"schema":{"type":"string","enum":["all","reviewed","pending","pending-re-review"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/reviews/overview/stats":{"get":{"summary":"Aggregated review stats for a filter combination","tags":["Reviews"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"country","required":false},{"schema":{"type":"string"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"string"},"in":"query","name":"reviewedBy","required":false},{"schema":{"type":"string"},"in":"query","name":"predictedDocumentType","required":false},{"schema":{"type":"string","enum":["all","reviewed","pending","pending-re-review"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/reviews/overview/filter-options":{"get":{"summary":"Available filter options (buildings, reviewers) for the overview","tags":["Reviews"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/reviews/overview/export":{"get":{"summary":"Export review overview as Excel","tags":["Reviews"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"country","required":false},{"schema":{"type":"string"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"string"},"in":"query","name":"reviewedBy","required":false},{"schema":{"type":"string"},"in":"query","name":"predictedDocumentType","required":false},{"schema":{"type":"string","enum":["all","reviewed","pending","pending-re-review"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/reviews/{documentId}/skip":{"post":{"summary":"Skip the current review and claim the next pending one","tags":["Reviews"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"country":{"type":"string"},"ordering":{"default":"random","type":"string","enum":["confidence-asc","confidence-desc","random"]},"skippedDocumentIds":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"onlyPendingReReview":{"default":false,"type":"boolean"},"documentType":{"type":"string","minLength":1,"maxLength":200}},"required":["country","ordering","skippedDocumentIds","onlyPendingReReview"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/reviews/{documentId}":{"get":{"summary":"Get a single review by document ID","tags":["Reviews"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}},"put":{"summary":"Submit feedback for a review","tags":["Reviews"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"predictedFolderFeedbackReasoning":{"type":"string"},"predictedDocumentTypeFeedbackReasoning":{"type":"string"},"predictedDuplicateFeedbackReasoning":{"type":"string"},"predictedFolderFeedback":{"type":"string","enum":["true","false","na"]},"predictedDocumentTypeFeedback":{"type":"string","enum":["true","false","na"]},"predictedDuplicateFeedback":{"type":"string","enum":["true","false","na"]},"correctedFolder":{"type":"object","properties":{"taxonomyVersion":{"type":"string"},"entryId":{"type":"string"},"bindings":{"type":"object","additionalProperties":{"type":"string"}},"renderedPath":{"type":"string"}},"required":["taxonomyVersion","entryId"],"additionalProperties":false},"proposedNewPath":{"type":"object","properties":{"taxonomyVersion":{"type":"string"},"path":{"type":"string","minLength":1}},"required":["taxonomyVersion","path"],"additionalProperties":false}},"required":["predictedFolderFeedback","predictedDocumentTypeFeedback"],"additionalProperties":false},{"type":"object","properties":{"reviewKind":{"type":"string","enum":["metadata"]},"groundTruth":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["value"]},"value":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"required":["status","value"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["not_present"]}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["unreadable"]}},"required":["status"],"additionalProperties":false}]}}},"required":["reviewKind","groundTruth"],"additionalProperties":false}]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/reviews/{documentId}/revert":{"post":{"summary":"Revert a reviewed item back to pending","tags":["Reviews"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/reviews/{documentId}/pending-re-review":{"post":{"summary":"Mark a reviewed item as pending for re-review","tags":["Reviews"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/reviews/reviewer-configs":{"get":{"summary":"List all reviewer configs for the customer","tags":["Reviews"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/reviews/reviewer-configs/me":{"get":{"summary":"Get the current reviewer's configured allowed document types","tags":["Reviews"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/reviews/reviewer-configs/document-types":{"get":{"summary":"List distinct document types for the customer (for admin reviewer-config UI)","tags":["Reviews"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/reviews/reviewer-configs/{userId}":{"put":{"summary":"Set or update a reviewer's allowed document types","tags":["Reviews"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"allowedDocumentTypes":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"userId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}},"delete":{"summary":"Remove reviewer config (revert to unrestricted)","tags":["Reviews"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"userId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/taxonomy/":{"get":{"summary":"Serve the customer's current content taxonomy for review","tags":["Reviews"],"parameters":[{"schema":{"type":"string","pattern":"^[a-z0-9_-]{1,64}$"},"in":"query","name":"segment","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"taxonomyVersion":{"type":"string"},"taxonomyChecksum":{"type":"string"},"cacheValidator":{"type":"string"},"scope":{"type":"string"},"pathComposition":{"type":"string","enum":["metadata-only","bindings-in-path"]},"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"path":{"type":"string"},"rootPath":{"type":"string"},"levels":{"type":"object","additionalProperties":{"type":"string"}},"documentTypes":{"type":"array","items":{"type":"string"}}},"required":["id","path","levels","documentTypes"],"additionalProperties":false}},"contextEntities":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string"},"instanceSources":{"type":"array","items":{"type":"string"}},"scopedTo":{"type":"string"},"pathPlaceholder":{"type":"boolean"},"instancesAvailable":{"type":"boolean"},"instances":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["dimension","instanceSources","pathPlaceholder","instancesAvailable","instances"],"additionalProperties":false}}},"required":["taxonomyVersion","taxonomyChecksum","cacheValidator","scope","pathComposition","entries","contextEntities"],"additionalProperties":false}}}}}}},"/customers/{customerId}/taxonomy/segments":{"get":{"summary":"List the customer's available taxonomy segments","tags":["Reviews"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"segments":{"type":"array","items":{"type":"string"}}},"required":["segments"],"additionalProperties":false}}}}}}},"/customers/{customerId}/access-expiries":{"get":{"summary":"List access-expiry policies for a customer","tags":["Document Platform","Access Expiry"],"description":"Returns one row per user that has an explicit policy. Users without rows are implicitly active with indefinite access.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/users/{userId}/access-expiry":{"get":{"summary":"Get the access-expiry policy for a user","tags":["Document Platform","Access Expiry"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}},"put":{"summary":"Set or clear the access-expiry for a user","tags":["Document Platform","Access Expiry"],"description":"Pass `expiresAt: null` to clear an existing expiry (back to indefinite). Past timestamps are accepted — the next session refresh will revoke immediately.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expiresAt":{"nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["expiresAt"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/users/{userId}/access/reinstate":{"post":{"summary":"Reinstate a previously revoked user","tags":["Document Platform","Access Expiry"],"description":"Clears `disabledAt`. Optionally also sets a new `expiresAt`. Reactivates the WorkOS membership so the user can log in again.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expiresAt":{"nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/subscriptions":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/invoices":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/usage":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/customers/{customerId}/document-insights":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/feature-requests/":{"get":{"summary":"List feature requests (global board)","tags":["Document Platform","Feature Requests"],"description":"Returns the global feature-request board, hydrated with the current user’s vote state. Sort: top (default) | new.","parameters":[{"schema":{"default":"top","type":"string","enum":["top","new"]},"in":"query","name":"sort","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}},"post":{"summary":"Submit a feature request","tags":["Document Platform","Feature Requests"],"description":"Create a new feature request on the global board. The author auto-votes for their own idea so it lands at voteCount=1. `customerId` in the body is stored as analytics metadata only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string","minLength":5,"maxLength":120},"description":{"type":"string","minLength":11,"maxLength":5000},"category":{"type":"string","enum":["compliance","ai","analytics","integrations","admin"]},"submitterRole":{"type":"string","enum":["facility_manager","property_manager","asset_manager","building_manager","technical_manager","project_manager","operations_director","compliance_officer","executive","other"]}},"required":["customerId","title","description","category","submitterRole"],"additionalProperties":false}}}},"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/feature-requests/{id}":{"get":{"summary":"Get a single feature request","tags":["Document Platform","Feature Requests"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}},"delete":{"summary":"Delete a feature request","tags":["Document Platform","Feature Requests"],"description":"Author-only: removes a request the calling user submitted (and its votes). Returns 403 for a non-author and 404 for an unknown id.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/feature-requests/{id}/vote":{"post":{"summary":"Toggle a vote on a feature request","tags":["Document Platform","Feature Requests"],"description":"Idempotent toggle: if the user has voted, removes the vote; otherwise adds one. Returns the new userVoted flag and voteCount.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/feature-requests/{id}/comments":{"post":{"summary":"Add a comment to a feature request","tags":["Document Platform","Feature Requests"],"description":"Appends a discussion comment to the request. Any authenticated user can post; the board is global. Returns the hydrated comment (no submitter id leaks across tenants).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":1000}},"required":["body"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/invite-requests/":{"post":{"summary":"Submit a request to invite someone to the workspace","tags":["Document Platform","Invite Requests"],"description":"Persists a pending request and sends an email to the single org admin chosen by the requester (validated server-side against the live admin set). The admin acts on the email (or the Access Control → Requests tab) by opening the prefilled invite dialog and sending normally, which resolves the request.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"targetAdminId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"resourceType":{"type":"string","enum":["building","collection","organization"]},"resourceIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"relation":{"type":"string","enum":["read","edit","upload"]},"emails":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"message":{"type":"string","minLength":10,"maxLength":500}},"required":["customerId","targetAdminId","resourceType","resourceIds","relation","emails","message"],"additionalProperties":false}}}},"security":[{"apiKey":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"notifiedAdminCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["notifiedAdminCount"],"additionalProperties":false}}}}}}},"/invite-requests/eligible-admins":{"post":{"summary":"List the administrators the caller can address for a request target","tags":["Document Platform","Invite Requests"],"description":"Powers the \"Administrator\" dropdown in the request dialog. Returns the shortlist of administrators for the target the dialog has selected, resolved by walking outward from that target — collection → building → portfolio → organization — and answering from the narrowest scope that has anyone eligible, intersected across every target so an approver must cover all of them. The caller and administrators with no email on file are excluded. `tier` names the scope the list came from so the picker can explain itself. Auth is `minimal_access` on the workspace in the body + a user session, AND `read` on EVERY target — no resource type is exempt, `organization` included. That per-target check matters because the response is target-specific: without it a member could post an arbitrary in-workspace resource id and learn who manages something they cannot see, and an `organization` target has no narrower scope to fall to, so its shortlist is the workspace's whole admin roster. An earlier revision of this route did exempt `organization` on the grounds that its id is pinned to the caller's own workspace — true, but it only rules out probing other ids, not obtaining a roster you have no standing to see. That exemption was the disclosure this route exists to close; do not reintroduce it. Privacy note: this deliberately exposes the shortlisted administrators' firstName/lastName/email to a non-admin caller, because they need to pick a specific administrator to notify — but only for resources they can already see. Do not widen the scope or drop the per-target check without re-designing the dialog UX.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"resourceType":{"type":"string","enum":["building","collection","organization"]},"resourceIds":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["customerId","resourceType","resourceIds"],"additionalProperties":false}}}},"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"admins":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"firstName":{"nullable":true,"type":"string"},"lastName":{"nullable":true,"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["id","firstName","lastName","email"],"additionalProperties":false}},"tier":{"type":"string","enum":["collection","building","portfolio","organization"]}},"required":["admins","tier"],"additionalProperties":false}}}}}}},"/invite-requests/pending/{customerId}":{"get":{"summary":"List still-pending invite requests for a workspace","tags":["Document Platform","Invite Requests"],"description":"Powers the \"Requests\" tab in Access Control so an admin can find requests that are awaiting approval — even after dismissing the prefilled invite dialog. Workspace-scoped (any org admin sees every pending request, not only the one they were emailed), so a request never gets stuck behind one away admin. Requires `administrate` on the workspace.","parameters":[{"schema":{"type":"string","enum":["building"]},"in":"query","name":"resourceType","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"resourceId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"requests":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"requesterName":{"type":"string"},"requesterEmail":{"nullable":true,"type":"string"},"emails":{"type":"array","items":{"type":"string"}},"resourceType":{"type":"string","enum":["building","collection","organization"]},"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"relation":{"type":"string","enum":["read","edit","upload"]},"message":{"type":"string"},"createdAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["id","requesterName","requesterEmail","emails","resourceType","resources","relation","message","createdAt"],"additionalProperties":false}}},"required":["requests"],"additionalProperties":false}}}}}}},"/invite-requests/{id}/resolve":{"post":{"summary":"Mark an invite request as approved","tags":["Document Platform","Invite Requests"],"description":"Called when an admin sends the invite from the prefilled dialog (or the Requests tab). Deletes the request so it drops off the pending list (no stored `approved` state — keeps the partition holding only open requests). Returns 404 when the request is already resolved or not found; the invite dialog treats this as a best-effort cleanup miss after the invitation was sent. Requires `administrate` on the workspace named in the body, which is re-checked against the stored row.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["customerId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["pending","approved","declined"]}},"required":["status"],"additionalProperties":false}}}}}}},"/invite-requests/{id}/reject":{"post":{"summary":"Reject an invite request","tags":["Document Platform","Invite Requests"],"description":"Called when an admin declines a request instead of sending the invite. Deletes the request so it drops off the pending list (same lifecycle as resolve — no stored state) and emails the requester that their request was not approved (best-effort; no reason captured). Returns 404 when the request is already resolved or not found. Requires `administrate` on the workspace named in the body, which is re-checked against the stored row.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["customerId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["declined"]}},"required":["status"],"additionalProperties":false}}}}}}},"/projects/{projectId}":{"get":{"summary":"Get project by ID","tags":["Projects"],"description":"Retrieve a specific project by its unique identifier.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/projects/customers/{customerId}/projects":{"get":{"summary":"Get customer projects","tags":["Projects"],"description":"Retrieve all projects for a specific customer.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}},"post":{"summary":"Create customer project","tags":["Projects"],"description":"Create a new project for a specific customer.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/customers/{customerId}/projects/{projectId}":{"put":{"summary":"Update customer project","tags":["Projects"],"description":"Update an existing project for a specific customer.","parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"projectId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}},"delete":{"summary":"Delete customer project","tags":["Projects"],"description":"Delete a specific project for a customer.","parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true},{"schema":{"type":"string"},"in":"path","name":"projectId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/projects/{projectId}/shares":{"get":{"summary":"Get all shares for a project","tags":["Projects"],"description":"Retrieve all folder shares for a project, grouped by folder ID.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/projects/users/cognito/{cognitoId}":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"cognitoId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/users/workos/{authenticationId}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"authenticationId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/users/{userId}":{"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":255},"company":{"type":"string","maxLength":255},"phone":{"type":"string","maxLength":100,"nullable":true},"title":{"type":"string","maxLength":255,"nullable":true},"role":{"type":"string","enum":["ADMIN","OWNER","WRITE_ACCESS","READ_ACCESS","NO_ACCESS"]}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/users/customers/{customerId}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}},"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","email","role","company"],"additionalProperties":false,"properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["ADMIN","OWNER","WRITE_ACCESS","READ_ACCESS","NO_ACCESS"]},"company":{"type":"string"},"phone":{"type":"string"},"title":{"type":"string"},"subject":{"type":"string"},"projectIds":{"type":"array","items":{"type":"string"},"default":[]},"groups":{"type":"array","items":{"type":"string"}},"userType":{"type":"string"},"confirmationStatus":{"type":"string"},"authenticationId":{"type":"string"},"cognitoId":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"customerId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/{projectId}/users/":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/{projectId}/users/{userId}/roles":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}},"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["roleName"],"additionalProperties":false,"properties":{"userId":{"type":"string"},"projectId":{"type":"string"},"roleName":{"type":"string","enum":["ADMIN","OWNER","WRITE","READ","MINIMAL_CUSTOMER"]}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/{projectId}/users/roles/bulk-add":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["assignments"],"properties":{"assignments":{"type":"array","items":{"type":"object","required":["userId","roleName"],"properties":{"userId":{"type":"string"},"roleName":{"type":"string","enum":["ADMIN","OWNER","WRITE","READ","MINIMAL_CUSTOMER"]}}}}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/{projectId}/users/{userId}/roles/upsert":{"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","enum":["ADMIN","OWNER","WRITE","READ","MINIMAL_CUSTOMER"]},"associationId":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/{projectId}/users/{userId}/roles/{associationId}":{"delete":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"userId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"associationId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/{projectId}/users/{userId}/add-to-project":{"post":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/{projectId}/users/{userId}/remove-from-project":{"delete":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/{projectId}/users/{userId}/subcontractors":{"put":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/{projectId}/folders/":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}},"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","customerId"],"properties":{"name":{"type":"string"},"customerId":{"type":"string"},"parentFolderId":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/{projectId}/folders/{folderId}":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"folderId","required":true}],"responses":{"200":{"description":"Default Response"}}},"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":255},"parentFolderId":{"type":"string","minLength":1,"nullable":true},"isPrivate":{"type":"boolean","nullable":true}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"folderId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"folderId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/{projectId}/folders/bulk":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["filePaths","customerId"],"properties":{"filePaths":{"type":"array","items":{"type":"string"}},"parentFolderId":{"type":"string"},"customerId":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}},"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["id"],"additionalProperties":false,"properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":255},"parentFolderId":{"type":"string","minLength":1,"nullable":true},"isPrivate":{"type":"boolean","nullable":true}}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/{projectId}/folders/{folderId}/duplicate":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"targetFolderId":{"type":"string","nullable":true}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string"},"in":"path","name":"folderId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/{projectId}/folders/{folderId}/documents":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"folderId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/{projectId}/documents/":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"buildingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"filename":{"type":"string","minLength":1,"maxLength":2000},"packageId":{"type":"string","maxLength":200},"parentFolderId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["buildingId","filename"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/{projectId}/documents/{documentId}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}},"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"buildingCategory":{"nullable":true,"type":"string","maxLength":1000},"discipline":{"nullable":true,"type":"string","maxLength":1000},"drawingCode":{"nullable":true,"type":"string","maxLength":1000},"drawingDate":{"nullable":true,"type":"string","maxLength":1000},"filename":{"type":"string","minLength":1,"maxLength":2000},"filenameDescriptive":{"nullable":true,"type":"string","maxLength":1000},"floor":{"nullable":true,"type":"string","maxLength":1000},"informationTypes":{"nullable":true,"maxItems":100,"type":"array","items":{"type":"string","maxLength":500}},"progressStatus":{"nullable":true,"type":"string","enum":["NO_DOCUMENTS","IN_PROGRESS","READY_TO_REVIEW","IN_REVIEW","DONE","CORRUPT"]},"roomLocations":{"nullable":true,"maxItems":100,"type":"array","items":{"type":"string","maxLength":500}},"serialNumber":{"nullable":true,"type":"string","maxLength":1000},"tags":{"nullable":true,"maxItems":100,"type":"array","items":{"type":"string","maxLength":500}},"tfmCode":{"nullable":true,"type":"string","maxLength":1000}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/{projectId}/documents/{documentId}/duplicate":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"default":{},"type":"object","properties":{"targetFolderId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/{projectId}/documents/{documentId}/get-signed-url":{"get":{"parameters":[{"schema":{},"in":"query","name":"useGeneratedFile","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/{projectId}/folders/{folderId}/share/":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string"},"in":"path","name":"folderId","required":true}],"responses":{"200":{"description":"Default Response"}}},"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["userId","permission"],"properties":{"userId":{"type":"string"},"permission":{"type":"string","enum":["READ","WRITE","ADMINISTRATE"]}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string"},"in":"path","name":"folderId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/{projectId}/folders/{folderId}/share/{shareId}":{"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["permission"],"properties":{"permission":{"type":"string","enum":["READ","WRITE","ADMINISTRATE"]}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"folderId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"shareId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"folderId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"shareId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/{projectId}/subcontractors/{subcontractorId}":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"subcontractorId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/projects/customers/{customerId}/buildings":{"get":{"summary":"Get customer buildings","tags":["Projects"],"description":"Retrieve all buildings for a specific customer.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"customerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/projects/customers/{customerId}/projects/{projectId}/buildings":{"get":{"summary":"Get project buildings","tags":["Projects"],"description":"Retrieve all buildings for a specific project.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"projectId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/users/me":{"get":{"summary":"Get current user profile","tags":["Users"],"description":"Retrieves the profile information for the currently authenticated user","security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/users/me/profile-picture":{"post":{"summary":"Upload profile picture","tags":["Users"],"description":"Uploads a profile picture for the current user. Image will be compressed to max 200KB. Supports JPG, PNG, and WEBP formats.","security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}},"delete":{"summary":"Delete profile picture","tags":["Users"],"description":"Removes the profile picture for the current user","security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/users/{userId}":{"put":{"summary":"Update user metadata","tags":["Users"],"description":"Updates the metadata for a specific user. Users can only update their own metadata.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"title":{"type":"string"},"phone":{"type":"string"},"termsOfServiceAcceptedDate":{"type":"string"},"locale":{"type":"string"},"hasCompletedOnboarding":{"type":"boolean"},"settings":{"type":"object","properties":{"showFilenameSuggestion":{"type":"boolean"},"lastSelectedCustomerId":{"type":"string"},"memory":{"type":"string","maxLength":2000},"buildingBandColours":{"type":"object","propertyNames":{"maxLength":64},"additionalProperties":{"type":"string","maxLength":32},"maxProperties":200},"emailDocumentInboxReminder":{"type":"boolean"},"emailEngagement":{"type":"boolean"},"betaFeaturesPromptAnsweredAt":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$","maxLength":64}},"additionalProperties":false},"onboardingResponses":{"type":"object","properties":{"role":{"type":"string"},"purpose":{"type":"string"}}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"userId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/users/me/has-organizations":{"get":{"summary":"Check if user has organization memberships","tags":["Users"],"description":"Returns whether the currently authenticated user belongs to any organizations","security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/users/me/change-password":{"post":{"summary":"Change own password","tags":["Users"],"description":"Verifies the current password then sets a new one. Clears the requiresPasswordChange flag. Identity is derived from the authenticated session.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["currentPassword","newPassword"],"properties":{"currentPassword":{"type":"string","minLength":8},"newPassword":{"type":"string","minLength":12}},"additionalProperties":false}}}},"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/users/me/account":{"delete":{"summary":"Delete own account","tags":["Users"],"description":"Permanently deletes the current account, live access, and personal provider data. Shared records retain historical audit attribution. This action cannot be undone.","security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/users/byAuthenticationId/{authenticationId}":{"get":{"summary":"Get user by authentication ID","tags":["Users"],"description":"Retrieves user information using their WorkOS authentication ID","parameters":[{"schema":{"type":"string"},"in":"path","name":"authenticationId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/users/{userId}/reset-password":{"post":{"summary":"Reset user password","tags":["Users"],"description":"Initiates a password reset for the specified user. Callers may reset their own password, or an administrator may reset the password of a member of a customer they administrate (pass that `customerId`).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"userId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/users/{userId}/email-change":{"post":{"summary":"Request a verified change of the login email","tags":["Users"],"description":"Starts a login-email change for your own account: mails a single-use verification link to the new address and a notice to the current one. Nothing changes until the link is confirmed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newEmail":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["newEmail"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/users/email-change/confirm":{"post":{"summary":"Confirm a login-email change","tags":["Users"],"description":"Consumes the single-use token from the verification link and applies the new login email. The token is the credential, so no session is required.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":1}},"required":["token"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response"}}}},"/users/email-preferences/unsubscribe":{"post":{"summary":"Unsubscribe from onboarding and engagement emails","tags":["Users"],"description":"Turns off onboarding and engagement emails for the account the signed token was issued to. Transactional emails are unaffected. The token is the credential, so no session is required.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":1,"maxLength":512}},"required":["token"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response"}}}},"/users/me/devices":{"post":{"summary":"Register this device for push notifications","tags":["Users"],"description":"Registers or refreshes the caller’s Expo push token. Idempotent: the device id is derived from the token, so re-registering an unchanged token overwrites in place. The app calls this on every foreground, not only after sign-in, because push tokens rotate.","security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/users/me/devices/{deviceId}":{"delete":{"summary":"Deregister a device from push notifications","tags":["Users"],"description":"Removes one of the caller’s registered devices. Called on sign-out, so a shared phone stops receiving the previous account’s task notifications.","parameters":[{"schema":{"type":"string"},"in":"path","name":"deviceId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/users/me/notifications":{"get":{"summary":"List the caller’s notifications, newest first","tags":["Users"],"description":"Returns one page of delivered notifications with the caller’s unread count. The count rides along so the app can paint the bell and its unread indicator from one request on launch. Page with `cursor`, taken from the previous response’s `nextCursor`.","parameters":[{"schema":{"type":"string"},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/users/me/notifications/read":{"post":{"summary":"Mark notifications as read","tags":["Users"],"description":"Marks the given notification ids read, or the whole inbox when `ids` is omitted — which is the \"user opened the bell\" case. Returns the remaining unread count so the unread indicator can be repainted from the same response.","security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/magic-auth/send/{userId}":{"post":{"summary":"Send magic authentication code","tags":["Magic Auth"],"description":"Sends a one-time authentication code to the specified user via email","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"in":"path","name":"userId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/magic-auth/verify/{userId}":{"post":{"summary":"Verify magic authentication code","tags":["Magic Auth"],"description":"Verifies a one-time authentication code and creates a session for the user","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^\\d{6}$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["code","customerId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"],"additionalProperties":false},{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"string","enum":["user-not-found","user-suspended","customer-not-found","code-already-used","code-expired","code-invalid","too-many-attempts","organization-access-required","organization-not-configured","mfa-required","use-normal-sign-in","unknown-error"]}},"required":["success","error"],"additionalProperties":false}]}}}}}}},"/intercom/token":{"get":{"summary":"Get Intercom Messenger authentication","tags":["Intercom"],"description":"Returns the configured Intercom Messenger credential for an active authenticated user.","security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["jwt"]},"token":{"type":"string"},"expiresAt":{"type":"string"},"sessionDurationMs":{"type":"number"}},"required":["mode","token"]}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/intercom/tickets/upload-url":{"post":{"summary":"Get presigned upload URL for a support ticket attachment","tags":["Intercom"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","minLength":1}},"required":["filename","contentType"]}}}},"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"uploadUrl":{"type":"string"}},"required":["key","uploadUrl"]}}}}}}},"/intercom/tickets":{"post":{"summary":"Create a support ticket","tags":["Intercom"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"category":{"type":"string","minLength":1},"subject":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","minLength":1,"maxLength":5000},"attachmentKeys":{"type":"array","items":{"type":"string"},"maxItems":5}},"required":["category","subject","description"]}}}},"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ticketId":{"type":"string"},"ticketType":{"type":"string"}},"required":["ticketId","ticketType"]}}}}}}},"/intercom/conversations":{"post":{"summary":"Start a new support conversation","tags":["Intercom"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1},"posthogSessionReplayUrl":{"type":"string","maxLength":2048,"format":"uri"}},"required":["message"],"additionalProperties":false}}}},"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"conversationId":{"type":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"body":{"type":"string"},"authorType":{"type":"string"},"authorName":{"type":"string"},"createdAt":{"type":"string"}}}}}}}}}}}},"/intercom/conversations/{conversationId}/reply":{"post":{"summary":"Reply to a support conversation","tags":["Intercom"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1}},"required":["message"]}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"conversationId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"body":{"type":"string"},"authorType":{"type":"string"},"authorName":{"type":"string"},"createdAt":{"type":"string"}}}}}}}}}}}},"/intercom/conversations/{conversationId}/messages":{"get":{"summary":"Get messages for a support conversation","tags":["Intercom"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"conversationId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"body":{"type":"string"},"authorType":{"type":"string"},"authorName":{"type":"string"},"createdAt":{"type":"string"}}}}}}}}}}}},"/push/reap-receipts":{"get":{"summary":"Read push delivery receipts and retire dead device tokens","tags":["Push"],"description":"Fetches delivery receipts for recently accepted push notifications, disables devices the provider reports as unregistered, and marks the tickets checked. Used by cron jobs.","security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/push/due-today":{"get":{"summary":"Send same-day banners for work due or newly overdue today","tags":["Push"],"description":"Scans every building for tasks and routine occurrences due today, work that went overdue yesterday, and routines resuming today, and sends one push per recipient per building. Push only — the weekly digest remains the email. Used by cron jobs.","security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response"}}}},"/v1/building_owners/{buildingOwnerId}/buildings/{buildingId}/documents/{documentId}/":{"get":{"summary":"Get a specific document","tags":["External","Document Platform"],"description":"Retrieve a specific document from a building with its download URL","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"},{"schema":{"type":"string"},"in":"path","name":"documentId","required":true,"description":"ID of the document"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"title":{"type":"string"},"originalPath":{"type":"string"},"buildingCategory":{"type":"string"},"discipline":{"type":"string"},"informationType":{"type":"string"},"informationTypes":{"type":"array","items":{"type":"string"}},"isDrawing":{"type":"boolean"},"isSchemaDrawing":{"type":"boolean"},"serialNumber":{"type":"string"},"size":{"type":"integer"},"md5Checksum":{"type":"string"},"corrupt":{"type":"boolean"},"drawingDate":{"type":"string","format":"date"},"originalCreatedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"asBuilt":{"type":"boolean"}}},{"type":"object","properties":{"url":{"type":"string"},"previewUrl":{"type":"string","nullable":true,"description":"Signed URL for a generated full PDF preview, or null when unavailable"}}}]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}},"delete":{"summary":"Delete a document","tags":["External","Document Platform"],"description":"Archive/delete a specific document from a building","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"},{"schema":{"type":"string"},"in":"path","name":"documentId","required":true,"description":"ID of the document"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}},"patch":{"summary":"Update document metadata","tags":["External","Document Platform"],"description":"Update metadata for a specific document such as filename, creation date, or building category","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","description":"Name of the file"},"originalCreatedAt":{"type":"string","format":"date-time","description":"Original creation date of the file"},"serialNumber":{"type":"string","description":"Serial number of the file"},"buildingCategory":{"type":"string","description":"Category of the building"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"},{"schema":{"type":"string"},"in":"path","name":"documentId","required":true,"description":"ID of the document"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"title":{"type":"string"},"originalPath":{"type":"string"},"buildingCategory":{"type":"string"},"discipline":{"type":"string"},"informationType":{"type":"string"},"informationTypes":{"type":"array","items":{"type":"string"}},"isDrawing":{"type":"boolean"},"isSchemaDrawing":{"type":"boolean"},"serialNumber":{"type":"string"},"size":{"type":"integer"},"md5Checksum":{"type":"string"},"corrupt":{"type":"boolean"},"drawingDate":{"type":"string","format":"date"},"originalCreatedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"asBuilt":{"type":"boolean"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/v1/building_owners/{buildingOwnerId}/buildings/{buildingId}/documents/{documentId}/status":{"get":{"summary":"Get document processing status","tags":["External","Document Platform"],"description":"Retrieve the processing status and metadata for a specific document","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"},{"schema":{"type":"string"},"in":"path","name":"documentId","required":true,"description":"ID of the document"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"extracted_text":{"type":"boolean"},"extracted_file":{"type":"boolean"},"uncompressed_package":{"type":"boolean"},"valid_file":{"type":"boolean"},"invalid_file":{"type":"boolean"},"categorised":{"type":"boolean"},"skip_extract_file":{"type":"boolean"},"text_extraction_error":{"type":"boolean"},"document_id":{"type":"string"},"filename":{"type":"string"},"building_id":{"type":"string"},"building_category":{"type":"string","nullable":true},"corrupt":{"type":"boolean"},"size":{"type":"integer"}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/v1/building_owners/{buildingOwnerId}/buildings/{buildingId}/documents/":{"get":{"summary":"List documents in a building","tags":["External","Document Platform"],"description":"Get all documents in a specific building owned by a building owner","parameters":[{"schema":{"type":"string"},"in":"query","name":"next_token","required":false,"description":"Pagination token from previous response. Must use same sort_by/sort_order."},{"schema":{"default":10,"type":"integer","minimum":1,"maximum":1000},"in":"query","name":"limit","required":true},{"schema":{"default":"createdAt","type":"string","enum":["createdAt","updatedAt"]},"in":"query","name":"sort_by","required":true},{"schema":{"default":"desc","type":"string","enum":["asc","desc"]},"in":"query","name":"sort_order","required":true},{"schema":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"in":"query","name":"updated_since","required":false,"description":"Only return documents with updatedAt >= this value (ISO 8601). Requires sort_by=updatedAt."},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"include_url","required":false,"description":"Include signed download (`url`) and preview (`previewUrl`) URLs on each document. Limits `limit` to 200."},{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"title":{"type":"string"},"originalPath":{"type":"string"},"buildingCategory":{"type":"string"},"discipline":{"type":"string"},"informationType":{"type":"string"},"informationTypes":{"type":"array","items":{"type":"string"}},"isDrawing":{"type":"boolean"},"isSchemaDrawing":{"type":"boolean"},"serialNumber":{"type":"string"},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"md5Checksum":{"type":"string"},"corrupt":{"type":"boolean"},"drawingDate":{},"originalCreatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"asBuilt":{"type":"boolean"},"url":{"type":"string"},"previewUrl":{"nullable":true,"type":"string"}},"required":["id","filename","originalPath","size","createdAt","updatedAt"],"additionalProperties":false}},"nextToken":{"nullable":true,"type":"string"}},"required":["documents"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}},"put":{"summary":"Create a new document upload request","tags":["External","Document Platform"],"description":"Generate a document ID and signed upload URL for uploading a new document to a building","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["filename"],"properties":{"filename":{"type":"string","description":"Name of the file"},"originalCreatedAt":{"type":"string","format":"date-time","description":"Original creation date of the file"},"serialNumber":{"type":"string","description":"Serial number of the file"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","description":"ID of the created document"},"uploadUrl":{"type":"string","description":"URL to upload the document content"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/v1/building_owners/{buildingOwnerId}/buildings/{buildingId}/building_category/":{"get":{"summary":"Get building category counts","tags":["External","Document Platform"],"description":"Retrieve the count of documents grouped by building category for a specific building","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"categoryCount":{"type":"object","additionalProperties":{"type":"integer"}}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/v1/building_owners/{buildingOwnerId}/buildings/{buildingId}/building_category/{buildingCategory}":{"get":{"summary":"Get documents by category","tags":["External","Document Platform"],"description":"Retrieve all documents in a specific building category with pagination support","parameters":[{"schema":{"type":"string"},"in":"query","name":"next_token","required":false,"description":"Token for pagination"},{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"},{"schema":{"type":"string"},"in":"path","name":"buildingCategory","required":true,"description":"ID of the building category"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"title":{"type":"string"},"originalPath":{"type":"string"},"buildingCategory":{"type":"string"},"discipline":{"type":"string"},"informationType":{"type":"string"},"informationTypes":{"type":"array","items":{"type":"string"}},"isDrawing":{"type":"boolean"},"isSchemaDrawing":{"type":"boolean"},"serialNumber":{"type":"string"},"size":{"type":"integer"},"md5Checksum":{"type":"string"},"corrupt":{"type":"boolean"},"drawingDate":{"type":"string","format":"date"},"originalCreatedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"asBuilt":{"type":"boolean"}}}},"nextToken":{"type":"string","nullable":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/v1/building_owners/{buildingOwnerId}/buildings/{buildingId}/reports/{reportId}/documents/":{"get":{"summary":"List documents in deficiency report category","tags":["Deficiency Report Documents"],"description":"Get all documents associated with a specific deficiency report category","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"},{"schema":{"type":"string"},"in":"path","name":"reportId","required":true,"description":"ID of the deficiency report category"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"deficiencyReportCategoryId":{"type":"string"},"documentId":{"type":"string"},"buildingId":{"type":"string"},"customerId":{"type":"string"},"addedAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"addedBy":{"type":"string"},"updatedBy":{"type":"string"}}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/v1/building_owners/{buildingOwnerId}/buildings/{buildingId}/reports/{reportId}/documents/{documentId}":{"put":{"summary":"Add document to deficiency report category","tags":["Deficiency Report Documents"],"description":"Associate a document with a specific deficiency report category","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","description":"ID of the document to add (must match URL param)"}},"required":["documentId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"},{"schema":{"type":"string"},"in":"path","name":"reportId","required":true,"description":"ID of the deficiency report category"},{"schema":{"type":"string"},"in":"path","name":"documentId","required":true,"description":"ID of the document to add"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"deficiencyReportCategoryId":{"type":"string"},"documentId":{"type":"string"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}},"delete":{"summary":"Remove document from deficiency report category","tags":["Deficiency Report Documents"],"description":"Remove the association between a document and a deficiency report category","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"},{"schema":{"type":"string"},"in":"path","name":"reportId","required":true,"description":"ID of the deficiency report category"},{"schema":{"type":"string"},"in":"path","name":"documentId","required":true,"description":"ID of the document to remove"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"deficiencyReportCategoryId":{"type":"string"},"documentId":{"type":"string"}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/v1/building_owners/{buildingOwnerId}/buildings/{buildingId}/reports/":{"get":{"summary":"List deficiency reports for a building","tags":["Deficiency Reports"],"description":"Get all deficiency reports (red flag reports) for a specific building","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"nameId":{"type":"string"},"theme":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"laws":{"type":"string"},"discipline":{"type":"string"},"nameParentId":{"type":"string"},"comment":{"type":"string"},"status":{"type":"string"},"parentId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}},"post":{"summary":"Generate a new deficiency report","tags":["Deficiency Reports"],"description":"Generate or regenerate a deficiency report (red flag report) for a specific building. This is an asynchronous operation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"country":{"type":"string","enum":["NO","GB"],"description":"Country code for the deficiency report (Norway or Great Britain)"},"version":{"type":"string","enum":["v1","v2"],"description":"Version of the deficiency report to generate"}},"required":["country","version"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"buildingId":{"type":"string"},"isGeneratingReport":{"type":"boolean"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/v1/building_owners/{buildingOwnerId}/buildings/{buildingId}/ask/":{"post":{"summary":"Ask a question about building documents","tags":["External","Document Platform"],"description":"Ask a question about documents in a building using AI-powered Smart Search. Supports both streaming (SSE) and non-streaming responses.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"attached_document_ids":{"maxItems":50,"type":"array","items":{"type":"string"}},"use_agentic_rag":{"default":true,"type":"boolean"}},"required":["use_agentic_rag"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":5000},"in":"query","name":"query","required":true},{"schema":{"type":"string","enum":["en","no","nb","nn"]},"in":"query","name":"language","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"thread_id","required":false},{"schema":{},"in":"query","name":"stream","required":true},{"schema":{"default":"medium","type":"string","enum":["low","medium","high"]},"in":"query","name":"reasoning_effort","required":true},{"schema":{"type":"string","enum":["fast","balanced","deep"]},"in":"query","name":"mode","required":false},{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"answer":{"type":"string"},"thread_id":{"type":"string"},"citations":{"type":"object","additionalProperties":{"type":"object","properties":{"cited_text":{"type":"string"},"document_id":{"type":"string"},"page_number":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["cited_text","document_id"],"additionalProperties":false}},"cited_documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"}},"required":["id","filename"],"additionalProperties":false}},"follow_up_suggestions":{"type":"array","items":{"type":"string"}}},"required":["answer","thread_id","citations","cited_documents","follow_up_suggestions"],"additionalProperties":false}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/v1/building_owners/{buildingOwnerId}/buildings/{buildingId}/":{"get":{"summary":"Get a building","tags":["External","Document Platform"],"description":"Get details of a specific building owned by a building owner","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"numberOfFiles":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}},"delete":{"summary":"Delete a building","tags":["External","Document Platform"],"description":"Delete a specific building owned by a building owner","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"}],"security":[{"apiKey":[]}],"responses":{"204":{"description":"Building successfully deleted"},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}},"patch":{"summary":"Update a building","tags":["External","Document Platform"],"description":"Update details of a specific building owned by a building owner","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name of the building"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"numberOfFiles":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/v1/building_owners/{buildingOwnerId}/buildings/{buildingId}/status":{"get":{"summary":"Get building processing status","tags":["External","Document Platform"],"description":"Get document processing status for a specific building","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"extracted_text":{"type":"boolean"},"extracted_file":{"type":"boolean"},"uncompressed_package":{"type":"boolean"},"valid_file":{"type":"boolean"},"invalid_file":{"type":"boolean"},"categorised":{"type":"boolean"},"skip_extract_file":{"type":"boolean"},"text_extraction_error":{"type":"boolean"},"total_documents":{"type":"integer"},"processed_documents":{"type":"integer"},"categorized_documents":{"type":"integer"},"extracted_percentage":{"type":"integer"},"categorized_percentage":{"type":"integer"}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/v1/building_owners/{buildingOwnerId}/buildings/{buildingId}/search":{"get":{"summary":"Search documents in a building","tags":["External","Document Platform"],"description":"Search documents within a specific building with filtering, sorting, and aggregations","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"query","required":true,"description":"Search query"},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":1000},"in":"query","name":"max_results","required":true,"description":"Maximum results per page, 1-1000. Larger pages cost little more than small ones and are much faster than paging: prefer a single large request over many sequential ones. Use start_index to page beyond it."},{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"start_index","required":true,"description":"Starting index for pagination. Offset paging reaches at most 10000 results; past that an empty page is returned alongside the true numberOfHits."},{"schema":{"type":"string"},"in":"query","name":"discipline","required":false,"description":"Filter by discipline (e.g., \"Electrical\", \"HVAC\")"},{"schema":{"type":"string","enum":["document","drawing"]},"in":"query","name":"document_type","required":false,"description":"Filter by document type"},{"schema":{"type":"string"},"in":"query","name":"floor","required":false,"description":"Filter by floor level"},{"schema":{"default":"relevance","type":"string","enum":["relevance","createdAt","updatedAt","filename"]},"in":"query","name":"sort_by","required":true,"description":"Field to sort by. \"filename\" orders on the stored filename, so the order matches what you see. Sorting is case- and accent-sensitive: uppercase precedes lowercase, and Norwegian æ/ø/å sort after z."},{"schema":{"default":"desc","type":"string","enum":["asc","desc"]},"in":"query","name":"sort_order","required":true,"description":"Sort order (only applies when sort_by is not \"relevance\")"},{"schema":{"default":false,"type":"boolean"},"in":"query","name":"include_aggregations","required":true,"description":"Include aggregated facet counts in response"},{"schema":{"default":"auto","type":"string","enum":["auto","on","off"]},"in":"query","name":"fuzziness","required":true,"description":"Fuzzy-matching mode. \"on\" always fuzzy-matches (best for prose). \"off\" matches exactly (best for equipment, system and drawing codes). \"auto\" (default) keeps fuzzy matching for prose but turns it off when the query looks like an identifier - any token containing a digit, or an all-short query such as \"VVS\"."},{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"hits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"buildingId":{"type":"string"},"buildingCategory":{"type":"string"},"createdAt":{"type":"string"},"discipline":{"type":"string"},"isDrawing":{"type":"boolean"},"filename":{"type":"string"},"md5Checksum":{"type":"string"},"originalCreatedAt":{"type":"string"},"originalPath":{"type":"string"},"size":{"type":"integer"},"title":{"type":"string"},"informationType":{"type":"string"},"informationTypes":{"type":"array","items":{"type":"string"}},"asBuilt":{"type":"boolean"},"drawingRevision":{"type":"string"},"drawingType":{"type":"string"},"drawingDate":{"type":"string"},"relevanceScore":{"type":"number"},"externalIds":{"type":"object","additionalProperties":{"type":"string"},"nullable":true},"updatedAt":{"type":"string"}}}},"numberOfHits":{"type":"integer"},"aggregations":{"type":"object","properties":{"discipline":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer"}}}},"category":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer"}}}},"extension":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer"}}}},"drawing_floor":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer"}}}},"drawing_type":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer"}}}}}}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/v1/building_owners/{buildingOwnerId}/buildings/{buildingId}/report":{"get":{"summary":"Get building deficiency report","tags":["External","Document Platform"],"description":"Get deficiency report for a specific building owned by a building owner","parameters":[{"schema":{"type":"string"},"in":"query","name":"country","required":false,"description":"Country code for localization"},{"schema":{"type":"string"},"in":"query","name":"locale","required":false,"description":"Locale for localization"},{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"themes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"nameId":{"type":"string"},"theme":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"laws":{"type":"string"},"discipline":{"type":"string"},"nameParentId":{"type":"string"},"comment":{"type":"string"},"status":{"type":"string"},"parentId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"progressDetails":{"type":"array","items":{"type":"object","properties":{"theme":{"type":"string"},"progress":{"type":"integer"},"total":{"type":"integer"},"percentage":{"type":"integer"}}}}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/v1/building_owners/{buildingOwnerId}/buildings/":{"get":{"summary":"List buildings for a building owner","tags":["External","Document Platform"],"description":"Get all buildings owned by a specific building owner. A key scoped to individual buildings receives only those buildings.","parameters":[{"schema":{"type":"string"},"in":"query","name":"next_token","required":false,"description":"Token for pagination"},{"schema":{"type":"number","default":10,"minimum":1,"maximum":1000},"in":"query","name":"limit","required":false,"description":"Number of items to return"},{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"buildings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"numberOfFiles":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"nextToken":{"type":"string","nullable":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}},"put":{"summary":"Create a building for a building owner","tags":["External","Document Platform"],"description":"Create a new building owned by a specific building owner","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name of the building"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"ID of the created building","content":{"application/json":{"schema":{"type":"string","description":"ID of the created building"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/v1/building_owners/{buildingOwnerId}/sessions/":{"post":{"summary":"Create a session token","tags":["External","Document Platform"],"description":"Exchange an API key for a short-lived session token suitable for browser use.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expires_in":{"description":"Token lifetime in seconds (60–86400). Default 3600.","type":"integer","minimum":60,"maximum":86400}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["token","expires_at"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/v1/building_owners/{buildingOwnerId}/ask-sharepoint/resolve-building":{"get":{"summary":"Resolve a SharePoint drive item to a Findable building","tags":["External","Document Platform"],"description":"Resolve SharePoint site/drive context to a Findable building using SharePoint subscriptions. Built for the Ask SharePoint integration.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"siteId","required":true},{"schema":{"type":"string","minLength":1},"in":"query","name":"driveId","required":true},{"schema":{"type":"string","minLength":1},"in":"query","name":"parentItemId","required":false},{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["resolved","not_found","ambiguous"]},"customerId":{"type":"string"},"buildingId":{"type":"string"},"subscription":{"type":"object","properties":{"appSubscriptionId":{"type":"string"},"customerId":{"type":"string"},"buildingId":{"type":"string"},"siteId":{"type":"string"},"driveId":{"type":"string"},"subscribedFolders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}}}}}},"matches":{"type":"array","items":{"type":"object","properties":{"appSubscriptionId":{"type":"string"},"customerId":{"type":"string"},"buildingId":{"type":"string"},"siteId":{"type":"string"},"driveId":{"type":"string"},"subscribedFolders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}}}}}}}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/v1/building_owners/{buildingOwnerId}/ask-sharepoint/resolve-documents":{"post":{"summary":"Resolve SharePoint drive item IDs to Findable document IDs","tags":["External","Document Platform"],"description":"Maps Microsoft Graph drive item IDs (SharePoint list item driveItem id) to Findable document records in a building, for use with Ask `attached_document_ids`. Each id may be a file or a folder; folder ids expand to all synced documents under that folder subtree in Findable.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"building_id":{"type":"string","minLength":1},"sharepoint_item_ids":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1}}},"required":["building_id","sharepoint_item_ids"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"document_ids":{"type":"array","items":{"type":"string"}},"missing_sharepoint_item_ids":{"type":"array","items":{"type":"string"}}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/v1/building_owners/{buildingOwnerId}/ask-sharepoint/documents-details":{"post":{"summary":"Resolve Findable document IDs for Ask SharePoint citations","tags":["External","Document Platform"],"description":"Returns display fields and optional SharePoint sync metadata (Graph drive item id and stored SharePoint metadata). Each document is authorised with document-level read; documents must belong to the building owner in the URL (`customerId`). Omits documents the caller cannot read, that are missing, or that belong to another building owner.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"document_ids":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1}}},"required":["document_ids"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"title":{"type":"string"},"original_path":{"type":"string"},"sharepoint_item_id":{"type":"string"},"sharepoint_metadata":{"type":"object","additionalProperties":true}},"required":["id","filename","title","original_path"]}},"missing_document_ids":{"type":"array","items":{"type":"string"}}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/v1/building_owners/{buildingOwnerId}/integration-status/":{"get":{"summary":"Integration sync status for all buildings","tags":["External","Document Platform"],"description":"One entry per building the credential can read: its document count and, for each integration it is connected to (SharePoint, Interaxo, Plania, ...), the status of the most recent sync run and when a full sync last completed. A key scoped to individual buildings receives only those buildings.","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"buildings":{"type":"array","items":{"type":"object","properties":{"building_id":{"type":"string"},"building_name":{"type":"string"},"external_id":{"type":"string","nullable":true},"number_of_files":{"type":"integer"},"integrations":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["sharepoint","interaxo","plania","famac","dalux","dalux_box","google_drive"]},"sync_status":{"type":"string","enum":["pending","syncing","synced","error"],"nullable":true},"last_synced_at":{"type":"string","format":"date-time","nullable":true},"export_folder":{"type":"string","nullable":true}},"required":["source","sync_status","last_synced_at","export_folder"]}}},"required":["building_id","building_name","external_id","number_of_files","integrations"]}},"unavailable_sources":{"type":"array","items":{"type":"string","enum":["sharepoint","interaxo","plania","famac","dalux","dalux_box","google_drive"]}}},"required":["buildings","unavailable_sources"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/v1/building_owners/{buildingOwnerId}/ask/":{"post":{"summary":"Ask a question across building owner documents","tags":["External","Document Platform"],"description":"Ask a question across one or more buildings for a building owner using AI-powered Smart Search. Omit building_ids to ask across all readable buildings for the building owner. Supports both streaming (SSE) and non-streaming responses.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"attached_document_ids":{"maxItems":50,"type":"array","items":{"type":"string"}},"use_agentic_rag":{"default":true,"type":"boolean"},"building_ids":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["use_agentic_rag"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":5000},"in":"query","name":"query","required":true},{"schema":{"type":"string","enum":["en","no","nb","nn"]},"in":"query","name":"language","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"thread_id","required":false},{"schema":{},"in":"query","name":"stream","required":true},{"schema":{"default":"medium","type":"string","enum":["low","medium","high"]},"in":"query","name":"reasoning_effort","required":true},{"schema":{"type":"string","enum":["fast","balanced","deep"]},"in":"query","name":"mode","required":false},{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"answer":{"type":"string"},"thread_id":{"type":"string"},"citations":{"type":"object","additionalProperties":{"type":"object","properties":{"cited_text":{"type":"string"},"document_id":{"type":"string"},"page_number":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["cited_text","document_id"],"additionalProperties":false}},"cited_documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"}},"required":["id","filename"],"additionalProperties":false}},"follow_up_suggestions":{"type":"array","items":{"type":"string"}}},"required":["answer","thread_id","citations","cited_documents","follow_up_suggestions"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/v1/building_owners/{buildingOwnerId}/documents/deleted":{"get":{"summary":"List deleted documents","tags":["External","Document Platform"],"description":"Documents deleted from any of the building owner’s buildings at or after `deleted_since`, oldest first. A key scoped to individual buildings receives only deletions in those buildings, so a page may hold fewer than `limit` items while `nextToken` is still set.","parameters":[{"schema":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"in":"query","name":"deleted_since","required":true,"description":"Return documents deleted at or after this time (ISO 8601). Results are oldest first, so the last `deletedAt` you receive is the next value to pass."},{"schema":{"default":100,"type":"integer","minimum":1,"maximum":1000},"in":"query","name":"limit","required":true},{"schema":{"type":"string"},"in":"query","name":"next_token","required":false,"description":"Pagination token from previous response."},{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"buildingId":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["id","buildingId","deletedAt"],"additionalProperties":false}},"nextToken":{"nullable":true,"type":"string"}},"required":["documents"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/v1/building_owners/{buildingOwnerId}/":{"get":{"summary":"Get a building owner","tags":["External","Document Platform"],"description":"Get details of a specific building owner by ID","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}},"patch":{"summary":"Update a building owner","tags":["External","Document Platform"],"description":"Update details of a specific building owner","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Updated name of the building owner/customer"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}},"delete":{"summary":"Delete a building owner","tags":["External","Document Platform"],"description":"Delete a specific building owner by ID","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true},"customerId":{"type":"string"},"blockers":{"type":"array","items":{"type":"object","properties":{"dependency":{"type":"string"},"source":{"type":"string"},"count":{"type":"integer"},"ids":{"type":"array","items":{"type":"string"}},"additionalCount":{"type":"integer"}}}}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/v1/building_owners/{buildingOwnerId}/status":{"get":{"summary":"Get building owner processing status","tags":["External","Document Platform"],"description":"Get document processing status for all buildings of a building owner. Counts cover only the buildings the calling credential can read: a key scoped to individual buildings sees totals for those buildings, not for the whole portfolio.","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"extracted_text":{"type":"boolean"},"extracted_file":{"type":"boolean"},"uncompressed_package":{"type":"boolean"},"valid_file":{"type":"boolean"},"invalid_file":{"type":"boolean"},"categorised":{"type":"boolean"},"skip_extract_file":{"type":"boolean"},"text_extraction_error":{"type":"boolean"},"total_documents":{"type":"integer"},"processed_documents":{"type":"integer"},"categorized_documents":{"type":"integer"},"extracted_percentage":{"type":"integer"},"categorized_percentage":{"type":"integer"}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/v1/building_owners/{buildingOwnerId}/search":{"get":{"summary":"Search documents for a building owner","tags":["External","Document Platform"],"description":"Search all documents across all buildings for a building owner with filtering, sorting, and aggregations. A key scoped to individual buildings searches only those buildings, and is rejected with 400 if it holds more than 100 of them.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"query","required":true,"description":"Search query"},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":1000},"in":"query","name":"max_results","required":true,"description":"Maximum results per page, 1-1000. Larger pages cost little more than small ones and are much faster than paging: prefer a single large request over many sequential ones. Use start_index to page beyond it."},{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"start_index","required":true,"description":"Starting index for pagination. Offset paging reaches at most 10000 results; past that an empty page is returned alongside the true numberOfHits."},{"schema":{"type":"string"},"in":"query","name":"discipline","required":false,"description":"Filter by discipline (e.g., \"Electrical\", \"HVAC\")"},{"schema":{"type":"string","enum":["document","drawing"]},"in":"query","name":"document_type","required":false,"description":"Filter by document type"},{"schema":{"type":"string"},"in":"query","name":"floor","required":false,"description":"Filter by floor level"},{"schema":{"default":"relevance","type":"string","enum":["relevance","createdAt","updatedAt","filename"]},"in":"query","name":"sort_by","required":true,"description":"Field to sort by. \"filename\" orders on the stored filename, so the order matches what you see. Sorting is case- and accent-sensitive: uppercase precedes lowercase, and Norwegian æ/ø/å sort after z."},{"schema":{"default":"desc","type":"string","enum":["asc","desc"]},"in":"query","name":"sort_order","required":true,"description":"Sort order (only applies when sort_by is not \"relevance\")"},{"schema":{"default":false,"type":"boolean"},"in":"query","name":"include_aggregations","required":true,"description":"Include aggregated facet counts in response"},{"schema":{"default":"auto","type":"string","enum":["auto","on","off"]},"in":"query","name":"fuzziness","required":true,"description":"Fuzzy-matching mode. \"on\" always fuzzy-matches (best for prose). \"off\" matches exactly (best for equipment, system and drawing codes). \"auto\" (default) keeps fuzzy matching for prose but turns it off when the query looks like an identifier - any token containing a digit, or an all-short query such as \"VVS\"."},{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"hits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"buildingId":{"type":"string"},"buildingCategory":{"type":"string"},"createdAt":{"type":"string"},"discipline":{"type":"string"},"isDrawing":{"type":"boolean"},"filename":{"type":"string"},"md5Checksum":{"type":"string"},"originalCreatedAt":{"type":"string"},"originalPath":{"type":"string"},"size":{"type":"integer"},"title":{"type":"string"},"informationType":{"type":"string"},"informationTypes":{"type":"array","items":{"type":"string"}},"asBuilt":{"type":"boolean"},"drawingRevision":{"type":"string"},"drawingType":{"type":"string"},"drawingDate":{"type":"string"},"relevanceScore":{"type":"number"},"externalIds":{"type":"object","additionalProperties":{"type":"string"},"nullable":true},"updatedAt":{"type":"string"}}}},"numberOfHits":{"type":"integer"},"aggregations":{"type":"object","properties":{"discipline":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer"}}}},"category":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer"}}}},"extension":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer"}}}},"drawing_floor":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer"}}}},"drawing_type":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer"}}}}}}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/v1/building_owners/":{"get":{"summary":"List all building owners","tags":["External","Document Platform"],"description":"Get all building owners/customers that the authenticated partner has access to","parameters":[{"schema":{"type":"string"},"in":"query","name":"next_token","required":false,"description":"Token for pagination"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"buildingOwners":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"nextToken":{"type":"string","nullable":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}},"post":{"summary":"Create a new building owner","tags":["External","Document Platform"],"description":"Create a new building owner/customer associated with the authenticated partner organization","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name of the building owner/customer"}},"required":["name"]}}}},"security":[{"apiKey":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"ID of the created building owner"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/{buildingOwnerId}/buildings/{buildingId}/documents/{documentId}/":{"get":{"summary":"Get a specific document","tags":["External","Document Platform"],"description":"Retrieve a specific document from a building with its download URL","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"},{"schema":{"type":"string"},"in":"path","name":"documentId","required":true,"description":"ID of the document"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"title":{"type":"string"},"originalPath":{"type":"string"},"buildingCategory":{"type":"string"},"discipline":{"type":"string"},"informationType":{"type":"string"},"informationTypes":{"type":"array","items":{"type":"string"}},"isDrawing":{"type":"boolean"},"isSchemaDrawing":{"type":"boolean"},"serialNumber":{"type":"string"},"size":{"type":"integer"},"md5Checksum":{"type":"string"},"corrupt":{"type":"boolean"},"drawingDate":{"type":"string","format":"date"},"originalCreatedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"asBuilt":{"type":"boolean"}}},{"type":"object","properties":{"url":{"type":"string"},"previewUrl":{"type":"string","nullable":true,"description":"Signed URL for a generated full PDF preview, or null when unavailable"}}}]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}},"delete":{"summary":"Delete a document","tags":["External","Document Platform"],"description":"Archive/delete a specific document from a building","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"},{"schema":{"type":"string"},"in":"path","name":"documentId","required":true,"description":"ID of the document"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}},"patch":{"summary":"Update document metadata","tags":["External","Document Platform"],"description":"Update metadata for a specific document such as filename, creation date, or building category","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","description":"Name of the file"},"originalCreatedAt":{"type":"string","format":"date-time","description":"Original creation date of the file"},"serialNumber":{"type":"string","description":"Serial number of the file"},"buildingCategory":{"type":"string","description":"Category of the building"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"},{"schema":{"type":"string"},"in":"path","name":"documentId","required":true,"description":"ID of the document"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"title":{"type":"string"},"originalPath":{"type":"string"},"buildingCategory":{"type":"string"},"discipline":{"type":"string"},"informationType":{"type":"string"},"informationTypes":{"type":"array","items":{"type":"string"}},"isDrawing":{"type":"boolean"},"isSchemaDrawing":{"type":"boolean"},"serialNumber":{"type":"string"},"size":{"type":"integer"},"md5Checksum":{"type":"string"},"corrupt":{"type":"boolean"},"drawingDate":{"type":"string","format":"date"},"originalCreatedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"asBuilt":{"type":"boolean"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/{buildingOwnerId}/buildings/{buildingId}/documents/{documentId}/status":{"get":{"summary":"Get document processing status","tags":["External","Document Platform"],"description":"Retrieve the processing status and metadata for a specific document","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"},{"schema":{"type":"string"},"in":"path","name":"documentId","required":true,"description":"ID of the document"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"extracted_text":{"type":"boolean"},"extracted_file":{"type":"boolean"},"uncompressed_package":{"type":"boolean"},"valid_file":{"type":"boolean"},"invalid_file":{"type":"boolean"},"categorised":{"type":"boolean"},"skip_extract_file":{"type":"boolean"},"text_extraction_error":{"type":"boolean"},"document_id":{"type":"string"},"filename":{"type":"string"},"building_id":{"type":"string"},"building_category":{"type":"string","nullable":true},"corrupt":{"type":"boolean"},"size":{"type":"integer"}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/{buildingOwnerId}/buildings/{buildingId}/documents/":{"get":{"summary":"List documents in a building","tags":["External","Document Platform"],"description":"Get all documents in a specific building owned by a building owner","parameters":[{"schema":{"type":"string"},"in":"query","name":"next_token","required":false,"description":"Pagination token from previous response. Must use same sort_by/sort_order."},{"schema":{"default":10,"type":"integer","minimum":1,"maximum":1000},"in":"query","name":"limit","required":true},{"schema":{"default":"createdAt","type":"string","enum":["createdAt","updatedAt"]},"in":"query","name":"sort_by","required":true},{"schema":{"default":"desc","type":"string","enum":["asc","desc"]},"in":"query","name":"sort_order","required":true},{"schema":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"in":"query","name":"updated_since","required":false,"description":"Only return documents with updatedAt >= this value (ISO 8601). Requires sort_by=updatedAt."},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"include_url","required":false,"description":"Include signed download (`url`) and preview (`previewUrl`) URLs on each document. Limits `limit` to 200."},{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"title":{"type":"string"},"originalPath":{"type":"string"},"buildingCategory":{"type":"string"},"discipline":{"type":"string"},"informationType":{"type":"string"},"informationTypes":{"type":"array","items":{"type":"string"}},"isDrawing":{"type":"boolean"},"isSchemaDrawing":{"type":"boolean"},"serialNumber":{"type":"string"},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"md5Checksum":{"type":"string"},"corrupt":{"type":"boolean"},"drawingDate":{},"originalCreatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"asBuilt":{"type":"boolean"},"url":{"type":"string"},"previewUrl":{"nullable":true,"type":"string"}},"required":["id","filename","originalPath","size","createdAt","updatedAt"],"additionalProperties":false}},"nextToken":{"nullable":true,"type":"string"}},"required":["documents"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}},"put":{"summary":"Create a new document upload request","tags":["External","Document Platform"],"description":"Generate a document ID and signed upload URL for uploading a new document to a building","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["filename"],"properties":{"filename":{"type":"string","description":"Name of the file"},"originalCreatedAt":{"type":"string","format":"date-time","description":"Original creation date of the file"},"serialNumber":{"type":"string","description":"Serial number of the file"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","description":"ID of the created document"},"uploadUrl":{"type":"string","description":"URL to upload the document content"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/{buildingOwnerId}/buildings/{buildingId}/building_category/":{"get":{"summary":"Get building category counts","tags":["External","Document Platform"],"description":"Retrieve the count of documents grouped by building category for a specific building","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"categoryCount":{"type":"object","additionalProperties":{"type":"integer"}}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/{buildingOwnerId}/buildings/{buildingId}/building_category/{buildingCategory}":{"get":{"summary":"Get documents by category","tags":["External","Document Platform"],"description":"Retrieve all documents in a specific building category with pagination support","parameters":[{"schema":{"type":"string"},"in":"query","name":"next_token","required":false,"description":"Token for pagination"},{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"},{"schema":{"type":"string"},"in":"path","name":"buildingCategory","required":true,"description":"ID of the building category"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"title":{"type":"string"},"originalPath":{"type":"string"},"buildingCategory":{"type":"string"},"discipline":{"type":"string"},"informationType":{"type":"string"},"informationTypes":{"type":"array","items":{"type":"string"}},"isDrawing":{"type":"boolean"},"isSchemaDrawing":{"type":"boolean"},"serialNumber":{"type":"string"},"size":{"type":"integer"},"md5Checksum":{"type":"string"},"corrupt":{"type":"boolean"},"drawingDate":{"type":"string","format":"date"},"originalCreatedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"asBuilt":{"type":"boolean"}}}},"nextToken":{"type":"string","nullable":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/{buildingOwnerId}/buildings/{buildingId}/reports/{reportId}/documents/":{"get":{"summary":"List documents in deficiency report category","tags":["Deficiency Report Documents"],"description":"Get all documents associated with a specific deficiency report category","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"},{"schema":{"type":"string"},"in":"path","name":"reportId","required":true,"description":"ID of the deficiency report category"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"deficiencyReportCategoryId":{"type":"string"},"documentId":{"type":"string"},"buildingId":{"type":"string"},"customerId":{"type":"string"},"addedAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"addedBy":{"type":"string"},"updatedBy":{"type":"string"}}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/{buildingOwnerId}/buildings/{buildingId}/reports/{reportId}/documents/{documentId}":{"put":{"summary":"Add document to deficiency report category","tags":["Deficiency Report Documents"],"description":"Associate a document with a specific deficiency report category","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","description":"ID of the document to add (must match URL param)"}},"required":["documentId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"},{"schema":{"type":"string"},"in":"path","name":"reportId","required":true,"description":"ID of the deficiency report category"},{"schema":{"type":"string"},"in":"path","name":"documentId","required":true,"description":"ID of the document to add"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"deficiencyReportCategoryId":{"type":"string"},"documentId":{"type":"string"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}},"delete":{"summary":"Remove document from deficiency report category","tags":["Deficiency Report Documents"],"description":"Remove the association between a document and a deficiency report category","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"},{"schema":{"type":"string"},"in":"path","name":"reportId","required":true,"description":"ID of the deficiency report category"},{"schema":{"type":"string"},"in":"path","name":"documentId","required":true,"description":"ID of the document to remove"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"deficiencyReportCategoryId":{"type":"string"},"documentId":{"type":"string"}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/{buildingOwnerId}/buildings/{buildingId}/reports/":{"get":{"summary":"List deficiency reports for a building","tags":["Deficiency Reports"],"description":"Get all deficiency reports (red flag reports) for a specific building","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"nameId":{"type":"string"},"theme":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"laws":{"type":"string"},"discipline":{"type":"string"},"nameParentId":{"type":"string"},"comment":{"type":"string"},"status":{"type":"string"},"parentId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}},"post":{"summary":"Generate a new deficiency report","tags":["Deficiency Reports"],"description":"Generate or regenerate a deficiency report (red flag report) for a specific building. This is an asynchronous operation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"country":{"type":"string","enum":["NO","GB"],"description":"Country code for the deficiency report (Norway or Great Britain)"},"version":{"type":"string","enum":["v1","v2"],"description":"Version of the deficiency report to generate"}},"required":["country","version"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"buildingId":{"type":"string"},"isGeneratingReport":{"type":"boolean"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/{buildingOwnerId}/buildings/{buildingId}/ask/":{"post":{"summary":"Ask a question about building documents","tags":["External","Document Platform"],"description":"Ask a question about documents in a building using AI-powered Smart Search. Supports both streaming (SSE) and non-streaming responses.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"attached_document_ids":{"maxItems":50,"type":"array","items":{"type":"string"}},"use_agentic_rag":{"default":true,"type":"boolean"}},"required":["use_agentic_rag"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":5000},"in":"query","name":"query","required":true},{"schema":{"type":"string","enum":["en","no","nb","nn"]},"in":"query","name":"language","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"thread_id","required":false},{"schema":{},"in":"query","name":"stream","required":true},{"schema":{"default":"medium","type":"string","enum":["low","medium","high"]},"in":"query","name":"reasoning_effort","required":true},{"schema":{"type":"string","enum":["fast","balanced","deep"]},"in":"query","name":"mode","required":false},{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"answer":{"type":"string"},"thread_id":{"type":"string"},"citations":{"type":"object","additionalProperties":{"type":"object","properties":{"cited_text":{"type":"string"},"document_id":{"type":"string"},"page_number":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["cited_text","document_id"],"additionalProperties":false}},"cited_documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"}},"required":["id","filename"],"additionalProperties":false}},"follow_up_suggestions":{"type":"array","items":{"type":"string"}}},"required":["answer","thread_id","citations","cited_documents","follow_up_suggestions"],"additionalProperties":false}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/{buildingOwnerId}/buildings/{buildingId}/":{"get":{"summary":"Get a building","tags":["External","Document Platform"],"description":"Get details of a specific building owned by a building owner","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"numberOfFiles":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}},"delete":{"summary":"Delete a building","tags":["External","Document Platform"],"description":"Delete a specific building owned by a building owner","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"}],"security":[{"apiKey":[]}],"responses":{"204":{"description":"Building successfully deleted"},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}},"patch":{"summary":"Update a building","tags":["External","Document Platform"],"description":"Update details of a specific building owned by a building owner","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name of the building"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"numberOfFiles":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/{buildingOwnerId}/buildings/{buildingId}/status":{"get":{"summary":"Get building processing status","tags":["External","Document Platform"],"description":"Get document processing status for a specific building","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"extracted_text":{"type":"boolean"},"extracted_file":{"type":"boolean"},"uncompressed_package":{"type":"boolean"},"valid_file":{"type":"boolean"},"invalid_file":{"type":"boolean"},"categorised":{"type":"boolean"},"skip_extract_file":{"type":"boolean"},"text_extraction_error":{"type":"boolean"},"total_documents":{"type":"integer"},"processed_documents":{"type":"integer"},"categorized_documents":{"type":"integer"},"extracted_percentage":{"type":"integer"},"categorized_percentage":{"type":"integer"}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/{buildingOwnerId}/buildings/{buildingId}/search":{"get":{"summary":"Search documents in a building","tags":["External","Document Platform"],"description":"Search documents within a specific building with filtering, sorting, and aggregations","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"query","required":true,"description":"Search query"},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":1000},"in":"query","name":"max_results","required":true,"description":"Maximum results per page, 1-1000. Larger pages cost little more than small ones and are much faster than paging: prefer a single large request over many sequential ones. Use start_index to page beyond it."},{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"start_index","required":true,"description":"Starting index for pagination. Offset paging reaches at most 10000 results; past that an empty page is returned alongside the true numberOfHits."},{"schema":{"type":"string"},"in":"query","name":"discipline","required":false,"description":"Filter by discipline (e.g., \"Electrical\", \"HVAC\")"},{"schema":{"type":"string","enum":["document","drawing"]},"in":"query","name":"document_type","required":false,"description":"Filter by document type"},{"schema":{"type":"string"},"in":"query","name":"floor","required":false,"description":"Filter by floor level"},{"schema":{"default":"relevance","type":"string","enum":["relevance","createdAt","updatedAt","filename"]},"in":"query","name":"sort_by","required":true,"description":"Field to sort by. \"filename\" orders on the stored filename, so the order matches what you see. Sorting is case- and accent-sensitive: uppercase precedes lowercase, and Norwegian æ/ø/å sort after z."},{"schema":{"default":"desc","type":"string","enum":["asc","desc"]},"in":"query","name":"sort_order","required":true,"description":"Sort order (only applies when sort_by is not \"relevance\")"},{"schema":{"default":false,"type":"boolean"},"in":"query","name":"include_aggregations","required":true,"description":"Include aggregated facet counts in response"},{"schema":{"default":"auto","type":"string","enum":["auto","on","off"]},"in":"query","name":"fuzziness","required":true,"description":"Fuzzy-matching mode. \"on\" always fuzzy-matches (best for prose). \"off\" matches exactly (best for equipment, system and drawing codes). \"auto\" (default) keeps fuzzy matching for prose but turns it off when the query looks like an identifier - any token containing a digit, or an all-short query such as \"VVS\"."},{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"hits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"buildingId":{"type":"string"},"buildingCategory":{"type":"string"},"createdAt":{"type":"string"},"discipline":{"type":"string"},"isDrawing":{"type":"boolean"},"filename":{"type":"string"},"md5Checksum":{"type":"string"},"originalCreatedAt":{"type":"string"},"originalPath":{"type":"string"},"size":{"type":"integer"},"title":{"type":"string"},"informationType":{"type":"string"},"informationTypes":{"type":"array","items":{"type":"string"}},"asBuilt":{"type":"boolean"},"drawingRevision":{"type":"string"},"drawingType":{"type":"string"},"drawingDate":{"type":"string"},"relevanceScore":{"type":"number"},"externalIds":{"type":"object","additionalProperties":{"type":"string"},"nullable":true},"updatedAt":{"type":"string"}}}},"numberOfHits":{"type":"integer"},"aggregations":{"type":"object","properties":{"discipline":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer"}}}},"category":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer"}}}},"extension":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer"}}}},"drawing_floor":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer"}}}},"drawing_type":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer"}}}}}}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/{buildingOwnerId}/buildings/{buildingId}/report":{"get":{"summary":"Get building deficiency report","tags":["External","Document Platform"],"description":"Get deficiency report for a specific building owned by a building owner","parameters":[{"schema":{"type":"string"},"in":"query","name":"country","required":false,"description":"Country code for localization"},{"schema":{"type":"string"},"in":"query","name":"locale","required":false,"description":"Locale for localization"},{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"},{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true,"description":"ID of the building"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"themes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"nameId":{"type":"string"},"theme":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"laws":{"type":"string"},"discipline":{"type":"string"},"nameParentId":{"type":"string"},"comment":{"type":"string"},"status":{"type":"string"},"parentId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"progressDetails":{"type":"array","items":{"type":"object","properties":{"theme":{"type":"string"},"progress":{"type":"integer"},"total":{"type":"integer"},"percentage":{"type":"integer"}}}}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/{buildingOwnerId}/buildings/":{"get":{"summary":"List buildings for a building owner","tags":["External","Document Platform"],"description":"Get all buildings owned by a specific building owner. A key scoped to individual buildings receives only those buildings.","parameters":[{"schema":{"type":"string"},"in":"query","name":"next_token","required":false,"description":"Token for pagination"},{"schema":{"type":"number","default":10,"minimum":1,"maximum":1000},"in":"query","name":"limit","required":false,"description":"Number of items to return"},{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"buildings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"numberOfFiles":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"nextToken":{"type":"string","nullable":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}},"put":{"summary":"Create a building for a building owner","tags":["External","Document Platform"],"description":"Create a new building owned by a specific building owner","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name of the building"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"ID of the created building","content":{"application/json":{"schema":{"type":"string","description":"ID of the created building"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/{buildingOwnerId}/sessions/":{"post":{"summary":"Create a session token","tags":["External","Document Platform"],"description":"Exchange an API key for a short-lived session token suitable for browser use.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expires_in":{"description":"Token lifetime in seconds (60–86400). Default 3600.","type":"integer","minimum":60,"maximum":86400}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["token","expires_at"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/{buildingOwnerId}/ask-sharepoint/resolve-building":{"get":{"summary":"Resolve a SharePoint drive item to a Findable building","tags":["External","Document Platform"],"description":"Resolve SharePoint site/drive context to a Findable building using SharePoint subscriptions. Built for the Ask SharePoint integration.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"siteId","required":true},{"schema":{"type":"string","minLength":1},"in":"query","name":"driveId","required":true},{"schema":{"type":"string","minLength":1},"in":"query","name":"parentItemId","required":false},{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["resolved","not_found","ambiguous"]},"customerId":{"type":"string"},"buildingId":{"type":"string"},"subscription":{"type":"object","properties":{"appSubscriptionId":{"type":"string"},"customerId":{"type":"string"},"buildingId":{"type":"string"},"siteId":{"type":"string"},"driveId":{"type":"string"},"subscribedFolders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}}}}}},"matches":{"type":"array","items":{"type":"object","properties":{"appSubscriptionId":{"type":"string"},"customerId":{"type":"string"},"buildingId":{"type":"string"},"siteId":{"type":"string"},"driveId":{"type":"string"},"subscribedFolders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}}}}}}}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/{buildingOwnerId}/ask-sharepoint/resolve-documents":{"post":{"summary":"Resolve SharePoint drive item IDs to Findable document IDs","tags":["External","Document Platform"],"description":"Maps Microsoft Graph drive item IDs (SharePoint list item driveItem id) to Findable document records in a building, for use with Ask `attached_document_ids`. Each id may be a file or a folder; folder ids expand to all synced documents under that folder subtree in Findable.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"building_id":{"type":"string","minLength":1},"sharepoint_item_ids":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1}}},"required":["building_id","sharepoint_item_ids"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"document_ids":{"type":"array","items":{"type":"string"}},"missing_sharepoint_item_ids":{"type":"array","items":{"type":"string"}}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/{buildingOwnerId}/ask-sharepoint/documents-details":{"post":{"summary":"Resolve Findable document IDs for Ask SharePoint citations","tags":["External","Document Platform"],"description":"Returns display fields and optional SharePoint sync metadata (Graph drive item id and stored SharePoint metadata). Each document is authorised with document-level read; documents must belong to the building owner in the URL (`customerId`). Omits documents the caller cannot read, that are missing, or that belong to another building owner.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"document_ids":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1}}},"required":["document_ids"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"title":{"type":"string"},"original_path":{"type":"string"},"sharepoint_item_id":{"type":"string"},"sharepoint_metadata":{"type":"object","additionalProperties":true}},"required":["id","filename","title","original_path"]}},"missing_document_ids":{"type":"array","items":{"type":"string"}}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/{buildingOwnerId}/integration-status/":{"get":{"summary":"Integration sync status for all buildings","tags":["External","Document Platform"],"description":"One entry per building the credential can read: its document count and, for each integration it is connected to (SharePoint, Interaxo, Plania, ...), the status of the most recent sync run and when a full sync last completed. A key scoped to individual buildings receives only those buildings.","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"buildings":{"type":"array","items":{"type":"object","properties":{"building_id":{"type":"string"},"building_name":{"type":"string"},"external_id":{"type":"string","nullable":true},"number_of_files":{"type":"integer"},"integrations":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["sharepoint","interaxo","plania","famac","dalux","dalux_box","google_drive"]},"sync_status":{"type":"string","enum":["pending","syncing","synced","error"],"nullable":true},"last_synced_at":{"type":"string","format":"date-time","nullable":true},"export_folder":{"type":"string","nullable":true}},"required":["source","sync_status","last_synced_at","export_folder"]}}},"required":["building_id","building_name","external_id","number_of_files","integrations"]}},"unavailable_sources":{"type":"array","items":{"type":"string","enum":["sharepoint","interaxo","plania","famac","dalux","dalux_box","google_drive"]}}},"required":["buildings","unavailable_sources"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/{buildingOwnerId}/ask/":{"post":{"summary":"Ask a question across building owner documents","tags":["External","Document Platform"],"description":"Ask a question across one or more buildings for a building owner using AI-powered Smart Search. Omit building_ids to ask across all readable buildings for the building owner. Supports both streaming (SSE) and non-streaming responses.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"attached_document_ids":{"maxItems":50,"type":"array","items":{"type":"string"}},"use_agentic_rag":{"default":true,"type":"boolean"},"building_ids":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["use_agentic_rag"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":5000},"in":"query","name":"query","required":true},{"schema":{"type":"string","enum":["en","no","nb","nn"]},"in":"query","name":"language","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"thread_id","required":false},{"schema":{},"in":"query","name":"stream","required":true},{"schema":{"default":"medium","type":"string","enum":["low","medium","high"]},"in":"query","name":"reasoning_effort","required":true},{"schema":{"type":"string","enum":["fast","balanced","deep"]},"in":"query","name":"mode","required":false},{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"answer":{"type":"string"},"thread_id":{"type":"string"},"citations":{"type":"object","additionalProperties":{"type":"object","properties":{"cited_text":{"type":"string"},"document_id":{"type":"string"},"page_number":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["cited_text","document_id"],"additionalProperties":false}},"cited_documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"}},"required":["id","filename"],"additionalProperties":false}},"follow_up_suggestions":{"type":"array","items":{"type":"string"}}},"required":["answer","thread_id","citations","cited_documents","follow_up_suggestions"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/{buildingOwnerId}/documents/deleted":{"get":{"summary":"List deleted documents","tags":["External","Document Platform"],"description":"Documents deleted from any of the building owner’s buildings at or after `deleted_since`, oldest first. A key scoped to individual buildings receives only deletions in those buildings, so a page may hold fewer than `limit` items while `nextToken` is still set.","parameters":[{"schema":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]},"in":"query","name":"deleted_since","required":true,"description":"Return documents deleted at or after this time (ISO 8601). Results are oldest first, so the last `deletedAt` you receive is the next value to pass."},{"schema":{"default":100,"type":"integer","minimum":1,"maximum":1000},"in":"query","name":"limit","required":true},{"schema":{"type":"string"},"in":"query","name":"next_token","required":false,"description":"Pagination token from previous response."},{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"buildingId":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}]}},"required":["id","buildingId","deletedAt"],"additionalProperties":false}},"nextToken":{"nullable":true,"type":"string"}},"required":["documents"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/{buildingOwnerId}/":{"get":{"summary":"Get a building owner","tags":["External","Document Platform"],"description":"Get details of a specific building owner by ID","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}},"patch":{"summary":"Update a building owner","tags":["External","Document Platform"],"description":"Update details of a specific building owner","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Updated name of the building owner/customer"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}},"delete":{"summary":"Delete a building owner","tags":["External","Document Platform"],"description":"Delete a specific building owner by ID","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true},"customerId":{"type":"string"},"blockers":{"type":"array","items":{"type":"object","properties":{"dependency":{"type":"string"},"source":{"type":"string"},"count":{"type":"integer"},"ids":{"type":"array","items":{"type":"string"}},"additionalCount":{"type":"integer"}}}}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/{buildingOwnerId}/status":{"get":{"summary":"Get building owner processing status","tags":["External","Document Platform"],"description":"Get document processing status for all buildings of a building owner. Counts cover only the buildings the calling credential can read: a key scoped to individual buildings sees totals for those buildings, not for the whole portfolio.","parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"extracted_text":{"type":"boolean"},"extracted_file":{"type":"boolean"},"uncompressed_package":{"type":"boolean"},"valid_file":{"type":"boolean"},"invalid_file":{"type":"boolean"},"categorised":{"type":"boolean"},"skip_extract_file":{"type":"boolean"},"text_extraction_error":{"type":"boolean"},"total_documents":{"type":"integer"},"processed_documents":{"type":"integer"},"categorized_documents":{"type":"integer"},"extracted_percentage":{"type":"integer"},"categorized_percentage":{"type":"integer"}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/{buildingOwnerId}/search":{"get":{"summary":"Search documents for a building owner","tags":["External","Document Platform"],"description":"Search all documents across all buildings for a building owner with filtering, sorting, and aggregations. A key scoped to individual buildings searches only those buildings, and is rejected with 400 if it holds more than 100 of them.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"query","required":true,"description":"Search query"},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":1000},"in":"query","name":"max_results","required":true,"description":"Maximum results per page, 1-1000. Larger pages cost little more than small ones and are much faster than paging: prefer a single large request over many sequential ones. Use start_index to page beyond it."},{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"start_index","required":true,"description":"Starting index for pagination. Offset paging reaches at most 10000 results; past that an empty page is returned alongside the true numberOfHits."},{"schema":{"type":"string"},"in":"query","name":"discipline","required":false,"description":"Filter by discipline (e.g., \"Electrical\", \"HVAC\")"},{"schema":{"type":"string","enum":["document","drawing"]},"in":"query","name":"document_type","required":false,"description":"Filter by document type"},{"schema":{"type":"string"},"in":"query","name":"floor","required":false,"description":"Filter by floor level"},{"schema":{"default":"relevance","type":"string","enum":["relevance","createdAt","updatedAt","filename"]},"in":"query","name":"sort_by","required":true,"description":"Field to sort by. \"filename\" orders on the stored filename, so the order matches what you see. Sorting is case- and accent-sensitive: uppercase precedes lowercase, and Norwegian æ/ø/å sort after z."},{"schema":{"default":"desc","type":"string","enum":["asc","desc"]},"in":"query","name":"sort_order","required":true,"description":"Sort order (only applies when sort_by is not \"relevance\")"},{"schema":{"default":false,"type":"boolean"},"in":"query","name":"include_aggregations","required":true,"description":"Include aggregated facet counts in response"},{"schema":{"default":"auto","type":"string","enum":["auto","on","off"]},"in":"query","name":"fuzziness","required":true,"description":"Fuzzy-matching mode. \"on\" always fuzzy-matches (best for prose). \"off\" matches exactly (best for equipment, system and drawing codes). \"auto\" (default) keeps fuzzy matching for prose but turns it off when the query looks like an identifier - any token containing a digit, or an all-short query such as \"VVS\"."},{"schema":{"type":"string"},"in":"path","name":"buildingOwnerId","required":true,"description":"ID of the building owner"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"hits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"buildingId":{"type":"string"},"buildingCategory":{"type":"string"},"createdAt":{"type":"string"},"discipline":{"type":"string"},"isDrawing":{"type":"boolean"},"filename":{"type":"string"},"md5Checksum":{"type":"string"},"originalCreatedAt":{"type":"string"},"originalPath":{"type":"string"},"size":{"type":"integer"},"title":{"type":"string"},"informationType":{"type":"string"},"informationTypes":{"type":"array","items":{"type":"string"}},"asBuilt":{"type":"boolean"},"drawingRevision":{"type":"string"},"drawingType":{"type":"string"},"drawingDate":{"type":"string"},"relevanceScore":{"type":"number"},"externalIds":{"type":"object","additionalProperties":{"type":"string"},"nullable":true},"updatedAt":{"type":"string"}}}},"numberOfHits":{"type":"integer"},"aggregations":{"type":"object","properties":{"discipline":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer"}}}},"category":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer"}}}},"extension":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer"}}}},"drawing_floor":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer"}}}},"drawing_type":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer"}}}}}}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"/building_owners/":{"get":{"summary":"List all building owners","tags":["External","Document Platform"],"description":"Get all building owners/customers that the authenticated partner has access to","parameters":[{"schema":{"type":"string"},"in":"query","name":"next_token","required":false,"description":"Token for pagination"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"buildingOwners":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"nextToken":{"type":"string","nullable":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}},"post":{"summary":"Create a new building owner","tags":["External","Document Platform"],"description":"Create a new building owner/customer associated with the authenticated partner organization","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name of the building owner/customer"}},"required":["name"]}}}},"security":[{"apiKey":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"ID of the created building owner"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}}},"servers":[{"url":"http://localhost:9000","description":"Development server"},{"url":"https://api.findable.ai","description":"Production server"}],"security":[{"apiKey":[]}]}