{"openapi":"3.1.0","info":{"title":"Datalake API - Public Endpoints","description":"Public API endpoints for the datalake service","version":"v4.110.0"},"servers":[{"url":"https://api.stonal.io/datalake","description":"Production environment"},{"url":"https://api-{stack}.stonal.io/datalake","description":"Custom stack production environment","variables":{"stack":{"description":"Custom stack name","default":"demo"}}},{"url":"https://api.stonal-dev.io/datalake","description":"Development environment"},{"url":"https://api.stonal-test.io/datalake","description":"Test environment"},{"url":"https://api.stonal-staging.io/datalake","description":"Staging environment"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Assets","description":"Public API to manage and query assets"},{"name":"Selection Sessions","description":"Selection Session Management API"},{"name":"Stakeholders","description":"Public API to manage and query stakeholders"},{"name":"Contracts","description":"V1 API to manage and query contracts"},{"name":"Public asset types","description":"Public API to manage and query asset type"},{"name":"Public properties","description":"Public API to manage and query properties"}],"paths":{"/v1/organizations/{organizationCode}/stakeholders/{uid}":{"get":{"tags":["Stakeholders"],"summary":"Get stakeholder by ID","description":"Retrieves a single stakeholder by its unique identifier. Requires `stonal.contacts.read` permission","operationId":"getStakeholderByUid","parameters":[{"name":"organizationCode","in":"path","description":"Organization code","required":true,"schema":{"type":"string"}},{"name":"uid","in":"path","description":"Unique identifier of the stakeholder","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successfully retrieved stakeholder","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StakeHolderView"}}}},"403":{"description":"Forbidden - Not authorized to access this organization","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StakeHolderView"}}}},"404":{"description":"Stakeholder not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StakeHolderView"}}}},"500":{"description":"Internal server error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StakeHolderView"}}}}}},"put":{"tags":["Stakeholders"],"summary":"Save stakeholder","description":"Creates or updates a stakeholder with a specific UID. Requires `stonal.contact.write` permission","operationId":"saveStakeholder","parameters":[{"name":"organizationCode","in":"path","description":"Organization code","required":true,"schema":{"type":"string"}},{"name":"uid","in":"path","description":"Unique identifier of the stakeholder","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveStakeHolderRequestBody"}}},"required":true},"responses":{"200":{"description":"Stakeholder successfully saved","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SaveStakeHolderResponseBody"}}}},"400":{"description":"Invalid request body","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SaveStakeHolderResponseBody"}}}},"403":{"description":"Forbidden - Not authorized to access this organization","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SaveStakeHolderResponseBody"}}}},"500":{"description":"Internal server error during save operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SaveStakeHolderResponseBody"}}}}}},"delete":{"tags":["Stakeholders"],"summary":"Delete stakeholder","description":"Deletes a stakeholder by its unique identifier. Requires `stonal.contact.delete` permission","operationId":"deleteStakeholder","parameters":[{"name":"organizationCode","in":"path","description":"Organization code","required":true,"schema":{"type":"string"}},{"name":"uid","in":"path","description":"Unique identifier of the stakeholder","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Stakeholder successfully deleted","content":{}},"403":{"description":"Forbidden - Not authorized to access this organization","content":{}},"404":{"description":"Stakeholder not found","content":{}},"500":{"description":"Internal server error during deletion","content":{}}}},"patch":{"tags":["Stakeholders"],"summary":"Update stakeholder","description":"Partially updates an existing stakeholder. Requires `stonal.contact.write` permission","operationId":"updateStakeholder","parameters":[{"name":"organizationCode","in":"path","description":"Organization code","required":true,"schema":{"type":"string"}},{"name":"uid","in":"path","description":"Unique identifier of the stakeholder","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStakeHolderRequestBody"}}},"required":true},"responses":{"204":{"description":"Stakeholder successfully updated"},"400":{"description":"Invalid request body"},"403":{"description":"Forbidden - Not authorized to access this organization"},"404":{"description":"Stakeholder not found"},"500":{"description":"Internal server error during update"}}}},"/v1/organizations/{organizationCode}/stakeholders":{"get":{"tags":["Stakeholders"],"summary":"Search stakeholders","description":"Search for stakeholders with various filtering options and pagination. Requires `stonal.contacts.read` permission","operationId":"searchStakeholder","parameters":[{"name":"organizationCode","in":"path","description":"Organization code","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","description":"Search query term","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","description":"Filter by stakeholder type (person or company)","required":false,"schema":{"type":"string"}},{"name":"name","in":"query","description":"Filter by stakeholder name","required":false,"schema":{"type":"string"}},{"name":"siren","in":"query","description":"Filter by the siren","required":false,"schema":{"type":"string"}},{"name":"email","in":"query","description":"Filter by stakeholder email","required":false,"schema":{"type":"string"}},{"name":"include","in":"query","description":"Add objects linked in the response","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"page","in":"query","description":"Page number (zero-based)","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","description":"Page size","required":false,"schema":{"type":"integer","format":"int32","default":10}},{"name":"sort","in":"query","description":"Sort field","required":false,"schema":{"type":"string"}},{"name":"direction","in":"query","description":"Sort direction (asc or desc)","required":false,"schema":{"type":"string","default":"asc"}},{"name":"assetIds","in":"query","description":"Filter by asset IDs","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"updatedAtAfter","in":"query","description":"Filter stakeholders updated after this date. Use ISO 8601 format","required":false,"schema":{"type":"string"},"example":"2025-11-10T14:30:00Z"},{"name":"mustHave","in":"query","description":"Filter existing siren","required":false,"schema":{"type":"string"},"example":"SIREN"}],"responses":{"200":{"description":"Successfully retrieved stakeholders","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SearchStakeHolderResponseBody"}}}},"400":{"description":"Invalid request parameters","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SearchStakeHolderResponseBody"}}}},"403":{"description":"Forbidden - Not authorized to access this organization","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SearchStakeHolderResponseBody"}}}},"500":{"description":"Internal server error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SearchStakeHolderResponseBody"}}}}}},"post":{"tags":["Stakeholders"],"summary":"Create stakeholder","description":"Creates a new stakeholder (person or company) for an organization. Requires `stonal.contact.write` permission","operationId":"createStakeholder","parameters":[{"name":"organizationCode","in":"path","description":"Organization code","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStakeHolderRequestBody"}}},"required":true},"responses":{"201":{"description":"Stakeholder successfully created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CreateStakeHolderResponseBody"}}}},"400":{"description":"Invalid request body","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CreateStakeHolderResponseBody"}}}},"403":{"description":"Forbidden - Not authorized to access this organization","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CreateStakeHolderResponseBody"}}}},"500":{"description":"Internal server error during creation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CreateStakeHolderResponseBody"}}}}}}},"/v1/organizations/{organizationCode}/selection-sessions":{"post":{"tags":["Selection Sessions"],"summary":"Create a selection session","description":"Creates a new selection session with selection data and context for the specified organization. Requires `stonal.asset.read` permission","operationId":"createSelectionSession","parameters":[{"name":"organizationCode","in":"path","description":"Organization code identifier","required":true,"schema":{"type":"string"},"example":"DEMO"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSelectionSessionRequest"}}},"required":true},"responses":{"201":{"description":"Selection session successfully created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSelectionSessionResponse"}}}},"400":{"description":"Bad Request - Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSelectionSessionResponse"}}}},"401":{"description":"Unauthorized - Missing or invalid JWT/PAT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSelectionSessionResponse"}}}},"403":{"description":"Forbidden - User doesn't have permission for this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSelectionSessionResponse"}}}},"404":{"description":"Not Found - Organization code not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSelectionSessionResponse"}}}}}}},"/v1/organizations/{organizationCode}/contracts":{"get":{"tags":["Contracts"],"summary":"Get contracts","description":"Filter contracts by asset and/or stakeholder. Requires `stonal.asset.read` permission","operationId":"getContracts","parameters":[{"name":"organizationCode","in":"path","description":"Organization code","required":true,"schema":{"type":"string"}},{"name":"contractCode","in":"query","description":"Contract code","required":false,"schema":{"type":"string"}},{"name":"assetUids","in":"query","description":"Asset UIDs (ex: 11111111-1111-1111-1111-111111111111,22222222-2222-2222-2222-222222222222)","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"stakeholderUids","in":"query","description":"Stakeholder UIDs (ex: 33333333-3333-3333-3333-333333333333,44444444-4444-4444-4444-444444444444)","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"equipmentTypeCodes","in":"query","description":"Equipment type codes (ex: ELEVATOR,HVAC)","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Successfully get contracts","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ContractsGetResultResponse"}}}},"403":{"description":"Forbidden - Not authorized to access this organization","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ContractsGetResultResponse"}}}},"500":{"description":"Internal server error during creation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ContractsGetResultResponse"}}}}}},"post":{"tags":["Contracts"],"summary":"Create contracts","description":"Create new contracts for an organization with his stakeholders and assets linked. Requires `stonal.asset.write` permission","operationId":"createContract","parameters":[{"name":"organizationCode","in":"path","description":"Organization code","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractCreationRequest"}}},"required":true},"responses":{"201":{"description":"Successfully created contracts"},"403":{"description":"Forbidden - Not authorized to access this organization"},"409":{"description":"Conflict - Contract already exists or has no changes"},"500":{"description":"Internal server error during creation"}}},"patch":{"tags":["Contracts"],"summary":"Update a contract","description":"Update a contracts for an organization with his stakeholders and assets linked. Requires `stonal.asset.write` permission","operationId":"patchContract","parameters":[{"name":"organizationCode","in":"path","description":"Organization code","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractUpdateRequest"}}},"required":true},"responses":{"204":{"description":"Successfully updated the contract"},"403":{"description":"Forbidden - Not authorized to access this organization"},"409":{"description":"Conflict - Contract already exists or has no changes"},"500":{"description":"Internal server error during creation"}}}},"/v1/organizations/{organizationCode}/assets":{"post":{"tags":["Assets"],"summary":"Ingest assets","description":"Create and update assets by organization. Requires `stonal.asset.write` permission","operationId":"upsertAssets","parameters":[{"name":"organizationCode","in":"path","description":"Organization code","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertAssetsRequest"}}},"required":true},"responses":{"200":{"description":"Successfully ingest assets","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/IngestAssetsFailResponse"},{"$ref":"#/components/schemas/IngestAssetsSuccessResponse"}]}}}},"403":{"description":"Forbidden - Not authorized to access this organization","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/IngestAssetsFailResponse"},{"$ref":"#/components/schemas/IngestAssetsSuccessResponse"}]}}}}}}},"/v1/organizations/{organizationCode}/assets/search":{"post":{"tags":["Assets"],"summary":"Search assets","description":"Search assets by organization. Requires `stonal.asset.read` permission","operationId":"searchAssets","parameters":[{"name":"organizationCode","in":"path","description":"Organization code","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchAssetsRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SearchAssetsResponse"}}}}}}},"/v1/organizations/{organizationCode}/selection-sessions/{selectionSessionUid}":{"get":{"tags":["Selection Sessions"],"summary":"Get a selection session","description":"Get a unique selection session with its selection data and context.","operationId":"getSelectionSession","parameters":[{"name":"organizationCode","in":"path","description":"Organization code","required":true,"schema":{"type":"string"}},{"name":"selectionSessionUid","in":"path","description":"Selection Session UID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Selection session retrieved successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GetSelectionSessionResponse"}}}},"401":{"description":"Unauthorized - Missing or invalid JWT/PAT","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GetSelectionSessionResponse"}}}},"404":{"description":"Not Found - Selection session or organization not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GetSelectionSessionResponse"}}}}}},"delete":{"tags":["Selection Sessions"],"summary":"Delete a selection session","description":"Delete a selection session and all its data. Requires `stonal.asset.read` permission","operationId":"deleteSelectionSession","parameters":[{"name":"organizationCode","in":"path","description":"Organization code","required":true,"schema":{"type":"string"}},{"name":"selectionSessionUid","in":"path","description":"Selection Session UID","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Selection session deleted successfully"},"401":{"description":"Unauthorized - Missing or invalid JWT/PAT"},"404":{"description":"Not Found - Selection session or organization not found"}}}},"/v1/organizations/{organizationCode}/selection-sessions/{selectionSessionUid}/structure":{"get":{"tags":["Selection Sessions"],"summary":"Get a structure in function of the selection session","description":"Get a structure of the unique selection session.","operationId":"getSelectionSessionStructure","parameters":[{"name":"organizationCode","in":"path","description":"Organization code","required":true,"schema":{"type":"string"}},{"name":"selectionSessionUid","in":"path","description":"Selection Session UID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Structure retrieved successfully","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssetBuildingStructure"}}}}},"404":{"description":"Not Found - Structure from selection session or selection session or organization not found","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssetBuildingStructure"}}}}}}}},"/v1/organizations/{organizationCode}/selection-sessions/{selectionSessionUid}/assets":{"get":{"tags":["Selection Sessions"],"summary":"Get selected asset details for a selection session","description":"Returns the name and level of each selected asset in the session.","operationId":"getSelectionSessionAssets","parameters":[{"name":"organizationCode","in":"path","description":"Organization code","required":true,"schema":{"type":"string"}},{"name":"selectionSessionUid","in":"path","description":"Selection Session UID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Selected asset details retrieved successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GetSelectionSessionAssetsResponse"}}}},"404":{"description":"Not Found - Selection session or organization not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GetSelectionSessionAssetsResponse"}}}}}}},"/v1/organizations/{organizationCode}/selection-sessions/{selectionSessionUid}/assets/{uid}":{"get":{"tags":["Selection Sessions"],"summary":"Get the plan of the assets base view in selection session","description":"Get the plan of the assets base view in selection session.","operationId":"getSelectionSessionPlan","parameters":[{"name":"organizationCode","in":"path","description":"Organization code","required":true,"schema":{"type":"string"}},{"name":"selectionSessionUid","in":"path","description":"Selection Session UID","required":true,"schema":{"type":"string"}},{"name":"uid","in":"path","description":"Selection asset UID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Structure retrieved successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PlanRepresentationResponseBody"}}}},"404":{"description":"Not Found - Structure from selection session or selection session or organization not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PlanRepresentationResponseBody"}}}}}}},"/v1/organizations/{organizationCode}/asset-types/all":{"get":{"tags":["Public asset types"],"summary":"Get all asset types","description":"Get all asset types by organization","operationId":"getAllAssetTypes","parameters":[{"name":"organizationCode","in":"path","description":"Organization code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully get all asset types","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicAssetTypesResponse"}}}},"403":{"description":"Forbidden - Not authorized to access this organization","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicAssetTypesResponse"}}}}}}},"/v1/organizations/{organizationCode}/asset-properties/all":{"get":{"tags":["Public properties"],"summary":"Get all asset properties","description":"Get all asset properties by organization","operationId":"getAllProperties","parameters":[{"name":"organizationCode","in":"path","description":"Organization code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully get all asset types","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicPropertiesResponse"}}}},"403":{"description":"Forbidden - Not authorized to access this organization","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicPropertiesResponse"}}}}}}}},"components":{"schemas":{"SaveContactDetailsResponseBody":{"type":"object","properties":{"email":{"type":"string","description":"Email address of the contact (required of type=person/company)","example":"john.doe@example.com"},"phoneNumber":{"type":["string","null"],"description":"Phone number of the contact (not required)","example":"0123456789"},"additionalInfos":{"type":["string","null"],"description":"Additional infos of the contact (not required)"}},"required":["email"]},"SaveStakeHolderRequestBody":{"type":"object","description":"Stakeholder data to save","properties":{"type":{"type":["string","null"],"description":"Type of stakeholder (person or company)","example":"person"},"uid":{"type":["string","null"],"description":"Unique identifier of the stakeholder (must match the path parameter)","example":"123e4567-e89b-12d3-a456-426614174000"},"firstName":{"type":["string","null"],"description":"First name of the person (required of type=person)","example":"John"},"lastName":{"type":["string","null"],"description":"Last name of the person (required of type=person)","example":"Doe"},"companyName":{"type":["string","null"],"description":"Company name (required of type=company)","example":"Acme Corporation"},"siren":{"type":["string","null"],"description":"SIREN number of the company (required of type=company)","example":"123456789"},"address":{"type":["string","null"],"description":"Address of the company"},"postalCode":{"type":["string","null"],"description":"Postal code of the company"},"city":{"type":["string","null"],"description":"City of the company"},"externalCode":{"type":["string","null"],"description":"External code of the company"},"contactsDetails":{"type":"array","description":"List of contact details of the stakeholder","items":{"$ref":"#/components/schemas/SaveContactDetailsResponseBody"}},"isActive":{"type":"boolean","description":"Active status of the stakeholder"},"fax":{"type":["string","null"],"description":"Fax of the company"},"function":{"type":["string","null"],"description":"Function of the person"},"creationDate":{"type":"string","description":"Date of creation of the stakeholder","example":"2021-01-01T00:00:00Z"}},"required":["contactsDetails","creationDate","isActive","type"]},"ContractLinkedView":{"type":"object","properties":{"id":{"type":"string","description":"Id of the contract"},"type":{"type":"string","description":"Type of the contract","example":"LEASE"},"code":{"type":"string","description":"Code of the contract"},"label":{"type":["string","null"],"description":"Label of the contract"},"assetUids":{"type":["array","null"],"description":"Asset stonal ids linked of the contract","items":{"type":"string"}}},"required":["code","id","type"]},"SaveStakeHolderResponseBody":{"type":"object","description":"Response body for save stakeholder operations","properties":{"uid":{"type":"string","format":"uuid","description":"Unique identifier of the stakeholder","example":"123e4567-e89b-12d3-a456-426614174000"},"type":{"type":"string","description":"Type of stakeholder (person or company)","example":"person"},"firstName":{"type":["string","null"],"description":"First name of the stakeholder (null for companies)","example":"John"},"lastName":{"type":["string","null"],"description":"Last name of the stakeholder (null for companies)","example":"Doe"},"name":{"type":"string","description":"Full name of the stakeholder (null for person, company name required)","example":"Stonal"},"siren":{"type":["string","null"],"description":"SIREN number of the companies (null for persons)","example":"123456789"},"address":{"type":["string","null"],"description":"Address of the company"},"postalCode":{"type":["string","null"],"description":"Postal code of the company"},"city":{"type":["string","null"],"description":"City of the company"},"externalCode":{"type":["string","null"],"description":"External code of the company"},"contactsDetails":{"type":["array","null"],"description":"List of contact details of the stakeholder","items":{"$ref":"#/components/schemas/StakeHolderContactDetailView"}},"contracts":{"type":["array","null"],"description":"Stakeholder contracts list","items":{"$ref":"#/components/schemas/ContractLinkedView"}},"isActive":{"type":"boolean","description":"Active status of the stakeholder"},"fax":{"type":["string","null"],"description":"Fax of the company"},"function":{"type":["string","null"],"description":"Function of the person"},"creationDate":{"type":["string","null"],"description":"Date of creation of the stakeholder","example":"2024-01-15"},"updatedAt":{"type":["string","null"],"description":"Date of last update of the stakeholder","example":"2024-11-10T14:30:00"},"stakeHolderView":{"type":"null","description":"Stakeholder details (included when the save operation is successful)"}},"required":["isActive","name","type","uid"]},"StakeHolderContactDetailView":{"type":"object","properties":{"phoneNumber":{"type":["string","null"],"description":"Phone number of the contact","example":"0123456789"},"additionalInfos":{"type":["string","null"],"description":"Additional infos of the contact","example":"Some additional infos"},"email":{"type":["string","null"],"description":"Email address required for person and company","example":"john.doe@example.com"},"creationDate":{"type":["string","null"],"description":"Date of creation of the contact","example":"2020-01-01"}}},"StakeHolderView":{"type":"object","description":"Represents a stakeholder (person or company)","properties":{"uid":{"type":"string","format":"uuid","description":"Unique identifier of the stakeholder","example":"123e4567-e89b-12d3-a456-426614174000"},"type":{"type":"string","description":"Type of stakeholder (person or company)","example":"person"},"firstName":{"type":["string","null"],"description":"First name of the stakeholder (null for companies)","example":"John"},"lastName":{"type":["string","null"],"description":"Last name of the stakeholder (null for companies)","example":"Doe"},"name":{"type":"string","description":"Full name of the stakeholder (null for person, company name required)","example":"Stonal"},"siren":{"type":["string","null"],"description":"SIREN number of the companies (null for persons)","example":"123456789"},"address":{"type":["string","null"],"description":"Address of the company"},"postalCode":{"type":["string","null"],"description":"Postal code of the company"},"city":{"type":["string","null"],"description":"City of the company"},"externalCode":{"type":["string","null"],"description":"External code of the company"},"contactsDetails":{"type":["array","null"],"description":"List of contact details of the stakeholder","items":{"$ref":"#/components/schemas/StakeHolderContactDetailView"}},"contracts":{"type":["array","null"],"description":"Stakeholder contracts list","items":{"$ref":"#/components/schemas/ContractLinkedView"}},"isActive":{"type":"boolean","description":"Active status of the stakeholder"},"fax":{"type":["string","null"],"description":"Fax of the company"},"function":{"type":["string","null"],"description":"Function of the person"},"creationDate":{"type":["string","null"],"description":"Date of creation of the stakeholder","example":"2024-01-15"},"updatedAt":{"type":["string","null"],"description":"Date of last update of the stakeholder","example":"2024-11-10T14:30:00"}},"required":["isActive","name","type","uid"]},"CreateStakeHolderRequestBody":{"type":"object","description":"Stakeholder data to create","properties":{"type":{"type":"string","description":"Type of stakeholder (person or company)","example":"person"},"firstName":{"type":["string","null"],"description":"First name of the person (required for type=person)","example":"John"},"lastName":{"type":["string","null"],"description":"Last name of the person (required for type=person)","example":"Doe"},"companyName":{"type":["string","null"],"description":"Company name (required for type=company)","example":"Acme Corporation"},"siren":{"type":["string","null"],"description":"SIREN number for company (required for type=company)","example":"123456789"},"address":{"type":["string","null"],"description":"Address of the company"},"postalCode":{"type":["string","null"],"description":"Postal code of the company"},"city":{"type":["string","null"],"description":"City of the company"},"externalCode":{"type":["string","null"],"description":"External code of the company"},"contactsDetails":{"type":["array","null"],"description":"Contact details of the company","items":{"$ref":"#/components/schemas/CreateStakeholderContactDetail"}},"isActive":{"type":"boolean","description":"Contact active status of the company or person"},"fax":{"type":["string","null"],"description":"Fax of the company"},"function":{"type":["string","null"],"description":"Function of the person"}},"required":["isActive","type"]},"CreateStakeholderContactDetail":{"type":"object","properties":{"email":{"type":["string","null"],"description":"Email address of the contact (required for type=person/company)","example":"john.doe@example.com"},"phoneNumber":{"type":["string","null"],"description":"Phone number of the contact (not required)","example":"0123456789"},"additionalInfos":{"type":["string","null"],"description":"Additional infos of the contact (not required)"}}},"CreateStakeHolderResponseBody":{"type":"object","description":"Response body for stakeholder creation","properties":{"uid":{"type":["string","null"],"format":"uuid","description":"Unique identifier of the created stakeholder (null if creation failed)","example":"123e4567-e89b-12d3-a456-426614174000"},"invalidRequest":{"oneOf":[{"$ref":"#/components/schemas/CreateStakeHolderRequestBody"},{"type":"null"}]},"error":{"type":["string","null"],"description":"Error message (present only if there was an error)","example":"Your request could not be processed. Please try again later or contact support."}}},"CreateSelectionSessionRequest":{"type":"object","description":"Request body for creating a selection session","properties":{"selection":{"$ref":"#/components/schemas/SelectionData"},"context":{"$ref":"#/components/schemas/SelectionContext"}},"required":["context","selection"]},"SelectionContext":{"type":"object","description":"Context information including, among other things, base view, selectable assets, and UI options","properties":{"baseView":{"type":["array","null"],"example":[{"uid":"550e8400-e29b-41d4-a716-446655440000"}],"items":{"$ref":"#/components/schemas/SelectionContextBaseViewItem"}},"selectableAssets":{"type":["array","null"],"example":[{"type":"EQUIPMENT|.*"}],"items":{"type":"object","additionalProperties":{}}},"uiOptions":{"type":["object","null"],"additionalProperties":{},"example":{"viewAssetDetails":true}}}},"SelectionContextBaseViewItem":{"type":"object","properties":{"uid":{"type":["string","null"],"example":"550e8400-e29b-41d4-a716-446655440000"},"externalIds":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Only one external identifier, where the key is the source name and the value is the identifier in that source system.","example":{"CODE":"A-0913"}}}},"SelectionData":{"type":"object","properties":{"selectedAssets":{"type":["array","null"],"description":"Selection data containing the list of selected asset UIDs","example":["3d0eab45-e2cc-4b80-addf-5ee0e77a5dcc","a1b2c3d4-e5f6-7890-abcd-ef1234567890"],"items":{"type":"string"}}}},"CreateSelectionSessionResponse":{"type":"object","description":"Response containing the created selection session UID and access URL","example":{"uid":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","url":"https://app.stonal.io/plans/ORGCODE/selection/?sessionId=a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"properties":{"uid":{"type":"string","format":"uuid","description":"Unique identifier of the created selection session","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"url":{"type":"string","description":"URL to access the selection view with the created session","example":"https://app.stonal.io/plans/ORGCODE/selection/?sessionId=a1b2c3d4-e5f6-7890-abcd-ef1234567890"}},"required":["uid","url"]},"ContractCreationRequest":{"type":"object","description":"Creation contract body","properties":{"label":{"type":["string","null"],"description":"Label of the contract"},"type":{"type":["string","null"],"description":"Type of the contract","example":"LEASE or PARTIAL"},"code":{"type":["string","null"],"description":"Code of the contract"},"assets":{"type":"array","description":"Assets linked of the contract","items":{"type":"string"},"uniqueItems":true},"stakeholders":{"type":"array","description":"Stakeholders linked of the contract","items":{"type":"string"},"uniqueItems":true},"equipments":{"type":"array","description":"Equipments linked of the contract","items":{"type":"string"},"uniqueItems":true},"effectiveDate":{"type":["string","null"],"description":"Effective date of the contract","example":"2023-01-01"},"endDate":{"type":["string","null"],"description":"End date of the contract","example":"2023-01-01"}},"required":["assets","equipments","stakeholders"]},"Asset":{"type":"object","properties":{"uid":{"type":["string","null"],"description":"Unique identifier for the asset (typically UUID)","example":"519c00c9-29b1-4e16-8ed2-61bb4a8d6249"},"externalIds":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Map of external system identifiers. Values can be null to delete a specific external ID.","example":{"CODE":"001"}},"temporaryId":{"type":["string","null"]},"type":{"type":["string","null"],"description":"Type of asset","example":"BUILDING"},"name":{"type":["string","null"]},"deletedAt":{"type":["string","null"],"description":"Date when the asset was deleted. ISO 8601 format","example":"2025-11-19T16:30:00Z"},"effectiveDate":{"type":["string","null"],"description":"Date when the asset is effective. ISO 8601 format","example":"2024-11-19"},"groupedBy":{"type":["array","null"],"description":"List of all assets grouping the current asset","items":{"$ref":"#/components/schemas/AssetIds"}},"groupingAssetsToAdd":{"type":["array","null"],"description":"List of assets to add to list of assets grouping the current asset","items":{"$ref":"#/components/schemas/AssetIds"}},"groups":{"type":["array","null"],"description":"List of all assets grouped by the current asset","items":{"$ref":"#/components/schemas/AssetIds"}},"properties":{"oneOf":[{"$ref":"#/components/schemas/AssetProperties"},{"type":"null"}]},"parent":{"oneOf":[{"$ref":"#/components/schemas/AssetIds"},{"type":"null"}]},"expirationDate":{"type":["string","null"]}}},"AssetIds":{"type":"object","properties":{"uid":{"type":["string","null"]},"externalIds":{"type":["object","null"],"additionalProperties":{"type":"string"}},"temporaryId":{"type":["string","null"]}}},"AssetProperties":{"type":"object","properties":{"source":{"type":["string","null"]},"simple":{"type":["object","null"],"additionalProperties":{"type":"string"}},"precise":{"type":["string","null"],"additionalProperties":{"$ref":"#/components/schemas/UpsertPublicAssetPrecisePropertiesDatum"},"description":"Each key represents the code of a property, mapped to its corresponding list of time-based values","example":{"TAUX_ROTATION_ANNUEL":[{"startDate":"2020-01-02","endDate":"2024-01-03","rawValue":"17,00"}]}}}},"EffectiveDate":{"type":"object","properties":{"value":{"type":"string","format":"date"},"isMinSystemDate":{"type":"boolean"}},"required":["isMinSystemDate","value"]},"ExpirationDate":{"type":"object","properties":{"value":{"type":"string","format":"date"}},"required":["value"]},"UpsertAssetsRequest":{"type":"object","description":"Assets to create or update","properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/Asset"}},"options":{"oneOf":[{"$ref":"#/components/schemas/SaveAssetsCommandOptions"},{"type":"null"}]}},"required":["assets"]},"UpsertPublicAssetPrecisePropertiesDatum":{"type":"object","properties":{"rawValue":{"type":"string"},"startDate":{"oneOf":[{"$ref":"#/components/schemas/EffectiveDate"},{"type":"null"}]},"endDate":{"oneOf":[{"$ref":"#/components/schemas/ExpirationDate"},{"type":"null"}]}},"required":["rawValue"]},"SaveAssetsCommandOptions":{"type":"object","properties":{"properties":{"oneOf":[{"$ref":"#/components/schemas/SaveAssetsCommandPropertiesOptions"},{"type":"null"}]}}},"SaveAssetsCommandPropertiesOptions":{"type":"object","properties":{"ignoreUnknowns":{"type":["boolean","null"]}}},"ErrorInfo":{"type":"object","properties":{"statusCode":{"type":"integer","format":"int32"},"code":{"type":"string"},"message":{"type":"string"},"details":{"type":["string","null"]},"payload":{"type":["object","null"],"additionalProperties":{}},"timestamp":{"type":"string"}},"required":["code","message","statusCode","timestamp"]},"IngestAssetsFailResponse":{"allOf":[{"$ref":"#/components/schemas/PublicAssetResponse"},{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorInfo","description":"Error response entity"}}}],"description":"Failure response containing error information","required":["error"]},"IngestAssetsSuccessResponse":{"allOf":[{"$ref":"#/components/schemas/PublicAssetResponse"},{"type":"object","properties":{"assets":{"type":"array","description":"List of ingested assets","items":{"$ref":"#/components/schemas/Asset"}}}}],"description":"Response containing the list of ingested assets","required":["assets"]},"PublicAssetResponse":{"description":"Base sealed class for public asset responses"},"SearchAssetDataCondition":{"type":"object","description":"A single filter condition on property data","properties":{"op":{"type":"string","description":"Condition operator","enum":["eq","neq","in","notIn","contains","notContains","regex","notRegex","gt","gte","lt","lte","isNull","isNotNull","and","or"],"example":"eq"},"property":{"type":["string","null"],"description":"Property code to filter on (leaf conditions only)","example":"ISSUES_NB"},"value":{"type":["string","null"],"description":"Comparison value (single-value operators)","example":"2"},"values":{"type":["array","null"],"description":"Comparison values (for in/notIn operators)","items":{"type":"string"}},"conditions":{"type":"null","description":"Nested conditions (for and/or group operators)"}},"required":["op"]},"SearchAssetFieldFilter":{"type":"object","description":"\n        Filter on an asset field.\n         \n        - Only one of 'equals' or 'matches' can be provided at the same time.\n        - Only one of 'notEquals' or 'notMatches' can be provided at the same time.\n        If both are set in either pair, the request is considered invalid.\n    ","properties":{"equals":{"type":["array","null"],"description":"Exact matching","example":["BUILDING_GROUP"],"items":{"type":"string"}},"matches":{"type":["array","null"],"description":"Regex matching","example":["EQUIPMENT\\|.*"],"items":{"type":"string"}},"notEquals":{"type":["array","null"],"description":"Exclude using exact matching","items":{"type":"string"}},"notMatches":{"type":["array","null"],"description":"Exclude using regex matching","items":{"type":"string"}}}},"SearchAssetFilters":{"type":"object","properties":{"asset":{"oneOf":[{"$ref":"#/components/schemas/SearchAssetIds"},{"type":"null"}]},"assets":{"type":["array","null"],"description":"List of asset identifiers to search for. Returns assets matching any of the provided identifiers.","items":{"$ref":"#/components/schemas/SearchAssetIds"}},"parent":{"oneOf":[{"$ref":"#/components/schemas/SearchAssetIds"},{"type":"null"}]},"parentRecursive":{"oneOf":[{"$ref":"#/components/schemas/SearchAssetIds"},{"type":"null"}]},"child":{"oneOf":[{"$ref":"#/components/schemas/SearchAssetIds"},{"type":"null"}]},"childRecursive":{"oneOf":[{"$ref":"#/components/schemas/SearchAssetIds"},{"type":"null"}]},"groupingParent":{"oneOf":[{"$ref":"#/components/schemas/SearchAssetIds"},{"type":"null"}]},"name":{"oneOf":[{"$ref":"#/components/schemas/SearchAssetFieldFilter"},{"type":"null"}]},"type":{"oneOf":[{"$ref":"#/components/schemas/SearchAssetFieldFilter"},{"type":"null"}]},"includeDeleted":{"type":["boolean","null"],"default":false,"description":"If `false` or undefined only returns non deleted assets. If `true` also includes deleted assets"},"isDeleted":{"type":["boolean","null"],"description":"If `true`, returns only soft-deleted assets. If `false` or undefined, returns only non-deleted assets. Cannot be combined with `includeDeleted: true`"},"updatedAtAfter":{"type":["string","null"],"description":"Filter on assets updated after this date. Use ISO 8601 format","example":"2025-11-10"},"representations":{"oneOf":[{"$ref":"#/components/schemas/SearchRepresentationsFilter"},{"type":"null"}]},"properties":{"oneOf":[{"$ref":"#/components/schemas/SearchAssetPropertyFilter"},{"type":"null"}]}}},"SearchAssetIds":{"type":"object","properties":{"uid":{"type":["string","null"],"description":"Unique identifier for the asset (typically UUID)","example":"519c00c9-29b1-4e16-8ed2-61bb4a8d6249"},"externalIds":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Must contains only one external system identifier","example":{"CODE":"001"}}}},"SearchAssetPaginate":{"type":"object","properties":{"size":{"type":"integer","format":"int32","default":50,"description":"Number of results","maximum":2000},"cursor":{"type":["string","null"],"default":"0","description":"A marker indicating the position in a dataset, used to determine where to continue fetching results in paginated data"}}},"SearchAssetProperties":{"type":"object","properties":{"simple":{"type":"array","example":["ADDRESS"],"items":{"type":"string"}}},"required":["simple"]},"SearchAssetPropertyFilter":{"type":"object","description":"Filter assets by property data values","properties":{"conditions":{"type":"array","description":"List of conditions (implicit AND between root conditions)","items":{"$ref":"#/components/schemas/SearchAssetDataCondition"}}},"required":["conditions"]},"SearchAssetsRequest":{"type":"object","description":"Search criteria","properties":{"search":{"$ref":"#/components/schemas/SearchAssetFilters"},"paginate":{"$ref":"#/components/schemas/SearchAssetPaginate","description":"Size is set to 50 by default"},"fields":{"type":"array","description":"Fields to include in the response, in addition to `uid` which is always included.\n                         Allowed values are: `uid`, `name`, `updatedAt`, `deletedAt`, `type`, `externalIds`, `representations`, `parent`, `effectiveDate`, `expirationDate`, `integrationDate`.","example":["name","type"],"items":{"type":"string"}},"properties":{"oneOf":[{"$ref":"#/components/schemas/SearchAssetProperties"},{"type":"null"}]}},"required":["fields","paginate","search"]},"SearchRepresentationsFilter":{"type":"object","properties":{"isPresent":{"type":"boolean","description":"Filter on assets having or not a representation. `true`: Only assets with representation. `false`: Only assets without representation. If not specified, return both assets having or not a representation"}},"required":["isPresent"]},"AssetRepresentations":{"type":"object","properties":{"box":{"type":"null"},"outlines":{"type":["array","null"],"items":{"type":"array","items":{"$ref":"#/components/schemas/Coordinate"}}},"face":{"type":["string","null"]},"background":{"type":["string","null"]}}},"Coordinate":{"type":"object","properties":{"x":{"type":"number","format":"double"},"y":{"type":"number","format":"double"}},"required":["x","y"]},"SearchAssetsResponse":{"type":"object","properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/SearchPublicAsset"}},"paginate":{"$ref":"#/components/schemas/SearchAssetPaginate"}},"required":["assets","paginate"]},"SearchPublicAsset":{"type":"object","properties":{"uid":{"type":["string","null"]},"name":{"type":["string","null"]},"updatedAt":{"type":["string","null"]},"type":{"type":["string","null"]},"parent":{"oneOf":[{"$ref":"#/components/schemas/SearchAssetIds"},{"type":"null"}]},"deletedAt":{"type":["string","null"]},"externalIds":{"type":["object","null"],"additionalProperties":{"type":"string"}},"properties":{"oneOf":[{"$ref":"#/components/schemas/AssetProperties"},{"type":"null"}]},"representations":{"oneOf":[{"$ref":"#/components/schemas/AssetRepresentations"},{"type":"null"}]},"effectiveDate":{"type":["string","null"]},"expirationDate":{"type":["string","null"]},"integrationDate":{"type":["string","null"]}}},"UpdateContactDetailsRequestBody":{"type":"object","properties":{"email":{"type":["string","null"],"description":"Email address of the contact (optional)","example":"john.doe@example.com"},"phoneNumber":{"type":["string","null"],"description":"Phone number of the contact (optional)","example":"0123456789"},"additionalInfos":{"type":["string","null"],"description":"Additional infos of the contact (optional)"},"creationDate":{"type":["string","null"],"description":"Date of creation of the contact (optional)","example":"2020-01-01"}}},"UpdateStakeHolderRequestBody":{"type":"object","description":"Stakeholder data to update","properties":{"firstName":{"type":["string","null"],"description":"First name of the person (only for person stakeholders)","example":"John"},"lastName":{"type":["string","null"],"description":"Last name of the person (only for person stakeholders)","example":"Doe"},"companyName":{"type":["string","null"],"description":"Company name (only for company stakeholders)","example":"Acme Corporation"},"siren":{"type":["string","null"],"description":"SIREN number (only for company stakeholders)","example":"123456789"},"address":{"type":["string","null"],"description":"Address of the company"},"postalCode":{"type":["string","null"],"description":"Postal code of the company"},"city":{"type":["string","null"],"description":"City of the company"},"externalCode":{"type":["string","null"],"description":"External code of the company"},"contactsDetails":{"type":["array","null"],"description":"Contact details list. If present, it REPLACES the existing list.","items":{"$ref":"#/components/schemas/UpdateContactDetailsRequestBody"}},"isActive":{"type":["boolean","null"],"description":"Active flag. If present, it updates the current value.","example":true},"fax":{"type":["string","null"],"description":"Fax of the company"},"function":{"type":["string","null"],"description":"Function of the person"}}},"ContractUpdateRequest":{"type":"object","description":"Patch contract body","properties":{"contractCode":{"type":"string","description":"Code of the contract"},"assets":{"type":["array","null"],"description":"Assets linked of the contract","items":{"type":"string"},"uniqueItems":true},"stakeholders":{"type":["array","null"],"description":"Stakeholders linked of the contract","items":{"type":"string"},"uniqueItems":true},"equipments":{"type":["array","null"],"description":"Equipments linked of the contract","items":{"type":"string"},"uniqueItems":true},"effectiveDate":{"type":["string","null"],"description":"Effective date of the contract","example":"2023-01-01"},"endDate":{"type":["string","null"],"description":"End date of the contract","example":"2023-01-01"},"terminationDate":{"type":["string","null"],"description":"Termination date of the contract","example":"2023-01-01"},"label":{"type":["string","null"],"description":"Label of the contract"},"type":{"type":["string","null"],"description":"Type of the contract","example":"LEASE or PARTIAL"}},"required":["contractCode"]},"PageRequested":{"type":"object","description":"Information about the requested page in paginated responses","properties":{"page":{"type":"integer","format":"int32","description":"Page number (zero-based)","example":0},"size":{"type":"integer","format":"int32","description":"Number of items per page","example":10},"sort":{"type":["string","null"],"description":"Field used for sorting","example":"name"},"direction":{"type":["string","null"],"description":"Sort direction (ASC or DESC)","example":"ASC"}},"required":["page","size"]},"SearchStakeHolderResponseBody":{"type":"object","description":"Response body for stakeholder search operations","properties":{"error":{"type":["string","null"],"description":"Error message (present only if there was an error)","example":"Your request could not be processed. Please try again later or contact support."},"result":{"type":["array","null"],"description":"Collection of stakeholders matching the search criteria","items":{"$ref":"#/components/schemas/StakeHolderView"}},"total":{"type":["integer","null"],"format":"int64","description":"Total number of stakeholders matching the search criteria","example":42},"totalPages":{"type":["integer","null"],"format":"int32","description":"Total number of pages available","example":5},"pageRequested":{"oneOf":[{"$ref":"#/components/schemas/PageRequested"},{"type":"null"}]}}},"GetSelectionSessionResponse":{"type":"object","description":"Response for getting a selection session containing its selection data and context","properties":{"selection":{"$ref":"#/components/schemas/SelectionData","description":"Selection data containing the list of selected asset UIDs","example":"{\n          \"selectedAssets\": [\"3d0eab45-e2cc-4b80-addf-5ee0e77a5dcc\", \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"],\n        }"},"context":{"type":"object","additionalProperties":{},"description":"Context information including, among other things, base view, selectable assets, and UI options","example":"{\n          \"baseView\": [{\"uid\": \"550e8400-e29b-41d4-a716-446655440000\"}],\n          \"selectableAssets\": [{\"type\": \"EQUIPMENT|.*\"}],\n          \"uiOptions\": {\"viewAssetDetails\": true},\n          \"customField\": \"value\",\n        }"}},"required":["context","selection"]},"AssetBuildingStructure":{"type":"object","properties":{"stonalId":{"type":"string"},"level":{"type":"string"},"name":{"type":"string"},"parentStonalId":{"type":"string"},"numberOfChildren":{"type":"integer","format":"int32"},"holderTypeName":{"type":"array","items":{"$ref":"#/components/schemas/StructureHolderTypeName"},"uniqueItems":true},"plan3DLink":{"type":["string","null"]},"guid":{"type":["string","null"]}},"required":["holderTypeName","level","name","numberOfChildren","parentStonalId","stonalId"]},"StructureHolderTypeName":{"type":"object","properties":{"singular":{"type":"string"},"plural":{"type":"string"}},"required":["plural","singular"]},"GetSelectionSessionAssetsResponse":{"type":"object","description":"Response containing the details of selected assets in a selection session","properties":{"assets":{"type":"array","description":"List of selected asset details with their name and level information","items":{"$ref":"#/components/schemas/SelectionSessionAssetDetails"}}},"required":["assets"]},"SelectionSessionAssetDetails":{"type":"object","description":"Details of a selected asset including its level ancestor","properties":{"uid":{"type":"string","description":"Stonal identifier of the asset","example":"550e8400-e29b-41d4-a716-446655440001"},"name":{"type":"string","description":"Name of the asset","example":"A101"},"levelUid":{"type":["string","null"],"description":"Stonal identifier of the first LEVEL ancestor in the parent chain, null if no LEVEL ancestor exists","example":"660e8400-e29b-41d4-a716-446655440010"}},"required":["name","uid"]},"PlanRepresentationResponseBody":{"type":"object","description":"Response containing SVG plan representation","properties":{"svg":{"type":"string","description":"SVG content as a string","example":"<svg xmlns='http://www.w3.org/2000/svg'>...</svg>"}},"required":["svg"]},"ContractAssetView":{"type":"object","description":"Asset associated with a contract","properties":{"assetErpCode":{"type":"string","description":"ERP code of the asset","example":"ERP123"},"assetCode":{"type":"string","deprecated":true,"description":"Asset code (deprecated, use assetErpCode instead)","example":"ERP123"},"area":{"type":["number","null"],"format":"double","description":"Area of the asset in square meters","example":150.5},"effectiveDate":{"type":"string","description":"Date when the asset was added to the contract","example":"2023-01-01"},"expirationDate":{"type":"string","description":"Date when the asset will be removed from the contract","example":"2025-12-31"},"initialRent":{"type":["number","null"],"format":"double","description":"Initial rent amount","example":1200.0},"actualRent":{"type":["number","null"],"format":"double","description":"Current rent amount","example":1250.0},"stonalIdentifier":{"type":["string","null"],"description":"Stonal identifier of the asset"}},"required":["assetCode","assetErpCode","effectiveDate","expirationDate"]},"ContractView":{"type":"object","description":"Contract information","properties":{"organizationCode":{"type":"string","description":"Organization code","example":"ORG123"},"code":{"type":"string","description":"Contract code","example":"CONT456"},"contractType":{"$ref":"#/components/schemas/HolderTypeView","description":"Type of contract"},"stakeholders":{"type":"array","description":"List of stakeholders involved in the contract","items":{"$ref":"#/components/schemas/StakeholderView"}},"effectiveDate":{"type":["string","null"],"format":"date","description":"Date when the contract becomes effective"},"endDate":{"type":["string","null"],"format":"date","description":"End date of the contract"},"terminationDate":{"type":["string","null"],"format":"date","description":"Termination date if contract was terminated early"},"deadlines":{"type":"array","description":"Important deadlines in the contract lifecycle","items":{"$ref":"#/components/schemas/DeadlineView"}},"assets":{"type":"array","description":"Assets associated with this contract","items":{"$ref":"#/components/schemas/ContractAssetView"}},"integrationDate":{"type":["string","null"],"format":"date-time","description":"Date when contract was integrated into the system"},"label":{"type":["string","null"],"description":"Label of the contract"},"equipments":{"type":"array","description":"List of equipments linked to the contract","items":{"$ref":"#/components/schemas/EquipmentView"}}},"required":["assets","code","contractType","deadlines","equipments","organizationCode","stakeholders"]},"ContractsGetResultResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ContractView"},"uniqueItems":true}},"required":["data"]},"DeadlineView":{"type":"object","description":"A deadline in the contract","properties":{"value":{"type":"string","format":"date","description":"The deadline date"}},"required":["value"]},"EquipmentView":{"type":"object","description":"Equipment linked to a contract","properties":{"code":{"type":"string","description":"Equipment code","example":"EQUIPMENT"},"names":{"type":"array","description":"List of names for the equipment","items":{"$ref":"#/components/schemas/HolderTypeNameView"}}},"required":["code","names"]},"HolderTypeNameView":{"type":"object","description":"Localized name information for a holder type","properties":{"singular":{"type":"string","description":"Singular form of the name","example":"Building"},"plural":{"type":"string","description":"Plural form of the name","example":"Buildings"},"language":{"type":"string","description":"Language code","example":"en"}},"required":["language","plural","singular"]},"HolderTypeView":{"type":"object","description":"Holder type information","properties":{"organizationCode":{"type":"string","description":"Organization code","example":"ORG123"},"code":{"type":"string","description":"Code of the holder type","example":"BUILDING"},"type":{"type":"string","description":"Type category","example":"ASSET"},"nature":{"type":["string","null"],"description":"Nature of the holder type (PHYSICAL, LOGICAL, PROPERTY_DYNAMIC)","example":"PHYSICAL"},"equipmentDestination":{"type":["string","null"],"description":"Equipment destination classification","example":"WALL"},"names":{"type":"array","description":"Localized names for this holder type","items":{"$ref":"#/components/schemas/HolderTypeNameView"}},"numberOfAssets":{"type":["integer","null"],"format":"int32","description":"Number of assets of this holder type","example":42},"importErrors":{"oneOf":[{"$ref":"#/components/schemas/ImportErrors"},{"type":"null"}]},"recommendedPropertyCodes":{"type":"array","description":"Codes of properties recommended for this holder type","example":["PROP_AREA","PROP_HEIGHT"],"items":{"type":"string"}},"mandatoryPropertyCodes":{"type":"array","description":"Codes of properties mandatory for this holder type","example":["PROP_REFERENCE"],"items":{"type":"string"}}},"required":["code","mandatoryPropertyCodes","names","organizationCode","recommendedPropertyCodes","type"]},"ImportErrors":{"type":"object","description":"Information about import errors","properties":{"duplicates":{"type":"integer","format":"int32","description":"Number of duplicate entries","example":0},"others":{"type":"integer","format":"int32","description":"Number of other errors","example":0}},"required":["duplicates","others"]},"StakeholderView":{"type":"object","description":"Information about a contract stakeholder","properties":{"name":{"type":"string","description":"Name of the stakeholder","example":"Acme Corporation"},"code":{"type":"string","description":"Code identifying the stakeholder","example":"STK789"},"uid":{"type":["string","null"],"description":"Unique identifier of the stakeholder","example":"33333333-3333-3333-3333-333333333333"},"externalCode":{"type":["string","null"],"description":"External code of the stakeholder","example":"EXT123"}},"required":["code","name"]},"PublicAssetTypeNameResponse":{"type":"object","description":"Name of the asset type","properties":{"singular":{"type":"string","description":"Singular name of the asset type"},"plural":{"type":"string","description":"Plural name of the asset type"},"language":{"type":"string","description":"Language of the asset type names"}},"required":["language","plural","singular"]},"PublicAssetTypeResponse":{"type":"object","description":"Asset type","properties":{"code":{"type":"string","description":"Code of the asset type"},"nature":{"type":["string","null"],"description":"Natuer of the asset type"},"names":{"type":"array","description":"List of names of the asset type","items":{"$ref":"#/components/schemas/PublicAssetTypeNameResponse"}}},"required":["code","names"]},"PublicAssetTypesResponse":{"type":"object","description":"List of asset types","properties":{"assetTypes":{"type":"array","items":{"$ref":"#/components/schemas/PublicAssetTypeResponse"}}},"required":["assetTypes"]},"PublicPropertiesResponse":{"type":"object","description":"List of properties for an organization","properties":{"properties":{"type":"array","items":{"$ref":"#/components/schemas/PublicPropertyResponse"}}},"required":["properties"]},"PublicPropertyResponse":{"type":"object","description":"Property for an organization","properties":{"code":{"type":"string","description":"Code of property for an organization"},"name":{"type":"string","description":"Name of property for an organization"},"type":{"type":"string","description":"Type of property for an organization"},"temporality":{"type":"string","description":"Temporality of property for an organization"},"description":{"type":["string","null"],"description":"Description of property for an organization"},"assetTypes":{"type":"array","description":"Asset types of property for an organization","items":{"type":"string"}},"defaultUnit":{"type":["string","null"],"description":"Default unit of property for an organization"},"enumValues":{"type":["array","null"],"description":"Enum values of property for an organization","items":{"type":"string"}},"aliases":{"type":"array","description":"Aliases supported for this property","items":{"type":"string"}}},"required":["aliases","assetTypes","code","name","temporality","type"]}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}}}