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 TypeAPI LabelDescriptionPublic
VTS Summaryvts_summariesVTS-specific lease summaryPrivate
Lease Abstractlease_abstractsAbstract of the leasePrivate
Lease Documentfull_leasesThe actual lease documentPrivate
Private Documentsother_documentsInternal documents accessible to anyone who has VTS access to that lease. Appears in http://take.ms/aXrXFPrviate

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 TypeAPI LabelDescriptionPublic
Floor Planfloor_planFloor plan for the space. Visible on the public marketing site.Public
BrochurebrochureBrochure for the space. Visible on the public marketing site.Public
PhotosphotoPhotos for the space. Visible on the public marketing site.Public
Private DocumentsdocumentInternal 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 TypeAPI LabelDescriptionPublic
Private DocumentsdocumentInternal document accessible to anyone who has VTS access to that buildingPrivate
Building Profile Photoprofile_photoMarketing photo for the building that shows up on the auto-generated public marketing site (http://take.ms/w7Tj8)Public
Building BrochurebrochureDocument to show on the building level that is the marketing brochure for that buildingpublic

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.


Interested in using our Next-Generation API Suite? Request Access by emailing [email protected]