Endpoints to upload documents to EverReal and link them to different objects
Introduction
Important notes
Documents represents files that are uploaded and have metadata that link them to different objects in EverReal. Documents can be linked to tenants, units, properties, property groups. If you want to upload files and link them to listings later, please read the Simple file upload section.
Documents need to have a resourcePath that is a "virtual folder" in EverReal. Recommended resource paths
Tenant documents: tenants/$tenantId
Property documents: properties/$propertyId
Unit documents: units/$unitId
property group documents: properties/$propertyId - documents attached to a property group should also be attached to a property as well
Endpoints
Upload a document with metadata
Uploading a document is a multipart/form-data operation that can pass via multipart parameters several required or optional parameters.
Please note that the field metadata needs to be passed as string JSON and can contain the following data:
// The type of documenttype?:DOCUMENT_TYPES;// Link a document to a tenant by idtenantId?: string;// Link the document to a unit by idunitId?: string;// Link the document to a property by idpropertyId?: string;// Link the document to a property group by idpropertyGroupId?: string;enumDOCUMENT_TYPES {// default document type DOCUMENT ="DOCUMENT",// rental application of a tenant, passed during rental process RENTAL_APPLICATION ="RENTAL_APPLICATION",// contract with a tenant or buyer CONTRACT ="CONTRACT",// move-in protocol MOVE_IN ="MOVE_IN",// move-out protocol MOVE_OUT ="MOVE_OUT",}
Sample response
{"id":"f2d8b7a5-9e58-4347-8864-35243fd952b0", "resourcePath": "subdomain/116aeae1-615a-11e7-97db-257f422c1234/properties/117ff3a1-6f1b-4da8-a3da-208d2e6f5ac4/f2d8b7a5-9e58-4347-8864-35243fd952b0",
"title":"Floor plans","companyId":"116aeae1-615a-11e7-97db-257f422c1234","type":"DOCUMENT","propertyId":"117ff3a1-6f1b-4da8-a3da-208d2e6f5ac4","propertyGroupId":null,"unitId":null,"tenantId":null,"email":null,"mediaType":"image/png","size":10473459,"createdAt":"2023-05-24T09:43:19.043Z","updatedAt":"2023-05-24T09:43:19.043Z"}// afterwards the file will be accessible at // https://resources.everreal.co/subdomain/116aeae1-615a-11e7-97db-257f422c1234/properties/117ff3a1-6f1b-4da8-a3da-208d2e6f5ac4/f2d8b7a5-9e58-4347-8864-35243fd952b0