Download OpenAPI specification:Download
Document API is used to manage documents in the document archive.
If you have any questions, comments or feedback regarding our APIs, please contact developer@ovipro.fi.
Uploading a document starts with call to this endpoint. Response contains short-lived grant for uploading document's file content. Uploading the document is done using AWS S3's presigned POST.
After uploading file content document's metadata must be saved
using POST /documents
endpoint.
contentType required | string Example: contentType=image/png Content-type for document that is going to be uploaded. |
originalFileName | string Example: originalFileName=isannoitsijatodistus_pihlajatie_5.pdf File name of the document in source file system. |
Request-ID required | string <uuid> Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9 A unique id which identifies the HTTP request. The value of this header must be created by the client. This identifier is used for troubleshooting purposes. |
{- "fields": {
- "key": "uploads/b91d3115-9890-4cd3-8bc8-b93ac8c0596c",
- "Policy": "eyAiZXhwaXJhdGlvbiI6ICIyMDE1LTEyLTMwVDEyOjAwO",
- "X-Amz-Algorithm": "AWS4-HMAC-SHA256",
- "X-Amz-Credential": "AKIAIOSFODNN7EXAMPLE/20151229/us-east-1/s3/aws4_request",
- "X-Amz-Date": "20151229T000000Z",
- "X-Amz-Security-Token": "IQoJb3JpZ2luX2VjECwaCWV1LXdlc3QtMSJHMEUCIH0inxwZxpzXT==",
- "X-Amz-Signature": "8afdbf4008c03f22c2cd3cdb72e4afbb1f6a588f3255ac628749a66d7f09699e",
- "x-amz-meta-original-filename": "isannoitsijatodistus.pdf",
- "content-type": "application/pdf"
}
}
Fetch metadata of documents by their owner entity
ownerCode | string (DocumentOwnerCode) Enum: "PARTY" "REALTY" "ASSIGNMENT" "OFFER" "BILLING" "TRADE" "RENTAL_SETTLEMENT" Example: ownerCode=REALTY Search by the document owner code to get a list of documents that belong to the certain
document owner such as a realty. Must be used together with This parameter is incompatible with |
ownerEntityId | Array of strings <uuid> (OwnerEntityId) non-empty [ items <uuid > ] Example: ownerEntityId=212114ec-819e-483c-a8e0-f82289ac6e19&ownerEntityId=0235b2b1-ccc1-416d-a96f-937a4afd92f4 Search by the document owner identifier to get a list of documents that belong to the certain
document owner such as a realty. Must be used together with This parameter is incompatible with |
documentId | Array of strings <uuid> (DocumentId) non-empty [ items <uuid > ] Example: documentId=d265a413-a83e-40f1-b185-a3b1fb74c905&documentId=1cc9944b-2fd7-42c4-a1fe-c6ed2fca1fb1 Search by one or multiple document identifiers to get a list of documents. This parameter is incompatible with |
startIndex | integer <int32> >= 0 Default: 0 Example: startIndex=20 Paginate returned documents starting from this index. Index starts from 0. |
size | integer <int32> [ 1 .. 200 ] Default: 100 Example: size=40 Documents returned per page. |
sort | string Example: sort=documentId|desc,creationTime|desc Sort the documents based on the specified fields. One of more fields can also include a sort order as follows:
|
Request-ID required | string <uuid> Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9 A unique id which identifies the HTTP request. The value of this header must be created by the client. This identifier is used for troubleshooting purposes. |
{- "totalCount": 3,
- "documents": [
- {
- "documentId": "d265a413-a83e-40f1-b185-a3b1fb74c905",
- "documentTypeCode": "BROCHURE",
- "contentType": "application/pdf",
- "ownerCode": "REALTY",
- "ownerEntityId": "bd6fc6fd-57ab-4920-b528-3c2fbb8f8f22",
- "documentName": "Esite V1",
- "canBeShared": true,
- "isReadOnly": false,
- "creationTime": "2021-05-11T13:41:21+00:00",
- "modificationTime": "2021-05-13T02:20:19+00:00"
}, - {
- "documentId": "1cc9944b-2fd7-42c4-a1fe-c6ed2fca1fb1",
- "documentTypeCode": "BROCHURE",
- "contentType": "application/pdf",
- "ownerCode": "REALTY",
- "ownerEntityId": "bd6fc6fd-57ab-4920-b528-3c2fbb8f8f22",
- "documentName": "Esite V2",
- "canBeShared": true,
- "isReadOnly": false,
- "creationTime": "2021-05-10T13:07:21+00:00",
- "modificationTime": "2021-05-12T12:08:22+00:00"
}, - {
- "documentId": "7ff221f2-9c0c-4d52-8651-a04c7e55a65d",
- "documentTypeCode": "HOUSING_MANAGER_CERTIFICATE",
- "contentType": "application/pdf",
- "ownerCode": "REALTY",
- "ownerEntityId": "bd6fc6fd-57ab-4920-b528-3c2fbb8f8f22",
- "documentName": "Isännöitsijätodistus Perustie 7",
- "canBeShared": false,
- "isReadOnly": true,
- "signingProcessStatus": {
- "statusCode": "SIGNED",
- "signatureOrigin": "INTERNAL",
- "signingTime": "2021-07-07T19:12:21+00:00"
}, - "creationTime": "2021-05-23T09:12:21+00:00",
- "modificationTime": "2021-07-07T19:12:21+00:00"
}
]
}
This endpoint assumes that file has been uploaded to document storage
using grant from GET document/uploadGrant
endpoint. With this endpoint
meta data for document must be saved to make document accessible.
Request-ID required | string <uuid> Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9 A unique id which identifies the HTTP request. The value of this header must be created by the client. This identifier is used for troubleshooting purposes. |
uploadedDocumentKey required | string (UploadedDocumentKey) Value of |
ownerCode required | string (DocumentOwnerCode) Enum: "PARTY" "REALTY" "ASSIGNMENT" "OFFER" "BILLING" "TRADE" "RENTAL_SETTLEMENT" Defines the document owner type. Possible values are:
|
ownerEntityId required | string <uuid> (OwnerEntityId) A unique identifier for document owner entity in the UUID format.
Depending on |
agencyOfficeId required | string <uuid> (AgencyOfficeId) Unique identifier for the agency office in the UUID format. |
documentTypeCode required | string (DocumentTypeCode) Enum: "ACTION_REPORT" "AREA_ASSESSMENT_MINUTES" "ARTICLES_OF_ASSOCIATION" "ASBESTOSMAPPING_REPORT" "ASSIGNMENT" "ASSIGNMENT_DIARY" "AUDITION_REPORT" "BALANCE_SHEET" "BROCHURE" "BUDGET" "BUILDING_MANAGEMENT_PLAN" "CERTIFICATE_OF_REGISTRATION_OF_TENANCY_RIGHT" "CONTINUATION_AGREEMENT" "CONDITION_ASSESSMENT_REPORT" "CONDITION_AUDIT_REPORT" "CONDITION_EVALUATION_REPORT" "CONDITION_REPORTS" "CONDITION_SURVEY_REPORT" "CONSTRUCTION_SEQUENCE" "CONTRACT_REPORT" "COUNTER_OFFER" "DIARY" "DISTRICT_HEATING_CONTRACT" "DRAWINGS_FOR_BUILDING_PERMIT" "ELECTRICITY_CONNECTION_AGREEMENT" "ENCUMBRANCE_CERTIFICATE" "ENERGY_CERTIFICATE_OBTAINMENT_OBLIGATION" "ENERGY_PERFORMANCE_CERTIFICATE" "ESTATE_INVENTORY_DEED" "ESTATE_INVENTORY_DEED_ATTACHMENT" "ESTATE_INVENTORY_DEED_SHAREHOLDERS_CERTIFICATION" "EXPLANATORY_APPENDIX" "EXTRACT_OF_LAND_REGISTRY" "FINAL_INSPECTION_MINUTES" "FINANCIAL_STATEMENT" "FLOOR_PLAN" "HEATING_COST_DOCUMENTS" "HOUSING_MANAGER_CERTIFICATE" "INCOME_STATEMENT" "INVOICE" "JOINT_ARRANGEMENT_AGREEMENT" "JOINT_POSSESSION_AGREEMENT" "LAND_LEASE_AGREEMENT" "LAND_USE_AGREEMENT" "LEASEHOLD_CERTIFICATE" "LEASEHOLD_ENCUMBRANCE_CERTIFICATE" "LEASE_CONTRACT" "LETTER_OF_ATTORNEY" "MAINTENANCE_NEEDS_STATEMENT" "MAINTENANCE_PLAN" "MAP" "MINUTES_EXTRACT" "MOISTURE_MAPPING_REPORT" "MUNICIPALITY'S_CONSTRUCTION_ORDER" "OIL_TANK_INSPECTION_PROTOCOL" "OTHER" "OWNERSHIP_TRANSFER_POWER_OF_ATTORNEY" "OWNER_APARTMENT_PRINTOUT" "PARTY_COMPLIANCE_VERIFICATION" "PARTY_IDENTIFICATION_DOCUMENT" "PLEDGE_STATEMENT_AND_AUTHORIZATION" "POPULATION_REGISTER_EXTRACT" "POSITION_DRAWING" "PROPERTY_ON_MAP" "PURCHASE_OFFER" "REAL_ESTATE_OFFER" "REAL_ESTATE_REGISTER_MAP" "RENTAL_AGREEMENT" "REPAIR_REPORTS" "RS_DEED_OF_SALES" "SALES_AND_MARKETING_PLAN" "SALES_DEED" "SANCTIONS_LIST_REPORT" "SECURITY_DOCUMENTS" "SEWAGE_SYSTEM_DOCUMENTS" "SHARE_CERTIFICATE" "SHARE_LIST_PRINTOUT_EXTRACT" "SHARE_REGISTER_PRINTOUT" "SHAREHOLDER_AGREEMENT" "SPOUSES_CONSENT" "SUBSET_OF_FINAL_INSPECTION_MINUTES" "THERMAL_IMAGING" "TITLE_CERTIFICATE" "TRADE_REGISTER_EXTRACT" "TRANSFER_AGREEMENT" "TRANSFER_TAX_RECEIPT" "TRANSFER_TAX_RETURN_RECEIPT" "TRANSFER_TERMS" "WATER_CONNECTION_AGREEMENT" "WATER_SUPPLY_SYSTEM_DOCUMENTS" "WINDOW_CARD" "WIRELINE_MAP" "ZONING_DOCUMENTS" Defines the document type. Available types:
|
documentName required | string (DocumentName) <= 200 characters |
canBeShared required | boolean Indicates whether the document can be shared. |
isReadOnly required | boolean Indicates whether the document's metadata can be modified or document can deleted by users. |
canBeReplaced required | boolean Indicates whether document's file content can be replaced with new version. This allows generated documents to be replaced when needed. This property does not prevent document being replaced with signed version. |
{- "uploadedDocumentKey": "uploads/b91d3115-9890-4cd3-8bc8-b93ac8c0596c",
- "ownerCode": "REALTY",
- "ownerEntityId": "c9afe69c-87c2-4631-bd06-770aae582a95",
- "agencyOfficeId": "a6e221fb-f4de-41cf-ba16-b0c309e34126",
- "documentTypeCode": "BROCHURE",
- "documentName": "Esite Perustie 7 v2",
- "canBeShared": true,
- "isReadOnly": false,
- "canBeReplaced": true
}
{- "documentId": "eec25843-7b14-43c0-9c2a-602bc30f7099"
}
If documents are found by document owner code and owner identifier removes those.
ownerCode required | string (DocumentOwnerCode) Enum: "PARTY" "REALTY" "ASSIGNMENT" "OFFER" "BILLING" "TRADE" "RENTAL_SETTLEMENT" Example: ownerCode=REALTY Owner entity type code used to define documents that will be deleted. |
ownerEntityId required | string <uuid> (OwnerEntityId) Example: ownerEntityId=4b80e9ba-d4e4-4667-9b97-f4d7176f4fcb Owner entity id used to define documents that will be deleted. |
Request-ID required | string <uuid> Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9 A unique id which identifies the HTTP request. The value of this header must be created by the client. This identifier is used for troubleshooting purposes. |
{ }
Updates metadata of given document if document is not readOnly
.
documentId required | string <uuid> Example: 940bf547-122f-4811-8ca0-6ffb9776f035 ID of the document to retrieve file content for. |
Request-ID required | string <uuid> Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9 A unique id which identifies the HTTP request. The value of this header must be created by the client. This identifier is used for troubleshooting purposes. |
documentTypeCode required | string (DocumentTypeCode) Enum: "ACTION_REPORT" "AREA_ASSESSMENT_MINUTES" "ARTICLES_OF_ASSOCIATION" "ASBESTOSMAPPING_REPORT" "ASSIGNMENT" "ASSIGNMENT_DIARY" "AUDITION_REPORT" "BALANCE_SHEET" "BROCHURE" "BUDGET" "BUILDING_MANAGEMENT_PLAN" "CERTIFICATE_OF_REGISTRATION_OF_TENANCY_RIGHT" "CONTINUATION_AGREEMENT" "CONDITION_ASSESSMENT_REPORT" "CONDITION_AUDIT_REPORT" "CONDITION_EVALUATION_REPORT" "CONDITION_REPORTS" "CONDITION_SURVEY_REPORT" "CONSTRUCTION_SEQUENCE" "CONTRACT_REPORT" "COUNTER_OFFER" "DIARY" "DISTRICT_HEATING_CONTRACT" "DRAWINGS_FOR_BUILDING_PERMIT" "ELECTRICITY_CONNECTION_AGREEMENT" "ENCUMBRANCE_CERTIFICATE" "ENERGY_CERTIFICATE_OBTAINMENT_OBLIGATION" "ENERGY_PERFORMANCE_CERTIFICATE" "ESTATE_INVENTORY_DEED" "ESTATE_INVENTORY_DEED_ATTACHMENT" "ESTATE_INVENTORY_DEED_SHAREHOLDERS_CERTIFICATION" "EXPLANATORY_APPENDIX" "EXTRACT_OF_LAND_REGISTRY" "FINAL_INSPECTION_MINUTES" "FINANCIAL_STATEMENT" "FLOOR_PLAN" "HEATING_COST_DOCUMENTS" "HOUSING_MANAGER_CERTIFICATE" "INCOME_STATEMENT" "INVOICE" "JOINT_ARRANGEMENT_AGREEMENT" "JOINT_POSSESSION_AGREEMENT" "LAND_LEASE_AGREEMENT" "LAND_USE_AGREEMENT" "LEASEHOLD_CERTIFICATE" "LEASEHOLD_ENCUMBRANCE_CERTIFICATE" "LEASE_CONTRACT" "LETTER_OF_ATTORNEY" "MAINTENANCE_NEEDS_STATEMENT" "MAINTENANCE_PLAN" "MAP" "MINUTES_EXTRACT" "MOISTURE_MAPPING_REPORT" "MUNICIPALITY'S_CONSTRUCTION_ORDER" "OIL_TANK_INSPECTION_PROTOCOL" "OTHER" "OWNERSHIP_TRANSFER_POWER_OF_ATTORNEY" "OWNER_APARTMENT_PRINTOUT" "PARTY_COMPLIANCE_VERIFICATION" "PARTY_IDENTIFICATION_DOCUMENT" "PLEDGE_STATEMENT_AND_AUTHORIZATION" "POPULATION_REGISTER_EXTRACT" "POSITION_DRAWING" "PROPERTY_ON_MAP" "PURCHASE_OFFER" "REAL_ESTATE_OFFER" "REAL_ESTATE_REGISTER_MAP" "RENTAL_AGREEMENT" "REPAIR_REPORTS" "RS_DEED_OF_SALES" "SALES_AND_MARKETING_PLAN" "SALES_DEED" "SANCTIONS_LIST_REPORT" "SECURITY_DOCUMENTS" "SEWAGE_SYSTEM_DOCUMENTS" "SHARE_CERTIFICATE" "SHARE_LIST_PRINTOUT_EXTRACT" "SHARE_REGISTER_PRINTOUT" "SHAREHOLDER_AGREEMENT" "SPOUSES_CONSENT" "SUBSET_OF_FINAL_INSPECTION_MINUTES" "THERMAL_IMAGING" "TITLE_CERTIFICATE" "TRADE_REGISTER_EXTRACT" "TRANSFER_AGREEMENT" "TRANSFER_TAX_RECEIPT" "TRANSFER_TAX_RETURN_RECEIPT" "TRANSFER_TERMS" "WATER_CONNECTION_AGREEMENT" "WATER_SUPPLY_SYSTEM_DOCUMENTS" "WINDOW_CARD" "WIRELINE_MAP" "ZONING_DOCUMENTS" Defines the document type. Available types:
|
documentName required | string (DocumentName) <= 200 characters |
canBeShared required | boolean Indicates whether the document can be shared. |
{- "documentTypeCode": "BROCHURE",
- "documentName": "Esite Perustie 7 v2",
- "canBeShared": true
}
{ }
Deletes a document if document is not readOnly
.
documentId required | string <uuid> Example: 940bf547-122f-4811-8ca0-6ffb9776f035 ID of the document to be deleted. |
Request-ID required | string <uuid> Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9 A unique id which identifies the HTTP request. The value of this header must be created by the client. This identifier is used for troubleshooting purposes. |
{ }
Returns url that can be used to download file contents of a document with specified Id.
documentId required | string <uuid> Example: 940bf547-122f-4811-8ca0-6ffb9776f035 ID of the document to retrieve file content for. |
Request-ID required | string <uuid> Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9 A unique id which identifies the HTTP request. The value of this header must be created by the client. This identifier is used for troubleshooting purposes. |
{- "filename": "esite_perustie_14.pdf"
}
Replaces file contents of a document with specified Id.
documentId required | string <uuid> Example: 940bf547-122f-4811-8ca0-6ffb9776f035 ID of the document which file content will be replaced. |
Request-ID required | string <uuid> Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9 A unique id which identifies the HTTP request. The value of this header must be created by the client. This identifier is used for troubleshooting purposes. |
uploadedDocumentKey required | string (UploadedDocumentKey) Value of |
{- "uploadedDocumentKey": "uploads/b91d3115-9890-4cd3-8bc8-b93ac8c0596c"
}
{ }
Send email containing links to documents stored using Document API to recipients. Recipients can be either Parties in Party API or non-customers using email addresses.
Request-ID required | string <uuid> Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9 A unique id which identifies the HTTP request. The value of this header must be created by the client. This identifier is used for troubleshooting purposes. |
required | Array of objects non-empty Identifiers of documents that will be shared. |
required | Array of objects (PartyRecipient) non-empty Recipients for shared documents. |
required | object Information about sender who shares the document. |
required | object Properties used in emails that are sent to recipients. |
{- "documents": [
- {
- "documentId": "b4156e7b-096b-40f3-89b4-4df79209786f"
}, - {
- "documentId": "db665f96-91f2-4a81-8c9d-5136f77c5844"
}
], - "recipients": [
- {
- "partyId": "b354faf4-7b33-472b-b873-3b499d805f00"
}
], - "sender": {
- "agencyOfficeId": "0fa75954-b4c8-42b2-b73a-5b1d29a3a8c0"
}, - "emailContent": {
- "languageCode": "en",
- "subject": "Documents for realty Hämeentie 14 A 5",
- "message": "Hello! Here are the documents for realty. Links to download documents are valid for 14 days. Have a nice day!"
}
}
{ }
Returns list of log entries that are produced when document is sharead to a party. Results are sorted in ascending order using sharing time.
Either documentId
or recipientPartyId
query parameter must be provided.
documentId | string <uuid> Example: documentId=940bf547-122f-4811-8ca0-6ffb9776f035 Id of the document that was shared |
recipientPartyId | string <uuid> Example: recipientPartyId=940bf547-122f-4811-8ca0-6ffb9776f035 Id of the party to who documents were shared. |
startIndex | integer <int32> >= 0 Default: 0 Example: startIndex=20 Paginate returned items starting from this index. Index starts from 0. |
size | integer <int32> [ 1 .. 200 ] Default: 100 Example: size=40 Items returned per page. |
Request-ID required | string <uuid> Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9 A unique id which identifies the HTTP request. The value of this header must be created by the client. This identifier is used for troubleshooting purposes. |
{- "items": [
- {
- "document": {
- "documentId": "d265a413-a83e-40f1-b185-a3b1fb74c905",
- "documentTypeCode": "BROCHURE",
- "contentType": "application/pdf",
- "ownerCode": "REALTY",
- "ownerEntityId": "bd6fc6fd-57ab-4920-b528-3c2fbb8f8f22",
- "documentName": "Esite V1"
}, - "recipient": {
- "partyId": "a05dacf8-af36-4946-a312-5d34ea21277e"
}, - "sharedBy": {
- "agentId": "1b267a23-3506-4ac5-a6e2-35b13ddd64d8"
}, - "sharedTime": "2021-05-13T02:20:19+00:00"
}, - {
- "document": {
- "documentId": "7ff221f2-9c0c-4d52-8651-a04c7e55a65d",
- "documentTypeCode": "HOUSING_MANAGER_CERTIFICATE",
- "contentType": "application/pdf",
- "ownerCode": "REALTY",
- "ownerEntityId": "bd6fc6fd-57ab-4920-b528-3c2fbb8f8f22",
- "documentName": "Isännöitsijätodistus Perustie 7"
}, - "recipient": {
- "partyId": "a05dacf8-af36-4946-a312-5d34ea21277e"
}, - "sharedBy": {
- "agentId": "1b267a23-3506-4ac5-a6e2-35b13ddd64d8"
}, - "sharedTime": "2023-02-20T12:01:15+00:00"
}
], - "totalCount": 2
}