{"openapi":"3.1.0","info":{"title":"Datalake API - Public Endpoints","description":"Public API endpoints for the datalake service","version":"v4.184.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":"Amendments","description":"V1 API to query amendments"},{"name":"Contracts","description":"V1 API to manage and query contracts"},{"name":"Deposits","description":"V1 API to query deposits"},{"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","default":""}},{"name":"uid","in":"path","description":"Unique identifier of the stakeholder","required":true,"schema":{"type":"string","default":""}}],"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","default":""}},{"name":"uid","in":"path","description":"Unique identifier of the stakeholder","required":true,"schema":{"type":"string","default":""}}],"requestBody":{"description":"Stakeholder data to save","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","default":""}},{"name":"uid","in":"path","description":"Unique identifier of the stakeholder","required":true,"schema":{"type":"string","default":""}}],"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","default":""}},{"name":"uid","in":"path","description":"Unique identifier of the stakeholder","required":true,"schema":{"type":"string","default":""}}],"requestBody":{"description":"Stakeholder data to update","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","default":""}},{"name":"q","in":"query","description":"Search query term","required":false,"schema":{"type":"string","default":""}},{"name":"type","in":"query","description":"Filter by stakeholder type (person or company)","required":false,"schema":{"type":"string","default":""}},{"name":"name","in":"query","description":"Filter by stakeholder name","required":false,"schema":{"type":"string","default":""}},{"name":"siren","in":"query","description":"Filter by the siren","required":false,"schema":{"type":"string","default":""}},{"name":"email","in":"query","description":"Filter by stakeholder email","required":false,"schema":{"type":"string","default":""}},{"name":"include","in":"query","description":"Add objects linked in the response","required":false,"schema":{"type":"string","default":""}},{"name":"page","in":"query","description":"Page number (zero-based)","required":false,"schema":{"type":"string","default":""}},{"name":"size","in":"query","description":"Page size","required":false,"schema":{"type":"string","default":""}},{"name":"sort","in":"query","description":"Sort field","required":false,"schema":{"type":"string","default":""}},{"name":"direction","in":"query","description":"Sort direction (asc or desc)","required":false,"schema":{"type":"string","default":""}},{"name":"assetIds","in":"query","description":"Filter by asset IDs","required":false,"schema":{"type":"string","default":""}},{"name":"updatedAtAfter","in":"query","description":"Filter stakeholders updated after this date. Use ISO 8601 format","required":false,"schema":{"type":"string","default":""},"example":"2025-11-10T14:30:00Z"},{"name":"mustHave","in":"query","description":"Filter existing siren","required":false,"schema":{"type":"string","default":""},"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","default":""}}],"requestBody":{"description":"Stakeholder data to create","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","default":""},"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":"List contracts for an organization with cursor pagination, optional filters, and opt-in property data. Requires `stonal.asset.read` permission","operationId":"getContracts","parameters":[{"name":"organizationCode","in":"path","description":"Organization code","required":true,"schema":{"type":"string","default":""}},{"name":"contractCode","in":"query","description":"Contract code","required":false,"schema":{"type":"string","default":""}},{"name":"assetUids","in":"query","description":"Asset UIDs (ex: 11111111-1111-1111-1111-111111111111,22222222-2222-2222-2222-222222222222)","required":false,"schema":{"type":"string","default":""}},{"name":"stakeholderUids","in":"query","description":"Stakeholder UIDs (ex: 33333333-3333-3333-3333-333333333333,44444444-4444-4444-4444-444444444444)","required":false,"schema":{"type":"string","default":""}},{"name":"equipmentTypeCodes","in":"query","description":"Equipment type codes (ex: ELEVATOR,HVAC)","required":false,"schema":{"type":"string","default":""}},{"name":"size","in":"query","description":"Page size (default 50, max 2000)","required":false,"schema":{"type":"string","default":""}},{"name":"cursor","in":"query","description":"Opaque cursor for pagination; \"0\" starts from the first page","required":false,"schema":{"type":"string","default":""}},{"name":"include","in":"query","description":"Optional includes; only \"data\" is recognised. Adds per-contract property values to each contract.","required":false,"schema":{"type":"string","default":""}}],"responses":{"200":{"description":"Successfully get contracts","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ContractsGetResultResponse"}}}},"400":{"description":"Bad request - invalid pagination parameters","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","default":""}}],"requestBody":{"description":"Creation contract body","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","default":""}}],"requestBody":{"description":"Patch contract body","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","default":""}}],"requestBody":{"description":"Assets to create or update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertAssetsRequest","additionalProperties":{"default":""},"default":""}}},"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","default":""}},{"name":"withExpired","in":"query","description":"Include expired assets (default false)","required":false,"schema":{"type":"string","default":""}}],"requestBody":{"description":"Search criteria","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchAssetsRequest","additionalProperties":{"default":""},"default":""}}},"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","default":""}},{"name":"selectionSessionUid","in":"path","description":"Selection Session UID","required":true,"schema":{"type":"string","default":""}}],"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","default":""}},{"name":"selectionSessionUid","in":"path","description":"Selection Session UID","required":true,"schema":{"type":"string","default":""}}],"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","default":""}},{"name":"selectionSessionUid","in":"path","description":"Selection Session UID","required":true,"schema":{"type":"string","default":""}}],"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","default":""}},{"name":"selectionSessionUid","in":"path","description":"Selection Session UID","required":true,"schema":{"type":"string","default":""}}],"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","default":""}},{"name":"selectionSessionUid","in":"path","description":"Selection Session UID","required":true,"schema":{"type":"string","default":""}},{"name":"uid","in":"path","description":"Selection asset UID","required":true,"schema":{"type":"string","default":""}}],"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}/deposits":{"get":{"tags":["Deposits"],"summary":"Get deposits","description":"List deposits for an organization, paginated with an opaque cursor ordered by ascending id. Requires `stonal.asset.read` permission.","operationId":"getDeposits","parameters":[{"name":"organizationCode","in":"path","description":"Organization code","required":true,"schema":{"type":"string","default":""}},{"name":"contractCode","in":"query","description":"Filter by contract code","required":false,"schema":{"type":"string","default":""}},{"name":"code","in":"query","description":"Filter by deposit code","required":false,"schema":{"type":"string","default":""}},{"name":"size","in":"query","description":"Number of results per page (default 50, max 2000)","required":false,"schema":{"type":"string","default":""}},{"name":"cursor","in":"query","description":"Opaque cursor returned by a previous call. Use \"0\" to start.","required":false,"schema":{"type":"string","default":""}}],"responses":{"200":{"description":"Successfully got deposits","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DepositsGetResultResponse"}}}},"400":{"description":"Invalid query parameter","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DepositsGetResultResponse"}}}},"403":{"description":"Forbidden - Not authorized to access this organization","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DepositsGetResultResponse"}}}},"500":{"description":"Internal server error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DepositsGetResultResponse"}}}}}}},"/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","default":""}}],"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","default":""}}],"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"}}}}}}},"/v1/organizations/{organizationCode}/amendments":{"get":{"tags":["Amendments"],"summary":"List amendments","description":"Return amendments for an organization, paginated by ascending internal id via opaque cursor. Requires `stonal.asset.read` permission.","operationId":"getAmendments","parameters":[{"name":"organizationCode","in":"path","description":"Organization code","required":true,"schema":{"type":"string","default":""}},{"name":"contractCode","in":"query","description":"Filter by contract business code","required":false,"schema":{"type":"string","default":""}},{"name":"code","in":"query","description":"Filter by amendment business code","required":false,"schema":{"type":"string","default":""}},{"name":"effectiveDateFrom","in":"query","description":"Inclusive lower bound on the amendment effective date (ISO date, e.g. 2024-01-01)","required":false,"schema":{"type":"string","default":""}},{"name":"effectiveDateTo","in":"query","description":"Inclusive upper bound on the amendment effective date (ISO date, e.g. 2024-12-31)","required":false,"schema":{"type":"string","default":""}},{"name":"size","in":"query","description":"Page size, between 1 and 2000","required":false,"schema":{"type":"string","default":""}},{"name":"cursor","in":"query","description":"Opaque pagination cursor; '0' starts iteration, null in the response signals completion","required":false,"schema":{"type":"string","default":""}}],"responses":{"200":{"description":"Successfully fetched amendments","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AmendmentsGetResultResponse"}}}},"400":{"description":"Invalid query parameter (size out of range, malformed cursor or date, inverted date range)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AmendmentsGetResultResponse"}}}},"403":{"description":"Forbidden - Not authorized to access this organization","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AmendmentsGetResultResponse"}}}},"500":{"description":"Internal server error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AmendmentsGetResultResponse"}}}}}}},"/v1/organizations/{organizationCode}/contracts/{contractCode}":{"delete":{"tags":["Contracts"],"summary":"Delete a contract","description":"Delete a contract for an organization. Requires `stonal.asset.delete` permission. If the contract code contains URL-unsafe characters (e.g. `/` in `2021/Z5059`), it MUST be **double percent-encoded** in the path — `2021/Z5059` is sent as `2021%252FZ5059`.","operationId":"deleteContract","parameters":[{"name":"organizationCode","in":"path","description":"Organization code","required":true,"schema":{"type":"string","default":""}},{"name":"contractCode","in":"path","description":"Contract code. Double percent-encode any character that is unsafe in a URL path segment (notably `/` → `%252F`); the server decodes the value twice.","required":true,"schema":{"type":"string","default":""}}],"responses":{"204":{"description":"Successfully deleted the contract"},"403":{"description":"Forbidden - Not authorized to access this organization"},"404":{"description":"Contract not found"},"500":{"description":"Internal server error during deletion"}}}}},"components":{"schemas":{"SaveContactDetailsResponseBody":{"type":"object","properties":{"email":{"type":"string","default":"","description":"Email address of the contact (required of type=person/company)","example":"john.doe@example.com"},"phoneNumber":{"type":["string","null"],"default":"","description":"Phone number of the contact (not required)","example":"0123456789"},"additionalInfos":{"type":["string","null"],"default":"","description":"Additional infos of the contact (not required)"}},"required":["email"]},"SaveStakeHolderRequestBody":{"type":"object","default":null,"description":"Request body of creating or updating a stakeholder with a specific UID","properties":{"type":{"type":["string","null"],"default":"","description":"Type of stakeholder (person or company)","example":"person"},"uid":{"type":["string","null"],"default":"","description":"Unique identifier of the stakeholder (must match the path parameter)","example":"123e4567-e89b-12d3-a456-426614174000"},"firstName":{"type":["string","null"],"default":"","description":"First name of the person (required of type=person)","example":"John"},"lastName":{"type":["string","null"],"default":"","description":"Last name of the person (required of type=person)","example":"Doe"},"companyName":{"type":["string","null"],"default":"","description":"Company name (required of type=company)","example":"Acme Corporation"},"siren":{"type":["string","null"],"default":"","description":"SIREN number of the company (required of type=company)","example":"123456789"},"address":{"type":["string","null"],"default":"","description":"Address of the company"},"postalCode":{"type":["string","null"],"default":"","description":"Postal code of the company"},"city":{"type":["string","null"],"default":"","description":"City of the company"},"externalCode":{"type":["string","null"],"default":"","description":"External code of the company"},"contactsDetails":{"type":"array","default":"","description":"List of contact details of the stakeholder","items":{"$ref":"#/components/schemas/SaveContactDetailsResponseBody"}},"isActive":{"type":"boolean","default":false,"description":"Active status of the stakeholder"},"fax":{"type":["string","null"],"default":"","description":"Fax of the company"},"function":{"type":["string","null"],"default":"","description":"Function of the person"},"creationDate":{"type":"string","default":"","description":"Date of creation of the stakeholder. Accepts a plain date (yyyy-MM-dd) or an ISO 8601 datetime; the time portion, if present, is ignored.","example":"2021-01-01"}},"required":["contactsDetails","creationDate","isActive","type"]},"ContractLinkedView":{"type":"object","properties":{"id":{"type":"string","default":"","description":"Id of the contract"},"type":{"type":"string","default":"","description":"Type of the contract","example":"LEASE"},"code":{"type":"string","default":"","description":"Code of the contract"},"label":{"type":["string","null"],"default":"","description":"Label of the contract"},"assetUids":{"type":["array","null"],"default":"","description":"Asset stonal ids linked of the contract","items":{"type":"string"}},"assetChildrenUids":{"type":["array","null"],"default":"","description":"Children assets stonal ids linked of the contract","items":{"type":"string"}}},"required":["code","id","type"]},"SaveStakeHolderResponseBody":{"type":"object","default":null,"description":"Response body for save stakeholder operations","properties":{"uid":{"type":"string","format":"uuid","default":"","description":"Unique identifier of the stakeholder","example":"123e4567-e89b-12d3-a456-426614174000"},"type":{"type":"string","default":"","description":"Type of stakeholder (person or company)","example":"person"},"firstName":{"type":["string","null"],"default":"","description":"First name of the stakeholder (null for companies)","example":"John"},"lastName":{"type":["string","null"],"default":"","description":"Last name of the stakeholder (null for companies)","example":"Doe"},"name":{"type":"string","default":"","description":"Full name of the stakeholder (null for person, company name required)","example":"Stonal"},"siren":{"type":["string","null"],"default":"","description":"SIREN number of the companies (null for persons)","example":"123456789"},"address":{"type":["string","null"],"default":"","description":"Address of the company"},"postalCode":{"type":["string","null"],"default":"","description":"Postal code of the company"},"city":{"type":["string","null"],"default":"","description":"City of the company"},"externalCode":{"type":["string","null"],"default":"","description":"External code of the company"},"contactsDetails":{"type":["array","null"],"default":"","description":"List of contact details of the stakeholder","items":{"$ref":"#/components/schemas/StakeHolderContactDetailView"}},"contracts":{"type":["array","null"],"default":"","description":"Stakeholder contracts list","items":{"$ref":"#/components/schemas/ContractLinkedView"}},"isActive":{"type":"boolean","default":false,"description":"Active status of the stakeholder"},"fax":{"type":["string","null"],"default":"","description":"Fax of the company"},"function":{"type":["string","null"],"default":"","description":"Function of the person"},"creationDate":{"type":["string","null"],"default":"","description":"Date of creation of the stakeholder","example":"2024-01-15"},"updatedAt":{"type":["string","null"],"default":"","description":"Date of last update of the stakeholder","example":"2024-11-10T14:30:00"},"stakeHolderView":{"type":"null","default":"","description":"Stakeholder details (included when the save operation is successful)"}},"required":["isActive","name","type","uid"]},"StakeHolderContactDetailView":{"type":"object","properties":{"phoneNumber":{"type":["string","null"],"default":"","description":"Phone number of the contact","example":"0123456789"},"additionalInfos":{"type":["string","null"],"default":"","description":"Additional infos of the contact","example":"Some additional infos"},"email":{"type":["string","null"],"default":"","description":"Email address required for person and company","example":"john.doe@example.com"},"creationDate":{"type":["string","null"],"default":"","description":"Date of creation of the contact","example":"2020-01-01"}}},"StakeHolderView":{"type":"object","default":null,"description":"Represents a stakeholder (person or company)","properties":{"uid":{"type":"string","format":"uuid","default":"","description":"Unique identifier of the stakeholder","example":"123e4567-e89b-12d3-a456-426614174000"},"type":{"type":"string","default":"","description":"Type of stakeholder (person or company)","example":"person"},"firstName":{"type":["string","null"],"default":"","description":"First name of the stakeholder (null for companies)","example":"John"},"lastName":{"type":["string","null"],"default":"","description":"Last name of the stakeholder (null for companies)","example":"Doe"},"name":{"type":"string","default":"","description":"Full name of the stakeholder (null for person, company name required)","example":"Stonal"},"siren":{"type":["string","null"],"default":"","description":"SIREN number of the companies (null for persons)","example":"123456789"},"address":{"type":["string","null"],"default":"","description":"Address of the company"},"postalCode":{"type":["string","null"],"default":"","description":"Postal code of the company"},"city":{"type":["string","null"],"default":"","description":"City of the company"},"externalCode":{"type":["string","null"],"default":"","description":"External code of the company"},"contactsDetails":{"type":["array","null"],"default":"","description":"List of contact details of the stakeholder","items":{"$ref":"#/components/schemas/StakeHolderContactDetailView"}},"contracts":{"type":["array","null"],"default":"","description":"Stakeholder contracts list","items":{"$ref":"#/components/schemas/ContractLinkedView"}},"isActive":{"type":"boolean","default":false,"description":"Active status of the stakeholder"},"fax":{"type":["string","null"],"default":"","description":"Fax of the company"},"function":{"type":["string","null"],"default":"","description":"Function of the person"},"creationDate":{"type":["string","null"],"default":"","description":"Date of creation of the stakeholder","example":"2024-01-15"},"updatedAt":{"type":["string","null"],"default":"","description":"Date of last update of the stakeholder","example":"2024-11-10T14:30:00"}},"required":["isActive","name","type","uid"]},"CreateStakeHolderRequestBody":{"type":"object","default":null,"description":"Request body for creating a new stakeholder","properties":{"type":{"type":"string","default":"","description":"Type of stakeholder (person or company)","example":"person"},"firstName":{"type":["string","null"],"default":"","description":"First name of the person (required for type=person)","example":"John"},"lastName":{"type":["string","null"],"default":"","description":"Last name of the person (required for type=person)","example":"Doe"},"companyName":{"type":["string","null"],"default":"","description":"Company name (required for type=company)","example":"Acme Corporation"},"siren":{"type":["string","null"],"default":"","description":"SIREN number for company (required for type=company)","example":"123456789"},"address":{"type":["string","null"],"default":"","description":"Address of the company"},"postalCode":{"type":["string","null"],"default":"","description":"Postal code of the company"},"city":{"type":["string","null"],"default":"","description":"City of the company"},"externalCode":{"type":["string","null"],"default":"","description":"External code of the company"},"contactsDetails":{"type":["array","null"],"default":"","description":"Contact details of the company","items":{"$ref":"#/components/schemas/CreateStakeholderContactDetail"}},"isActive":{"type":"boolean","default":false,"description":"Contact active status of the company or person"},"fax":{"type":["string","null"],"default":"","description":"Fax of the company"},"function":{"type":["string","null"],"default":"","description":"Function of the person"}},"required":["isActive","type"]},"CreateStakeholderContactDetail":{"type":"object","properties":{"email":{"type":["string","null"],"default":"","description":"Email address of the contact (required for type=person/company)","example":"john.doe@example.com"},"phoneNumber":{"type":["string","null"],"default":"","description":"Phone number of the contact (not required)","example":"0123456789"},"additionalInfos":{"type":["string","null"],"default":"","description":"Additional infos of the contact (not required)"}}},"CreateStakeHolderResponseBody":{"type":"object","default":null,"description":"Response body for stakeholder creation","properties":{"uid":{"type":["string","null"],"format":"uuid","default":"","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"],"default":"","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","default":null,"description":"Request body for creating a selection session","properties":{"selection":{"$ref":"#/components/schemas/SelectionData"},"context":{"$ref":"#/components/schemas/SelectionContext","default":""}},"required":["context","selection"]},"SelectionContext":{"type":"object","default":null,"description":"Context information including, among other things, base view, selectable assets, and UI options","properties":{"baseView":{"type":["array","null"],"default":"","example":[{"uid":"550e8400-e29b-41d4-a716-446655440000"}],"items":{"$ref":"#/components/schemas/SelectionContextBaseViewItem"}},"selectableAssets":{"type":["array","null"],"default":"","example":[{"type":"EQUIPMENT|.*"}],"items":{"type":"object","additionalProperties":{}}},"uiOptions":{"type":["object","null"],"additionalProperties":{},"default":"","example":{"viewAssetDetails":true}}}},"SelectionContextBaseViewItem":{"type":"object","properties":{"uid":{"type":["string","null"],"default":"","example":"550e8400-e29b-41d4-a716-446655440000"},"externalIds":{"type":["object","null"],"additionalProperties":{"type":"string"},"default":"","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"],"default":"","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","default":null,"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","default":"","description":"Unique identifier of the created selection session","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"url":{"type":"string","default":"","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","default":null,"description":"Request body for creating a new contract","properties":{"label":{"type":["string","null"],"default":"","description":"Label of the contract"},"type":{"type":["string","null"],"default":"","description":"Type of the contract","example":"LEASE or PARTIAL"},"code":{"type":["string","null"],"default":"","description":"Code of the contract"},"assets":{"type":"array","default":"","description":"Assets linked of the contract","items":{"type":"string"},"uniqueItems":true},"stakeholders":{"type":"array","default":"","description":"Stakeholders linked of the contract","items":{"type":"string"},"uniqueItems":true},"equipments":{"type":"array","default":"","description":"Equipments linked of the contract","items":{"type":"string"},"uniqueItems":true},"effectiveDate":{"type":["string","null"],"default":"","description":"Effective date of the contract","example":"2023-01-01"},"endDate":{"type":["string","null"],"default":"","description":"End date of the contract","example":"2023-01-01"}},"required":["assets","equipments","stakeholders"]},"Asset":{"type":"object","default":null,"properties":{"uid":{"type":["string","null"],"default":"","description":"Unique identifier for the asset (typically UUID)","example":"519c00c9-29b1-4e16-8ed2-61bb4a8d6249"},"externalIds":{"type":["object","null"],"additionalProperties":{"type":"string"},"default":"","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"],"default":"","description":"Type of asset","example":"BUILDING"},"name":{"type":["string","null"]},"deletedAt":{"type":["string","null"],"default":"","description":"Date when the asset was deleted. ISO 8601 format","example":"2025-11-19T16:30:00Z"},"effectiveDate":{"type":["string","null"],"default":"","description":"Date when the asset is effective. ISO 8601 format","example":"2024-11-19"},"groupedBy":{"type":["array","null"],"default":"","description":"List of all assets grouping the current asset","items":{"$ref":"#/components/schemas/AssetIds"}},"groupingAssetsToAdd":{"type":["array","null"],"default":"","description":"List of assets to add to list of assets grouping the current asset","items":{"$ref":"#/components/schemas/AssetIds"}},"groups":{"type":["array","null"],"default":"","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","default":null,"properties":{"uid":{"type":["string","null"]},"externalIds":{"type":["object","null"],"additionalProperties":{"type":"string"}},"temporaryId":{"type":["string","null"]}}},"AssetProperties":{"type":"object","default":null,"properties":{"source":{"type":["string","null"]},"simple":{"type":["object","null"],"additionalProperties":{"type":"string"}},"precise":{"type":["string","null"],"additionalProperties":{"$ref":"#/components/schemas/UpsertPublicAssetPrecisePropertiesDatum"},"default":"","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","default":null,"description":"Request for creating or updating public asset","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"]},"ignoreNonApplicableToType":{"type":["boolean","null"]}}},"ErrorInfo":{"type":"object","default":null,"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","default":"","description":"Error response entity"}}}],"description":"Failure response containing error information","required":["error"]},"IngestAssetsIssue":{"type":"object","default":null,"description":"A diagnostic about how the platform handled an input row. The asset may be persisted, possibly with reduced data.","properties":{"severity":{"type":"string","default":"","description":"Severity level of this issue","enum":["WARNING","ERROR"]},"asset":{"$ref":"#/components/schemas/AssetIds","default":"","description":"Identifiers of the affected input asset, echoed from the request"},"code":{"type":"string","default":"","description":"Stable machine-readable issue code","example":"PROPERTY_NOT_APPLICABLE_TO_TYPE"},"field":{"type":["string","null"],"default":"","description":"JSON-pointer-like path to the offending input field, when applicable","example":"properties.precise[ADDRESS]"},"message":{"type":"string","default":"","description":"Human-readable description of the issue","example":"Property 'ADDRESS' is not applicable to type 'PLAN|INDOOR'"}},"required":["asset","code","message","severity"]},"IngestAssetsSuccessResponse":{"allOf":[{"$ref":"#/components/schemas/PublicAssetResponse"},{"type":"object","properties":{"assets":{"type":"array","default":"","description":"List of ingested assets","items":{"$ref":"#/components/schemas/Asset"}},"issues":{"type":"array","default":"","description":"Diagnostics raised while processing the ingest (warnings, errors, info). Empty when there is nothing to report.","items":{"$ref":"#/components/schemas/IngestAssetsIssue"}}}}],"description":"Response containing the list of ingested assets","required":["assets","issues"]},"PublicAssetResponse":{"default":null,"description":"Base sealed class for public asset responses"},"SearchAssetDataCondition":{"type":"object","default":null,"description":"A single filter condition on property data","properties":{"op":{"type":"string","default":"","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"],"default":"","description":"Property code to filter on (leaf conditions only)","example":"ISSUES_NB"},"value":{"type":["string","null"],"default":"","description":"Comparison value (single-value operators)","example":"2"},"values":{"type":["array","null"],"default":"","description":"Comparison values (for in/notIn operators)","items":{"type":"string"}},"conditions":{"type":"null","default":"","description":"Nested conditions (for and/or group operators)"}},"required":["op"]},"SearchAssetFieldFilter":{"type":"object","default":null,"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"],"default":"","description":"Exact matching","example":["BUILDING_GROUP"],"items":{"type":"string"}},"matches":{"type":["array","null"],"default":"","description":"Regex matching","example":["EQUIPMENT\\|.*"],"items":{"type":"string"}},"notEquals":{"type":["array","null"],"default":"","description":"Exclude using exact matching","items":{"type":"string"}},"notMatches":{"type":["array","null"],"default":"","description":"Exclude using regex matching","items":{"type":"string"}}}},"SearchAssetFilters":{"type":"object","default":null,"properties":{"asset":{"oneOf":[{"$ref":"#/components/schemas/SearchAssetIds"},{"type":"null"}]},"assets":{"type":["array","null"],"default":"","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"],"default":false,"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"],"default":"","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","default":null,"properties":{"uid":{"type":["string","null"],"default":"","description":"Unique identifier for the asset (typically UUID)","example":"519c00c9-29b1-4e16-8ed2-61bb4a8d6249"},"externalIds":{"type":["object","null"],"additionalProperties":{"type":"string"},"default":"","description":"Must contains only one external system identifier","example":{"CODE":"001"}}}},"SearchAssetPaginate":{"type":"object","default":null,"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","default":null,"properties":{"simple":{"type":"array","default":"","example":["ADDRESS"],"items":{"type":"string"}}},"required":["simple"]},"SearchAssetPropertyFilter":{"type":"object","default":null,"description":"Filter assets by property data values","properties":{"conditions":{"type":"array","default":"","description":"List of conditions (implicit AND between root conditions)","items":{"$ref":"#/components/schemas/SearchAssetDataCondition"}}},"required":["conditions"]},"SearchAssetsRequest":{"type":"object","default":null,"properties":{"search":{"$ref":"#/components/schemas/SearchAssetFilters"},"paginate":{"$ref":"#/components/schemas/SearchAssetPaginate","default":"","description":"Size is set to 50 by default"},"fields":{"type":"array","default":"","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`, `groupedBy`, `effectiveDate`, `expirationDate`, `integrationDate`, `childCount`.","example":["name","type"],"items":{"type":"string"}},"properties":{"oneOf":[{"$ref":"#/components/schemas/SearchAssetProperties"},{"type":"null"}]}},"required":["fields","paginate","search"]},"SearchRepresentationsFilter":{"type":"object","default":null,"properties":{"isPresent":{"type":"boolean","default":false,"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","default":null,"properties":{"box":{"type":"null"},"outlines":{"type":["array","null"],"items":{"type":"array","items":{"$ref":"#/components/schemas/Coordinate"}}},"face":{"type":"null"},"background":{"type":["string","null"]}}},"Coordinate":{"type":"object","default":null,"properties":{"x":{"type":"number","format":"double"},"y":{"type":"number","format":"double"}},"required":["x","y"]},"SearchAssetsResponse":{"type":"object","default":null,"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"}]},"groupedBy":{"type":["array","null"],"items":{"$ref":"#/components/schemas/SearchAssetIds"}},"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"]},"childCount":{"type":["integer","null"],"format":"int64"}}},"UpdateContactDetailsRequestBody":{"type":"object","properties":{"email":{"type":["string","null"],"default":"","description":"Email address of the contact (optional)","example":"john.doe@example.com"},"phoneNumber":{"type":["string","null"],"default":"","description":"Phone number of the contact (optional)","example":"0123456789"},"additionalInfos":{"type":["string","null"],"default":"","description":"Additional infos of the contact (optional)"},"creationDate":{"type":["string","null"],"default":"","description":"Date of creation of the contact (optional)","example":"2020-01-01"}}},"UpdateStakeHolderRequestBody":{"type":"object","default":null,"description":"Request body for partially updating an existing stakeholder (HTTP PATCH)","properties":{"firstName":{"type":["string","null"],"default":"","description":"First name of the person (only for person stakeholders)","example":"John"},"lastName":{"type":["string","null"],"default":"","description":"Last name of the person (only for person stakeholders)","example":"Doe"},"companyName":{"type":["string","null"],"default":"","description":"Company name (only for company stakeholders)","example":"Acme Corporation"},"siren":{"type":["string","null"],"default":"","description":"SIREN number (only for company stakeholders)","example":"123456789"},"address":{"type":["string","null"],"default":"","description":"Address of the company"},"postalCode":{"type":["string","null"],"default":"","description":"Postal code of the company"},"city":{"type":["string","null"],"default":"","description":"City of the company"},"externalCode":{"type":["string","null"],"default":"","description":"External code of the company"},"contactsDetails":{"type":["array","null"],"default":"","description":"Contact details list. If present, it REPLACES the existing list.","items":{"$ref":"#/components/schemas/UpdateContactDetailsRequestBody"}},"isActive":{"type":["boolean","null"],"default":false,"description":"Active flag. If present, it updates the current value.","example":true},"fax":{"type":["string","null"],"default":"","description":"Fax of the company"},"function":{"type":["string","null"],"default":"","description":"Function of the person"}}},"ContractUpdateRequest":{"type":"object","default":null,"description":"Request body for updating a contract","properties":{"contractCode":{"type":"string","default":"","description":"Code of the contract"},"assets":{"type":["array","null"],"default":"","description":"Assets linked of the contract","items":{"type":"string"},"uniqueItems":true},"stakeholders":{"type":["array","null"],"default":"","description":"Stakeholders linked of the contract","items":{"type":"string"},"uniqueItems":true},"equipments":{"type":["array","null"],"default":"","description":"Equipments linked of the contract","items":{"type":"string"},"uniqueItems":true},"effectiveDate":{"type":["string","null"],"default":"","description":"Effective date of the contract","example":"2023-01-01"},"endDate":{"type":["string","null"],"default":"","description":"End date of the contract","example":"2023-01-01"},"terminationDate":{"type":["string","null"],"default":"","description":"Termination date of the contract","example":"2023-01-01"},"label":{"type":["string","null"],"default":"","description":"Label of the contract"},"type":{"type":["string","null"],"default":"","description":"Type of the contract","example":"LEASE or PARTIAL"}},"required":["contractCode"]},"PageRequested":{"type":"object","default":null,"description":"Information about the requested page in paginated responses","properties":{"page":{"type":"integer","format":"int32","default":"","description":"Page number (zero-based)","example":0},"size":{"type":"integer","format":"int32","default":"","description":"Number of items per page","example":10},"sort":{"type":["string","null"],"default":"","description":"Field used for sorting","example":"name"},"direction":{"type":["string","null"],"default":"","description":"Sort direction (ASC or DESC)","example":"ASC"}},"required":["page","size"]},"SearchStakeHolderResponseBody":{"type":"object","default":null,"description":"Response body for stakeholder search operations","properties":{"error":{"type":["string","null"],"default":"","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"],"default":"","description":"Collection of stakeholders matching the search criteria","items":{"$ref":"#/components/schemas/StakeHolderView"}},"total":{"type":["integer","null"],"format":"int64","default":"","description":"Total number of stakeholders matching the search criteria","example":42},"totalPages":{"type":["integer","null"],"format":"int32","default":"","description":"Total number of pages available","example":5},"pageRequested":{"oneOf":[{"$ref":"#/components/schemas/PageRequested"},{"type":"null"}]}}},"GetSelectionSessionResponse":{"type":"object","default":null,"description":"Response for getting a selection session containing its selection data and context","properties":{"selection":{"$ref":"#/components/schemas/SelectionData","default":"","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":{},"default":"","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","default":null,"description":"Response containing the details of selected assets in a selection session","properties":{"assets":{"type":"array","default":"","description":"List of selected asset details with their name and level information","items":{"$ref":"#/components/schemas/SelectionSessionAssetDetails"}}},"required":["assets"]},"SelectionSessionAssetDetails":{"type":"object","default":null,"description":"Details of a selected asset including its level ancestor","properties":{"uid":{"type":"string","default":"","description":"Stonal identifier of the asset","example":"550e8400-e29b-41d4-a716-446655440001"},"name":{"type":"string","default":"","description":"Name of the asset","example":"A101"},"levelUid":{"type":["string","null"],"default":"","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","default":null,"description":"Response containing SVG plan representation","properties":{"svg":{"type":"string","default":"","description":"SVG content as a string","example":"<svg xmlns='http://www.w3.org/2000/svg'>...</svg>"}},"required":["svg"]},"DepositView":{"type":"object","default":null,"description":"Deposit information","properties":{"organizationCode":{"type":"string","default":"","description":"Organization code","example":"ORG123"},"code":{"type":"string","default":"","description":"Deposit code","example":"DEP456"},"nature":{"type":"string","default":"","description":"Nature of the deposit","example":"BANKING"},"contractCode":{"type":"string","default":"","description":"Code of the contract this deposit belongs to","example":"CONT456"},"initialAmount":{"type":"number","format":"double","default":"","description":"Initial deposit amount","example":1200.0},"updatedAmount":{"type":["number","null"],"format":"double","default":"","description":"Updated deposit amount","example":1250.0},"numberOfMonthsOfRent":{"type":["integer","null"],"format":"int32","default":"","description":"Number of months of rent the deposit represents","example":3},"integrationDate":{"type":"string","format":"date-time","default":"","description":"Date when the deposit was integrated into the system"}},"required":["code","contractCode","initialAmount","integrationDate","nature","organizationCode"]},"DepositsGetResultResponse":{"type":"object","default":null,"description":"Response wrapping a paginated list of deposits","properties":{"data":{"type":"array","default":"","description":"List of deposits","items":{"$ref":"#/components/schemas/DepositView"}},"paginate":{"$ref":"#/components/schemas/SearchAssetPaginate","default":"","description":"Pagination information. The `cursor` field is `null` when iteration has reached the end."}},"required":["data","paginate"]},"ContractAssetView":{"type":"object","default":null,"description":"Asset associated with a contract","properties":{"assetErpCode":{"type":"string","default":"","description":"ERP code of the asset","example":"ERP123"},"assetCode":{"type":"string","default":"","deprecated":true,"description":"Asset code (deprecated, use assetErpCode instead)","example":"ERP123"},"area":{"type":["number","null"],"format":"double","default":"","description":"Area of the asset in square meters","example":150.5},"effectiveDate":{"type":"string","default":"","description":"Date when the asset was added to the contract","example":"2023-01-01"},"expirationDate":{"type":"string","default":"","description":"Date when the asset will be removed from the contract","example":"2025-12-31"},"initialRent":{"type":["number","null"],"format":"double","default":"","description":"Initial rent amount","example":1200.0},"actualRent":{"type":["number","null"],"format":"double","default":"","description":"Current rent amount","example":1250.0},"stonalIdentifier":{"type":["string","null"],"default":"","description":"Stonal identifier of the asset"}},"required":["assetCode","assetErpCode","effectiveDate","expirationDate"]},"ContractView":{"type":"object","default":null,"description":"Contract information","properties":{"organizationCode":{"type":"string","default":"","description":"Organization code","example":"ORG123"},"code":{"type":"string","default":"","description":"Contract code","example":"CONT456"},"contractType":{"$ref":"#/components/schemas/HolderTypeView","default":"","description":"Type of contract"},"stakeholders":{"type":"array","default":"","description":"List of stakeholders involved in the contract","items":{"$ref":"#/components/schemas/StakeholderView"}},"effectiveDate":{"type":["string","null"],"format":"date","default":"","description":"Date when the contract becomes effective"},"endDate":{"type":["string","null"],"format":"date","default":"","description":"End date of the contract"},"terminationDate":{"type":["string","null"],"format":"date","default":"","description":"Termination date if contract was terminated early"},"deadlines":{"type":"array","default":"","description":"Important deadlines in the contract lifecycle","items":{"$ref":"#/components/schemas/DeadlineView"}},"assets":{"type":"array","default":"","description":"Assets associated with this contract","items":{"$ref":"#/components/schemas/ContractAssetView"}},"integrationDate":{"type":["string","null"],"format":"date-time","default":"","description":"Date when contract was integrated into the system"},"label":{"type":["string","null"],"default":"","description":"Label of the contract"},"equipments":{"type":"array","default":"","description":"List of equipments linked to the contract","items":{"$ref":"#/components/schemas/EquipmentView"}},"notice":{"type":["integer","null"],"format":"int32","default":"","description":"Notice period in months"},"data":{"type":["object","null"],"additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/DataView"}},"default":"","description":"Property data values for the contract, keyed by property code. Populated only when `?include=data` is set on the request."}},"required":["assets","code","contractType","deadlines","equipments","organizationCode","stakeholders"]},"ContractsGetResultResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ContractView"}},"paginate":{"$ref":"#/components/schemas/SearchAssetPaginate"}},"required":["data","paginate"]},"DataView":{"type":"object","default":null,"description":"Data value information","properties":{"organizationCode":{"type":"string","default":"","description":"Organization code","example":"ORG123"},"propertyCode":{"type":"string","default":"","description":"Property code","example":"SURFACE"},"value":{"type":"null","default":"","description":"Data value (type depends on the property)","example":150.5},"rawValue":{"type":"string","default":"","description":"Raw string representation of the value","example":"150.5"},"holderCode":{"type":"string","default":"","description":"Holder code","example":"ASSET456"},"holderType":{"type":"string","default":"","description":"Type of holder","enum":["ASSET","LEASE","CONTRACT","PARTIAL","UNKNOWN"],"example":"BUILDING"},"source":{"$ref":"#/components/schemas/SourceView","default":"","description":"Source information"},"interval":{"$ref":"#/components/schemas/IntervalView","default":"","description":"Validity interval of the data"},"id":{"type":"integer","format":"int64","default":"","description":"Unique identifier of the data","example":42}},"required":["holderCode","holderType","id","interval","organizationCode","propertyCode","rawValue","source"]},"DeadlineView":{"type":"object","default":null,"description":"A deadline in the contract","properties":{"value":{"type":"string","format":"date","default":"","description":"The deadline date"}},"required":["value"]},"EquipmentView":{"type":"object","default":null,"description":"Equipment linked to a contract","properties":{"code":{"type":"string","default":"","description":"Equipment code","example":"EQUIPMENT"},"names":{"type":"array","default":"","description":"List of names for the equipment","items":{"$ref":"#/components/schemas/HolderTypeNameView"}}},"required":["code","names"]},"HolderTypeNameView":{"type":"object","default":null,"description":"Localized name information for a holder type","properties":{"singular":{"type":"string","default":"","description":"Singular form of the name","example":"Building"},"plural":{"type":"string","default":"","description":"Plural form of the name","example":"Buildings"},"language":{"type":"string","default":"","description":"Language code","example":"en"}},"required":["language","plural","singular"]},"HolderTypeView":{"type":"object","default":null,"description":"Holder type information","properties":{"organizationCode":{"type":"string","default":"","description":"Organization code","example":"ORG123"},"code":{"type":"string","default":"","description":"Code of the holder type","example":"BUILDING"},"type":{"type":"string","default":"","description":"Type category","example":"ASSET"},"nature":{"type":["string","null"],"default":"","description":"Nature of the holder type (PHYSICAL, LOGICAL, PROPERTY_DYNAMIC)","example":"PHYSICAL"},"equipmentDestination":{"type":["string","null"],"default":"","description":"Equipment destination classification","example":"WALL"},"names":{"type":"array","default":"","description":"Localized names for this holder type","items":{"$ref":"#/components/schemas/HolderTypeNameView"}},"numberOfAssets":{"type":["integer","null"],"format":"int32","default":"","description":"Number of assets of this holder type","example":42},"importErrors":{"oneOf":[{"$ref":"#/components/schemas/ImportErrors"},{"type":"null"}]},"recommendedPropertyCodes":{"type":"array","default":"","description":"Codes of properties recommended for this holder type","example":["PROP_AREA","PROP_HEIGHT"],"items":{"type":"string"}},"mandatoryPropertyCodes":{"type":"array","default":"","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","default":null,"description":"Information about import errors","properties":{"duplicates":{"type":"integer","format":"int32","default":"","description":"Number of duplicate entries","example":0},"others":{"type":"integer","format":"int32","default":"","description":"Number of other errors","example":0}},"required":["duplicates","others"]},"IntervalView":{"type":"object","default":null,"description":"Time interval of data validity","properties":{"effectiveDate":{"type":"string","format":"date","default":"","description":"Date when the data becomes valid"},"expirationDate":{"type":"string","format":"date","default":"","description":"Date when the data ceases to be valid"}},"required":["effectiveDate","expirationDate"]},"SourceView":{"type":"object","default":null,"description":"Source information for data","properties":{"details":{"type":"string","default":"","description":"Source details","example":"Manually entered"},"type":{"type":"string","default":"","description":"Source type","example":"USER"},"value":{"type":"string","default":"","description":"Source value","example":"Manually entered"},"sourceDocumentUid":{"type":["string","null"],"default":"","description":"Source document id when applicable (DOCUMENT)","example":"185b19bd-cd1c-45ed-8f92-6b1641c72d0c"}},"required":["details","type","value"]},"StakeholderView":{"type":"object","default":null,"description":"Information about a contract stakeholder","properties":{"name":{"type":"string","default":"","description":"Name of the stakeholder","example":"Acme Corporation"},"code":{"type":"string","default":"","description":"Code identifying the stakeholder","example":"STK789"},"uid":{"type":["string","null"],"default":"","description":"Unique identifier of the stakeholder","example":"33333333-3333-3333-3333-333333333333"},"externalCode":{"type":["string","null"],"default":"","description":"External code of the stakeholder","example":"EXT123"}},"required":["code","name"]},"PublicAssetTypeNameResponse":{"type":"object","default":null,"description":"Name of the asset type","properties":{"singular":{"type":"string","default":"","description":"Singular name of the asset type"},"plural":{"type":"string","default":"","description":"Plural name of the asset type"},"language":{"type":"string","default":"","description":"Language of the asset type names"}},"required":["language","plural","singular"]},"PublicAssetTypeResponse":{"type":"object","default":null,"description":"Asset type","properties":{"code":{"type":"string","default":"","description":"Code of the asset type"},"nature":{"type":["string","null"],"default":"","description":"Natuer of the asset type"},"names":{"type":"array","default":"","description":"List of names of the asset type","items":{"$ref":"#/components/schemas/PublicAssetTypeNameResponse"}}},"required":["code","names"]},"PublicAssetTypesResponse":{"type":"object","default":null,"description":"List of asset types","properties":{"assetTypes":{"type":"array","items":{"$ref":"#/components/schemas/PublicAssetTypeResponse"}}},"required":["assetTypes"]},"PublicPropertiesResponse":{"type":"object","default":null,"description":"List of properties for an organization","properties":{"properties":{"type":"array","items":{"$ref":"#/components/schemas/PublicPropertyResponse"}}},"required":["properties"]},"PublicPropertyResponse":{"type":"object","default":null,"description":"Property for an organization","properties":{"code":{"type":"string","default":"","description":"Code of property for an organization"},"name":{"type":"string","default":"","description":"Name of property for an organization"},"type":{"type":"string","default":"","description":"Type of property for an organization"},"temporality":{"type":"string","default":"","description":"Temporality of property for an organization"},"description":{"type":["string","null"],"default":"","description":"Description of property for an organization"},"assetTypes":{"type":"array","default":"","description":"Asset types of property for an organization","items":{"type":"string"}},"defaultUnit":{"type":["string","null"],"default":"","description":"Default unit of property for an organization"},"enumValues":{"type":["array","null"],"default":"","description":"Enum values of property for an organization","items":{"type":"string"}},"aliases":{"type":"array","default":"","description":"Aliases supported for this property","items":{"type":"string"}}},"required":["aliases","assetTypes","code","name","temporality","type"]},"AmendmentView":{"type":"object","default":null,"description":"Public view of an amendment exposed by the listing API","properties":{"organizationCode":{"type":"string","default":"","description":"Organization code that owns this amendment","example":"ORGA"},"code":{"type":"string","default":"","description":"Amendment business code (natural ID inside the organization)","example":"A1"},"contractCode":{"type":"string","default":"","description":"Business code of the contract this amendment applies to","example":"L1"},"effectiveDate":{"type":"string","format":"date","default":"","description":"Date on which the amendment takes effect","example":"2024-01-01"},"amendmentType":{"type":"string","default":"","description":"Type of the amendment (see AmendmentType enum). Unknown values from upstream are mapped to UNKNOWN.","example":"INFORMATION"},"name":{"type":["string","null"],"default":"","description":"Human-readable label for the amendment","example":"Renewal 2024"},"rentEvolution":{"type":["number","null"],"format":"double","default":"","description":"Variation of rent introduced by the amendment, when applicable","example":12.34},"areaEvolution":{"type":["number","null"],"format":"double","default":"","description":"Variation of area introduced by the amendment, when applicable","example":5.5},"signatureDate":{"type":["string","null"],"format":"date","default":"","description":"Date on which the amendment was signed","example":"2023-12-15"},"integrationDate":{"type":"string","format":"date-time","default":"","description":"Server-side timestamp recorded when the amendment was integrated","example":"2024-01-02T08:30:00"}},"required":["amendmentType","code","contractCode","effectiveDate","integrationDate","organizationCode"]},"AmendmentsGetResultResponse":{"type":"object","default":null,"description":"Paginated list of amendments for an organization","properties":{"data":{"type":"array","default":"","description":"Page of amendments, ordered by ascending internal id","items":{"$ref":"#/components/schemas/AmendmentView"}},"paginate":{"$ref":"#/components/schemas/SearchAssetPaginate","default":"","description":"Pagination envelope; cursor is null when iteration is complete"}},"required":["data","paginate"]}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}}}