Document Attachment
Introduction
This is the central repository for information on viewing, creating, and deleting attachments in VTS. On this page, you will find a sample of our XML formatting; a list of elements with description; and tutorials to help you get started with an API integration.
To start using the VTS Attachments API, the API consumer must have an API key and an API secret to authenticate requests. VTS will provide these credentials to authorized API consumers. If you would like to test whether your credentials are valid, please refer to the Authentication section.
Building, Space, and Lease IDs
You can obtain the building, space, and lease IDs by doing a full Portfolio Export. See our documentation for our Portfolio Export API for instructions on how to generate a Portfolio Export.
Lease-Level Attachments
List all
For a given Lease ID, you can list out all attachments to that lease. To do so, generate a HTTP request as below. A sample curl
method is shown below.
curl -u <API Key>:<API Secret> https://api.vts.com/api/v1/leases/<LEASE_ID>/attachments/
curl -u <API Key>:<API Secret> https://sandbox.vts.com/api/v1/leases/<LEASE_ID>/attachments/<ATTACHMENT_TYPE>/<ATTACHMENT_ID>
You will receive a response in the following format
[
{
"lease_id": 84722,
"attachment_id": 49431,
"created_at": "2016-06-29T09:50:52.506-04-00",
"file_name": "LeaseFinancials.xlsx",
"attachment_type": "document"
},
{
"lease_id": 84722,
"attachment_id": 39032,
"created_at": "2016-06-23T09:50:52.506-04-00",
"file_name": "Amazon-Lease.pdf",
"attachment_type": "lease"
}
]
Create new
To add a new attachment on the lease level, issue an HTTP POST to our REST API. You will need to specify attachment_type
and also a path to the file as well.
curl -u <API Key>:<API Secret> -X POST \
https://api.vts.com/api/v1/leases/<LEASE_ID>/attachments/<ATTACHMENT_TYPE> \
-F "File=@</path/to/file>"
curl -u <API Key>:<API Secret> -X POST \
https://sandbox.vts.com/api/v1/leases/<LEASE_ID>/attachments/<ATTACHMENT_TYPE> \
-F "file=@</path/to/file>"
For attachment type, the different types of documents you can attach are shown below.
Document Type | API Label | Description | Public |
---|---|---|---|
VTS Summary | vts_summaries | VTS-specific lease summary | Private |
Lease Abstract | lease_abstracts | Abstract of the lease | Private |
Lease Document | full_leases | The actual lease document | Private |
Private Documents | other_documents | Internal documents accessible to anyone who has VTS access to that lease. Appears in http://take.ms/aXrXF | Prviate |
Delete
To delete a specific attachment on a lease, follow the API command below.
curl -u <API Key>:<API Secret> -X DELETE https://api.vts.com/api/v1/leases/<LEASE_ID>/attachments/<ATTACHMENT_TYPE>/<ATTACHMENT_ID>
curl -u <API Key>:<API Secret> -X DELETE https://sandbox.vts.com/api/v1/leases/attachments/<ATTACHMENT_TYPE>/<ATTACHMENT_ID>
Space-Level Attachments
List all
For a given Space ID, you can list out all attachments to that space. To do so, generate a HTTP request as below. A sample curl
method is shown below.
curl -u <API Key>:<API Secret> https://api.vts.com/api/v1/spaces/<SPACE_ID>/attachments
curl -u <API Key>:<API Secret> https://sandbox.vts.com/api/v1/spaces/<SPACE_ID>/attachments
You will receive a response in the following format
[
{
"space_id": 84722,
"attachment_id": 49431,
"created_at": "2016-06-29T09:50:52.506-04-00",
"file_name": "UnitBrochure.pdf",
"attachment_type": "brochure"
},
{
"property_id": 84722,
"attachment_id": 39032,
"created_at": "2016-06-23T09:50:52.506-04-00",
"file_name": "HistoricalTenants.pdf",
"attachment_type": "document"
}
]
Create new
To add a new attachment on the space level, issue an HTTP POST to our REST API. You will need to specify attachment_type
and also a path to the file as well.
curl -u <API Key>:<API Secret> -X POST \
https://api.vts.com/api/v1/spaces/<SPACE_ID>/attachments/<ATTACHMENT_TYPE> \
-F "File=@</path/to/file>"
curl -u <API Key>:<API Secret> -X POST \
https://sandbox.vts.com/api/v1/spaces/<SPACE_ID>/attachments/<ATTACHMENT_TYPE> \
-F "File=@</path/to/file>"
For attachment type, the different types of documents you can attach are shown below.
Document Type | API Label | Description | Public |
---|---|---|---|
Floor Plan | floor_plan | Floor plan for the space. Visible on the public marketing site. | Public |
Brochure | brochure | Brochure for the space. Visible on the public marketing site. | Public |
Photos | photo | Photos for the space. Visible on the public marketing site. | Public |
Private Documents | document | Internal document accessible to anyone who has VTS access to that space. | Private |
Delete
To delete a specific attachment on a space, follow the API command below.
curl -u <API Key>:<API Secret> -X DELETE https://api.vts.com/api/v1/spaces/<SPACE_ID>/attachments/<ATTACHMENT_TYPE>/<ATTACHMENT_ID>
curl -u <API Key>:<API Secret> -X DELETE https://sandbox.vts.com/api/v1/spaces/<SPACE_ID>/attachments/<ATTACHMENT_TYPE>/<ATTACHMENT_ID>
Property-Level Attachments
List all
For a given Property ID, you can list out all attachments to that space. To do so, generate a HTTP request as below. A sample curl
method is shown below.
curl -u <API Key>:<API Secret> https://api.vts.com/api/v1/properties/<PROPERTY_ID>/attachments
curl -u <API Key>:<API Secret> https://sandbox.vts.com/api/v1/properties/<PROPERTY_ID>/attachments
You will receive a response in the following format
[
{
"property_id": 1247,
"attachment_id": 235432,
"created_at": "2016-06-29T09:50:52.506-04-00",
"file_name": "BuildingContactList.pdf",
"attachment_type": "document"
},
{
"property_id": 1247,
"attachment_id": 235493,
"created_at": "2016-06-23T09:50:52.506-04-00",
"file_name": "FrontFacadePhoto.pdf",
"attachment_type": "profile_photo"
}
]
Create new
To add a new attachment on the property level, issue an HTTP POST to our REST API. You will need to specify attachment_type
and also a path to the file as well.
curl -u <API Key>:<API Secret> -X POST \
https://api.vts.com/api/v1/properties/<PROPERTY_ID>/attachments/<ATTACHMENT_TYPE> \
-F "File=@</path/to/file>"
curl -u <API Key>:<API Secret> -X POST \
https://sandbox.vts.com/api/v1/properties/<PROPERTY_ID>/attachments/<ATTACHMENT_TYPE> \
-F "File=@</path/to/file>"
For attachment type, the different types of documents you can attach are shown below.
Document Type | API Label | Description | Public |
---|---|---|---|
Private Documents | document | Internal document accessible to anyone who has VTS access to that building | Private |
Building Profile Photo | profile_photo | Marketing photo for the building that shows up on the auto-generated public marketing site (http://take.ms/w7Tj8) | Public |
Building Brochure | brochure | Document to show on the building level that is the marketing brochure for that building | public |
Delete
To delete a specific attachment on a building, follow the API command below.
curl -u <API Key>:<API Secret> -X DELETE https://api.vts.com/api/v1/properties/<PROPERTY_ID>/attachments/<ATTACHMENT_TYPE>/<ATTACHMENT_ID>
curl -u <API Key>:<API Secret> -X DELETE https://sandbox.vts.com/api/v1/properties/<PROPERTY_ID>/attachments/<ATTACHMENT_TYPE>/<ATTACHMENT_ID>
This document is proprietary and confidential. No part of this document may be disclosed in any manner to a third party without the prior written consent of View the Space Inc.
Updated over 3 years ago