{"openapi":"3.1.0","info":{"description":"Welcome to Stonal® API. We provide real estate data for housing and tertiary business. The document below covers how to use our API. Let us know if you any questions.","title":"API Consumption","version":"1.0"},"servers":[{"url":"https://api.stonal.io","description":"Generated server url"}],"tags":[{"description":"API to read data from Stonal","name":"2. API Version 1"},{"description":"API to get a token for Swagger UI usage","name":"1. Get token for Swagger"},{"description":"API to interact with data of Stonal","name":"6. API Version 5"}],"paths":{"/swagger/auth/token":{"post":{"operationId":"getAccessToken","parameters":[{"description":"Type of OAuth flow. Use password in doubt.","example":"password","in":"query","name":"grant_type","required":true,"schema":{"type":"string","default":"password"}},{"description":"Username","example":"username@stonal.com","in":"query","name":"username","required":true,"schema":{"type":"string"}},{"description":"Password","example":"mypassword","in":"query","name":"password","required":true,"schema":{"type":"string"}},{"description":"OAuth client ID","example":"myclient","in":"query","name":"clientId","required":true,"schema":{"type":"string"}},{"description":"OAuth client secret","example":"mysecret","in":"query","name":"clientSecret","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessToken"}}},"description":"Successfully retrieved"}},"summary":"Get an access token to use for Swagger UI","tags":["1. Get token for Swagger"]}},"/v1/organizations/{organizationCode}/users":{"post":{"description":"    Create a new user.\n\n    To create a new user, you should get informations first in order to be able to provide all necessary information:\n    - profiles via GET /v1/organizations/{organizationCode}/users/profiles\n    - companies via GET /v1/organizations/{organizationCode}/users/companies\n    - authorizations via GET /v1/organizations/{organizationCode}/users/authorizations\n    - permissions via GET /v1/organizations/{organizationCode}/users/permissions\n","operationId":"create","parameters":[{"description":"Code of client","example":"STONAL","in":"path","name":"organizationCode","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{}},"description":"User has been created"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleMessage"}}},"description":"User creation seems to have been done but cannot be confirmed because user could not be found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleMessage"}}},"description":"User creation cannot be done because user already exists"}},"security":[{"passwordflow":[]}],"summary":"Create a new user","tags":["2. API Version 1"]}},"/v1/organizations/{organizationCode}/users/authorizations":{"get":{"operationId":"findAllAuthorizationsBy","parameters":[{"description":"Code of client","example":"STONAL","in":"path","name":"organizationCode","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyPageResultAuthorizationView"}}},"description":"OK"}},"security":[{"passwordflow":[]}],"summary":"List all authorizations available for users","tags":["2. API Version 1"]}},"/v1/organizations/{organizationCode}/users/companies":{"get":{"operationId":"findAllCompaniesBy","parameters":[{"description":"Code of client","example":"STONAL","in":"path","name":"organizationCode","required":true,"schema":{"type":"string"}},{"description":"page requested (if we cannot retrieve all companies at once)","example":0,"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32"}},{"description":"size for page requested (if we cannot retrieve all companies at once)","example":100,"in":"query","name":"size","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyPageResultString"}}},"description":"OK"}},"security":[{"passwordflow":[]}],"summary":"List all companies available for users","tags":["2. API Version 1"]}},"/v1/organizations/{organizationCode}/users/groups":{"get":{"operationId":"findAllGroupsBy","parameters":[{"description":"Code of client","example":"STONAL","in":"path","name":"organizationCode","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GroupView"}}}},"description":"OK"}},"security":[{"passwordflow":[]}],"summary":"List all groups available for users","tags":["2. API Version 1"]}},"/v1/organizations/{organizationCode}/users/permissions":{"get":{"operationId":"findAllPermissionsBy","parameters":[{"description":"Code of client","example":"STONAL","in":"path","name":"organizationCode","required":true,"schema":{"type":"string"}},{"description":"Permission type","example":"ASSET","in":"query","name":"type","required":false,"schema":{"type":"string"}},{"description":"Permission sub type","example":"PORTFOLIO","in":"query","name":"subType","required":false,"schema":{"type":"string"}},{"description":"Search query on label","example":"Alpha","in":"query","name":"q","required":false,"schema":{"type":"string"}},{"description":"Page requested","example":1,"in":"query","name":"pageNumber","required":true,"schema":{"type":"integer","format":"int32"}},{"description":"Size for page requested","example":100,"in":"query","name":"pageSize","required":true,"schema":{"type":"integer","format":"int32"}},{"description":"Sort field to apply on the results","example":"label","in":"query","name":"sortField","required":false,"schema":{"type":"string"}},{"description":"Sort order to apply on the results","example":"asc","in":"query","name":"sortOrder","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResultPermissionView"}}},"description":"OK"}},"security":[{"passwordflow":[]}],"summary":"List all permissions available for users","tags":["2. API Version 1"]}},"/v1/organizations/{organizationCode}/users/profiles":{"get":{"operationId":"findAllProfilesBy","parameters":[{"description":"Code of client","example":"STONAL","in":"path","name":"organizationCode","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/LegacyPageResultString"}}},"description":"OK"}},"security":[{"passwordflow":[]}],"summary":"List all profiles available for users","tags":["2. API Version 1"]}},"/v1/organizations/{organizationCode}/users/search":{"post":{"description":"    Search users by various filters.\n","operationId":"searchUserOnOrganization","parameters":[{"description":"Code of client","example":"STONAL","in":"path","name":"organizationCode","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUserRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyPageResultSearchUser"}}},"description":"OK"}},"security":[{"passwordflow":[]}],"summary":"Search users","tags":["2. API Version 1"]}},"/v1/organizations/{organizationCode}/users/{id}":{"delete":{"description":"    Delete an existing user.\n","operationId":"delete","parameters":[{"description":"Code of client","example":"STONAL","in":"path","name":"organizationCode","required":true,"schema":{"type":"string"}},{"description":"Id of user","example":123456789,"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"content":{"application/json":{}},"description":"User has been deleted"},"404":{"content":{"application/json":{}},"description":"User to delete does not exists"}},"security":[{"passwordflow":[]}],"summary":"Delete an existing user","tags":["2. API Version 1"]},"get":{"operationId":"findByOrganizationCodeAndId","parameters":[{"description":"Code of client","example":"STONAL","in":"path","name":"organizationCode","required":true,"schema":{"type":"string"}},{"description":"Id of user","example":123456789,"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"description":"User found"},"404":{"content":{"application/json":{}},"description":"Not found"}},"security":[{"passwordflow":[]}],"summary":"Get a user by its id","tags":["2. API Version 1"]},"put":{"description":"    Update an existing user.\n\n    To update an existing user, you should get informations first in order to be able to provide all necessary information:\n    - profiles via GET /v1/organizations/{organizationCode}/users/profiles\n    - companies via GET /v1/organizations/{organizationCode}/users/companies\n    - authorizations via GET /v1/organizations/{organizationCode}/users/authorizations\n    - permissions via GET /v1/organizations/{organizationCode}/users/permissions\n","operationId":"update","parameters":[{"description":"Code of client","example":"STONAL","in":"path","name":"organizationCode","required":true,"schema":{"type":"string"}},{"description":"Id of user","example":123456789,"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequest"}}},"required":true},"responses":{"204":{"content":{"application/json":{}},"description":"User has been updated"},"404":{"content":{"application/json":{}},"description":"User to update does not exists"}},"security":[{"passwordflow":[]}],"summary":"Update an existing user","tags":["2. API Version 1"]}},"/v5/organizations/{organizationCode}/assets/{assetIdentifier}/documents":{"put":{"operationId":"validateDocumentsClassification","parameters":[{"description":"code of the organization","example":"STONAL","in":"path","name":"organizationCode","required":true,"schema":{"type":"string"}},{"description":"asset identifier","example":"aaaa-bbbb-cccc-dddd","in":"path","name":"assetIdentifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RemoteValidateDocumentClassificationAndFolderView"}}}},"required":true},"responses":{"200":{"description":"Successfully done"}},"security":[{"passwordflow":[]}],"summary":"Validate documents classification","tags":["6. API Version 5"]}},"/v5/organizations/{organizationCode}/documents/search":{"post":{"operationId":"findBy","parameters":[{"description":"Code of client","example":"STONAL","in":"path","name":"organizationCode","required":true,"schema":{"type":"string"}},{"description":"Page number from which the search will start","example":3,"in":"query","name":"pageNumber","required":false,"schema":{"type":"integer","format":"int64","default":0}},{"description":"Page size of documents to be requested","example":10,"in":"query","name":"pageSize","required":false,"schema":{"type":"integer","format":"int64","default":10}},{"description":"Column to sort","example":"name","in":"query","name":"columnToSort","required":false,"schema":{"type":"string"}},{"description":"Sort order","example":"ASCENDING","in":"query","name":"sortOrder","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteDocumentSearchFilters"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteDocumentView"}}},"description":"Successfully retrieved"}},"security":[{"passwordflow":[]}],"summary":"Search for documents","tags":["6. API Version 5"]}},"/v5/organizations/{organizationCode}/documents/{documentIdentifier}":{"delete":{"operationId":"deleteDocument","parameters":[{"description":"Code of client","example":"STONAL","in":"path","name":"organizationCode","required":true,"schema":{"type":"string"}},{"description":"Document id","example":"aaaa-bbbb-cccc-dddd","in":"path","name":"documentIdentifier","required":true,"schema":{"type":"string"}},{"description":"Documentation id","example":"aaaa-bbbb-cccc-dddd","in":"query","name":"documentationIdentifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully deleted"}},"security":[{"passwordflow":[]}],"summary":"This is a soft delete of a document, the document will be marked as deleted but not removed from the storage.","tags":["6. API Version 5"]}},"/v5/organizations/{organizationCode}/documents/{documentIdentifier}/files":{"get":{"operationId":"downloadFile","parameters":[{"description":"Code of client","example":"STONAL","in":"path","name":"organizationCode","required":true,"schema":{"type":"string"}},{"description":"Documentation id","example":"aaaa-bbbb-cccc-dddd","in":"path","name":"documentIdentifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"type":"string","format":"byte"}},"application/pdf":{"schema":{"type":"string","format":"byte"}},"image/jpeg":{"schema":{"type":"string","format":"byte"}},"image/png":{"schema":{"type":"string","format":"byte"}}},"description":"Successfully retrieved"}},"security":[{"passwordflow":[]}],"summary":"Get a file from a document","tags":["6. API Version 5"]}},"/v5/organizations/{organizationCode}/files":{"post":{"operationId":"uploadFile","parameters":[{"description":"Code of client","example":"STONAL","in":"path","name":"organizationCode","required":true,"schema":{"type":"string"}},{"description":"Asset id to link files to","example":"aaaa-bbbb-cccc-ddd","in":"query","name":"assetIdentifier","required":false,"schema":{"type":"string"}},{"description":"Documentation id to link files to","example":"aaaa-bbbb-cccc-ddd","in":"query","name":"documentationIdentifier","required":false,"schema":{"type":"string"}},{"description":"Folder id to put files in","example":"aaaa-bbbb-cccc-ddd","in":"query","name":"destinationFolder","required":false,"schema":{"type":"string"}},{"description":"Tags to add","example":["PHOTO","TEST"],"in":"query","name":"tags","required":false,"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}],"requestBody":{"content":{"multipart/form-data":{"encoding":{"files":{"contentType":"multipart/form-data"}},"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"File to upload"},"files":{"type":"array","description":"Files to upload","items":{"type":"string","format":"binary"}}}}}}},"responses":{"200":{"description":"Successfully retrieved"}},"security":[{"passwordflow":[]}],"summary":"Upload documents","tags":["6. API Version 5"]}}},"components":{"schemas":{"AccessToken":{"type":"object","properties":{"access_token":{"type":"string"},"expires_in":{"type":"integer","format":"int32"},"refresh_expires_in":{"type":"integer","format":"int32"},"refresh_token":{"type":"string"},"scope":{"type":"string"},"token_type":{"type":"string"}}},"AssetAuthorization":{"type":"object","properties":{"all":{"type":"boolean","description":"Indicate whether the user has access to all assets or not. If true, the user has access to all assets (codes is ignored).","example":true},"codes":{"type":"array","items":{"type":"string","description":"    If all is false, the user has access to the assets listed in codes.\n\n    If empty, the user has no access to any asset except those coming from its company.\n","example":"['S01', 'B01']"}}}},"Authorization":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/AssetAuthorization","description":"Information about the user asset authorization. It contains the list of determined assets the user can access."},"modelId":{"type":"string","description":"    Identifier of authorization model to apply on user.\n\n    The authorization model is mostly used for determining services scope that user is allowed to use.\n","example":"2b2e8a4b-bfbd-4c56-b8d6-c8cb1d8c58ba"},"profile":{"type":"string","description":"Information about the user profile.\n\nIt can be Developer, Admin, etc.\n\nCurrently, profile is only used for information purpose and does not have any impact on the user rights.\n","example":"Developer"}}},"AuthorizationView":{"type":"object","properties":{"applications":{"type":"array","description":"List of applications that the user can use with this authorization model.","example":["STONAL"],"items":{"type":"string"}},"description":{"type":"string","description":"Describe what a user can use with this authorization model.","example":"Administrator can use all platform services"},"id":{"type":"string","description":"identifier of an authorization model that can be apply on a user","example":"0a0e6591-2e72-4ae5-a8de-64e86efdb696"},"name":{"type":"string","description":"Name of the authorization model","example":"Administrator"}}},"CreateUserRequest":{"type":"object","properties":{"authorization":{"$ref":"#/components/schemas/Authorization","description":"    Information about the user authorization.\n\n    It contains the profile of the user, the authorization model to apply and the asset authorization.\n"},"company":{"type":"string","description":"    Name of the company the user is working for.\n\n    As the company is a mandatory field, it is not possible to create a user without a company.\n    Also notice that as the company can access specific assets, the user will be able to access them too.\n","example":"corp","minLength":1},"email":{"type":"string","format":"email","description":"Email of the user to create.\n\nIt is used as the username for our users in order to sign in our platform.\n\nSo it must be unique and valid.\n","example":"firstName.lastName@corp.com","minLength":1},"firstName":{"type":"string","description":"First name of the user to create","example":"firstName","minLength":1},"fromExternalIdp":{"type":"boolean","description":"    If the user sign in from an external identity provider, it should be set to true.\n\n    This is useful to know if the identity is handled externally.\n    In this case, the user will not have any password because the user needs to sign in from it identity\n    provider to use Stonal platform.\n","example":false},"groupUids":{"type":"array","description":"    List of group uids to apply to the user.\n\n    Available groups uids can be retrieved from the Stonal platform API via the GET /v1/organizations/{organizationCode}/users/groups endpoint.\n","example":["0192d7b7-2994-7ad5-9952-26862f33c21a","0192d7b7-7073-7e58-896c-07113f22363a"],"items":{"type":"string"}},"lastName":{"type":"string","description":"Last name of the user to create","example":"lastName","minLength":1},"permissionUids":{"type":"array","description":"    List of permission uids to apply to the user.\n\n    Available permissions uids can be retrieved from the Stonal platform API via the GET /v1/organizations/{organizationCode}/users/permissions endpoint.\n","example":["0192d7b7-2994-7ad5-9952-26862f33c21a","0192d7b7-7073-7e58-896c-07113f22363a"],"items":{"type":"string"}}},"required":["authorization","company","email","firstName","lastName","permissionUids"]},"GroupView":{"type":"object","properties":{"name":{"type":"string","description":"Human readable label of the group","example":"ASSET"},"uid":{"type":"string","description":"Identifier of a group that can be assigned to a user","example":"0a0e6591-2e72-4ae5-a8de-64e86efdb696"}}},"LegacyPageResultAuthorizationView":{"type":"object","properties":{"pageable":{"$ref":"#/components/schemas/LegacyPageable"},"result":{"type":"array","items":{"$ref":"#/components/schemas/AuthorizationView"},"uniqueItems":true},"total":{"type":"integer","format":"int64","description":"It is the total number of elements that can be retrieved from the result.","example":10000}}},"LegacyPageResultSearchUser":{"type":"object","properties":{"pageable":{"$ref":"#/components/schemas/LegacyPageable"},"result":{"type":"array","items":{"$ref":"#/components/schemas/SearchUser"},"uniqueItems":true},"total":{"type":"integer","format":"int64","description":"It is the total number of elements that can be retrieved from the result.","example":10000}}},"LegacyPageResultString":{"type":"object","properties":{"pageable":{"$ref":"#/components/schemas/LegacyPageable"},"result":{"type":"array","items":{"type":"string"},"uniqueItems":true},"total":{"type":"integer","format":"int64","description":"It is the total number of elements that can be retrieved from the result.","example":10000}}},"LegacyPageable":{"type":"object","properties":{"offset":{"type":"integer","format":"int64","description":"The offset of the first element to return.\n\nIt is used to paginate the result.\nThe first element is at the position 0 and when we want to get the next page, we need to set the offset to the\nposition of the last element of the previous page which is related to the size of the page.\n","example":0},"size":{"type":"integer","format":"int64","description":"    The number of elements to return.\n\n    It is used to paginate the result.\n    It is the number of elements we want to get from the offset.\n","example":10},"sort":{"$ref":"#/components/schemas/Sort","description":"    The sort to apply on the result.\n\n    It is used to sort the result.\n    It is a map of fields to sort and the direction of the sort.\n"}}},"PageResultPermissionView":{"type":"object","properties":{"pageable":{"$ref":"#/components/schemas/Pageable"},"result":{"type":"array","items":{"$ref":"#/components/schemas/PermissionView"}},"total":{"type":"integer","format":"int64","description":"It is the total number of elements that can be retrieved from the result.","example":10000}}},"Pageable":{"type":"object","properties":{"pageNumber":{"type":"integer","format":"int64","description":"The number of the page. It starts at 0;\n","example":0},"size":{"type":"integer","format":"int64","description":"    The number of elements to return.\n\n    It is used to paginate the result.\n    It is the number of elements we want to get from the offset.\n","example":10},"sort":{"$ref":"#/components/schemas/Sort","description":"    The sort to apply on the result.\n\n    It is used to sort the result.\n    It is a map of fields to sort and the direction of the sort.\n"}}},"PermissionView":{"type":"object","properties":{"code":{"type":"string","description":"Stonal technical identifier of the resource represented by the permission","example":"0a0e6591-2e72-4ae5-a8de-64e86efdb696"},"label":{"type":"string","description":"Human readable label of the permission of the resource represented by the permission","example":"Portefeuille Alpha"},"subType":{"type":"string","description":"Resource sub type of the permission","example":"PORTFOLIO","examples":["BUILDING","BUILDING_GROUP","FACILITY","PORTFOLIO"]},"type":{"type":"string","description":"Resource type of the permission","example":"ASSET"},"uid":{"type":"string","description":"Identifier of a permission that can be applied on a user","example":"0a0e6591-2e72-4ae5-a8de-64e86efdb696"}}},"RemoteDocumentClassView":{"type":"object","properties":{"documentClassCode":{"type":"string","description":"Class code of the document.","example":"DPE"},"documentClassIdentifier":{"type":"string","description":"Unique identifier of the class.","example":"aaaa-bbbb-cccc-dddd"},"documentClassNames":{"type":"array","description":"Names of the class","example":[{"language":"fr","name":"Dossier de diagnostic de performance énergétique"}],"items":{"$ref":"#/components/schemas/RemoteLocalisedNameView"},"uniqueItems":true}}},"RemoteDocumentFolderView":{"type":"object","properties":{"identifier":{"type":"string","description":"Unique identifier of a folder.","example":"aaaa-bbbb-cccc-dddd"},"names":{"type":"array","description":"Names of the folder in different languages.","example":"[{language: 'fr', name: 'Nom'}, {language: 'en', name: 'Name'}]","items":{"$ref":"#/components/schemas/RemoteLocalisedNameView"},"uniqueItems":true}}},"RemoteDocumentReferenceView":{"type":"object","properties":{"documentationIdentifier":{"type":"string","description":"If the reference is in a documentation, it is the identifier of the documentation.","example":"aaaa-bbbb-cccc-dddd"},"entityIdentifier":{"type":"string","description":"Identifier of the targeted reference.","example":"aaaa-bbbb-cccc-dddd"},"folder":{"$ref":"#/components/schemas/RemoteDocumentFolderView"},"referencedEntityType":{"type":"string","description":"As a document can be in different location called \"references\", this field indicates the type of the reference like ASSET, ORGANIZATION, CONTRACT","example":"ASSET"}}},"RemoteDocumentSearchFilters":{"type":"object","properties":{"assetIdentifiers":{"type":"array","description":"Asset identifiers to search in","example":["aaaa-bbbb-cccc-dddd"],"items":{"type":"string"},"uniqueItems":true},"documentClass":{"$ref":"#/components/schemas/RemoteSearchedDocumentClass","default":"fr-FR","description":"Class of document","example":{"name":"DPE","locale":"fr-FR"}},"documentStatus":{"type":"string","description":"Status of document to search for","example":"AI"},"documentationIdentifiers":{"type":"array","description":"Documentations identifiers to search in","example":["aaaa-bbbb-cccc-dddd"],"items":{"type":"string"},"uniqueItems":true},"folderIdentifiers":{"type":"array","description":"Folders identifiers to search in","example":["aaaa-bbbb-cccc-dddd"],"items":{"type":"string"},"uniqueItems":true},"name":{"type":"string","description":"Name of document to search for","example":"Bail"},"organizationCode":{"type":"string","description":"Code of client","example":"STONAL"},"propertyKey":{"type":"string","description":"Properties PropertyKey to search in","example":"PK1"},"rentedUnit":{"type":"string","description":"Document RentedUnit to search in","example":"RU1"},"rentedUnitIdentifiers":{"type":"array","description":"Rented unit identifiers to search in","example":["aaaa-bbbb-cccc-dddd"],"items":{"type":"string"},"uniqueItems":true},"tags":{"type":"array","description":"Tags to search in","example":[{"name":"value","color":"purple"}],"items":{"type":"string"},"uniqueItems":true},"tenantIdentifiers":{"type":"array","description":"Tenant identifiers to search in","example":["aaaa-bbbb-cccc-dddd"],"items":{"type":"string"},"uniqueItems":true}}},"RemoteDocumentView":{"type":"object","properties":{"classificationStatus":{"type":"string","description":"Status of the classification process.","example":"COMPLETED"},"documentClass":{"$ref":"#/components/schemas/RemoteDocumentClassView"},"documentReferences":{"type":"array","items":{"$ref":"#/components/schemas/RemoteDocumentReferenceView"},"uniqueItems":true},"fileResource":{"$ref":"#/components/schemas/RemoteFileResourceView"},"hash":{"type":"string","description":"Hash generated from the document content with SHA-256 algorithm.","example":"e2994d1d2a0c9ef00fc77870216e3b078a8d8befd7023e742b16cc10325b56f7"},"identifier":{"type":"string","description":"Unique identifier of a document.","example":"aaaa-bbbb-cccc-dddd"},"isFiled":{"type":"boolean","description":"Boolean that indicates if the document has been filed, meaning it has at least one reference that is a folder.","example":true},"isFiledByAI":{"type":"boolean","description":"Boolean that indicates if the document has been filed by an AI or manually.","example":true},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata are information that have been extracted from the document and manually inserted.","example":"{‘key1’: ‘value1’, ‘key2’: ‘value2’}"},"name":{"type":"string","description":"Name of the document.","example":"My document.pdf"},"predictedDocumentClass":{"$ref":"#/components/schemas/RemotePredictedDocumentClassView"},"predictedFolder":{"$ref":"#/components/schemas/RemotePredictedFolderView"},"rentedUnits":{"type":"array","description":"Information about rented unit(s) associated to the document.","example":"[{‘aaaa-bbbb-cccc-dddd’:‘RENTED_UNIT A’}, {‘aaaa-bbbb-cccc-dddd’:‘RENTED_UNIT B’}]","items":{"$ref":"#/components/schemas/RemoteRentedUnitView"},"uniqueItems":true},"suggestedMetadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata are information that have been extracted from the document by our IA like the note of a DPE document.","example":"{‘key1’: ‘value1’, ‘key2’: ‘value2’}"},"tags":{"type":"array","description":"Tags are related to the documentation. They are use to give more specification about documents.","example":"[{'name': 'value', 'color': 'purple'}]","items":{"$ref":"#/components/schemas/RemoteTagView"},"uniqueItems":true},"tenants":{"type":"array","description":"Information about tenant(s) concerned by the document.","example":"[{'COMPANY_UID':'company_name'}]","items":{"$ref":"#/components/schemas/RemoteTenantView"},"uniqueItems":true},"urlAccess":{"type":"string","description":"Url that give a read only access of the document.","example":"https://platform.stonal.io/organization/STONAL/documents/aaaa-bbbb-cccc-dddd/consult"}}},"RemoteFileResourceView":{"type":"object","properties":{"contentType":{"type":"string","description":"Content type of the file.","example":"application/pdf"},"identifier":{"type":"string","description":"Identifier of stored file. This identifier is the AWS S3 identifier","example":"aaaa-bbbb-cccc-dddd"},"importDate":{"type":"string","description":"Date at which the file was imported in the system. It is in ISO 8601 format.","example":"YYYY-MM-DDTHH:MM:SSZ"},"name":{"type":"string","description":"Name of the file. It is the same as the name of the document","example":"My file.pdf"}}},"RemoteLocalisedNameView":{"type":"object","properties":{"locale":{"type":"string"},"name":{"type":"string"}}},"RemotePredictedDocumentClassView":{"type":"object","properties":{"confidentIndex":{"type":"number","format":"double","description":"Confidence rate of the prediction.","example":0.97},"predictedDocumentClassCode":{"type":"string","description":"Class code of the class that has been predicted by our IA.","example":"DPE"},"predictedDocumentClassIdentifier":{"type":"string","description":"Identifier of the class that has been predicted by our IA.","example":"aaaa-bbbb-cccc-dddd"}}},"RemotePredictedFolderView":{"type":"object","properties":{"identifier":{"type":"string","description":"Identifier of the folder of the document that has been predicted by our IA.","example":"aaaa-bbbb-cccc-dddd"},"names":{"type":"array","description":"Names of the folder in different languages.","example":[{"language":"en","name":"My folder"}],"items":{"$ref":"#/components/schemas/RemoteLocalisedNameView"},"uniqueItems":true}}},"RemoteRentedUnitView":{"type":"object","properties":{"name":{"type":"string","description":"Name of the rented unit.","example":"John Doe"},"uid":{"type":"string","description":"Unique identifier of a rented unit.","example":"aaaa-bbbb-cccc-dddd"}}},"RemoteSearchedDocumentClass":{"type":"object","properties":{"locale":{"type":"string","default":"fr-FR","description":"Local of document class","example":"fr-FR"},"name":{"type":"string","description":"Code of document class","example":"DPE"}}},"RemoteTagView":{"type":"object","properties":{"color":{"type":"string","description":"Color associated to the tag","example":"purple"},"name":{"type":"string","description":"Unique name of a tag for a given documentation.","example":"tag 2000"}}},"RemoteTenantView":{"type":"object","properties":{"name":{"type":"string","description":"Name of the tenant.","example":"John Doe"},"uid":{"type":"string","description":"Unique identifier of a tenant.","example":"aaaa-bbbb-cccc-dddd"}}},"RemoteValidateDocumentClassificationAndFolderView":{"type":"object","properties":{"documentClassIdentifier":{"type":"string","description":"Class identifier by which the document should be classified","example":"aaaa-bbbb-cccc-dddd"},"documentIdentifier":{"type":"string","description":"Document concerned by the classification","example":"aaaa-bbbb-cccc-dddd"},"documentationIdentifier":{"type":"string","description":"Documentation identifier concerned by the classification validation","example":"aaaa-bbbb-cccc-dddd"},"folderIdentifier":{"type":"string","description":"Folder identifier in which the document should be classified","example":"aaaa-bbbb-cccc-dddd"}},"required":["documentClassIdentifier","documentIdentifier","documentationIdentifier","folderIdentifier"]},"SearchUser":{"type":"object","properties":{"email":{"type":"string","description":"Email of the user to create.\n\nIt is used as the username for our users in order to sign in our platform.\n\nSo it must be unique and valid.\n","example":"firstName.lastName@corp.com"},"firstName":{"type":"string","description":"First name of the user to create","example":"firstName"},"id":{"type":"string","description":"User identifier","example":"309a666e-47c4-41ad-92b7-c483dc8dd1d1"},"lastName":{"type":"string","description":"Last name of the user to create","example":"lastName"}}},"SearchUserRequest":{"type":"object","properties":{"authorizationModelNames":{"type":"array","description":"list of authorization model names to look for","example":["Standard","All"],"items":{"type":"string"}},"email":{"type":"string","description":"email of the user to look for","example":"firstName.lastName@corp.com"},"profiles":{"type":"array","description":"list of profiles to look for","example":["Expert","Buyer"],"items":{"type":"string"}}}},"SimpleMessage":{"type":"object","properties":{"message":{"type":"string","description":"Describe a simple message information that could be return to the client by the server.","example":"This is a message"}}},"Sort":{"type":"object","properties":{"fieldOrder":{"type":"object","additionalProperties":{"type":"string"},"description":"    Sort order for the fields.\n","example":{"name":"asc","age":"desc"}}}},"UpdateUserRequest":{"type":"object","properties":{"authorization":{"$ref":"#/components/schemas/Authorization"},"company":{"type":"string","description":"    Name of the company the user is working for.\n\n    As the company is a mandatory field, it is not possible to create a user without a company.\n    Also notice that as the company can access specific assets, the user will be able to access them too.\n","example":"corp","minLength":1},"firstName":{"type":"string","description":"First name of the user to create","example":"firstName","minLength":1},"groupUids":{"type":"array","description":"    List of group uids to apply to the user.\n\n    Available groups uids can be retrieved from the Stonal platform API via the GET /v1/organizations/{organizationCode}/users/groups endpoint.\n","example":["0192d7b7-2994-7ad5-9952-26862f33c21a","0192d7b7-7073-7e58-896c-07113f22363a"],"items":{"type":"string"}},"lastName":{"type":"string","description":"Last name of the user to create","example":"lastName","minLength":1},"permissionUids":{"type":"array","description":"    List of permission uids to apply to the user.\n\n    Available permissions uids can be retrieved from the Stonal platform API via the GET /v1/organizations/{organizationCode}/users/permissions endpoint.\n","example":["0192d7b7-2994-7ad5-9952-26862f33c21a","0192d7b7-7073-7e58-896c-07113f22363a"],"items":{"type":"string"}}},"required":["authorization","company","firstName","lastName","permissionUids"]},"User":{"type":"object","properties":{"authorization":{"$ref":"#/components/schemas/Authorization"},"company":{"type":"string","description":"    Name of the company the user is working for.\n\n    As the company is a mandatory field, it is not possible to create a user without a company.\n    Also notice that as the company can access specific assets, the user will be able to access them too.\n","example":"corp"},"email":{"type":"string","description":"Email of the user to create.\n\nIt is used as the username for our users in order to sign in our platform.\n\nSo it must be unique and valid.\n","example":"firstName.lastName@corp.com"},"firstName":{"type":"string","description":"First name of the user to create","example":"firstName"},"groupUids":{"type":"array","description":"    List of group uids to applied to the user.\n\n    Available groups uids can be retrieved from the Stonal platform API via the GET /v1/organizations/{organizationCode}/users/groups endpoint.\n","example":["0192d7b7-2994-7ad5-9952-26862f33c21a","0192d7b7-7073-7e58-896c-07113f22363a"],"items":{"type":"string"}},"lastName":{"type":"string","description":"Last name of the user to create","example":"lastName"},"permissionUids":{"type":"array","description":"    List of permission uids to applied to the user.\n\n    Available permissions uids can be retrieved from the Stonal platform API via the GET /v1/organizations/{organizationCode}/users/permissions endpoint.\n","example":["0192d7b7-2994-7ad5-9952-26862f33c21a","0192d7b7-7073-7e58-896c-07113f22363a"],"items":{"type":"string"}}}}},"securitySchemes":{"passwordflow":{"bearerFormat":"JWT","flows":{"password":{"tokenUrl":"http://keycloak/realms/stonal/protocol/openid-connect/token"}},"scheme":"bearer","type":"http"}}}}