Property Deck

Property Deck

  • Authentication
  • Getting Started

›API

Getting Started

  • Introduction
  • Authentication
  • Rate Limiting
  • Concepts

API

  • Attachments
  • Competencies
  • Custom Fields
  • Contacts
  • Properties
  • Notes
  • Reminders
  • Statuses
  • Types

Attachments

Attachments are files which belong to a Contact or Property.

Object Definition

FieldTypeDescription
uuidstringUnique identifier for the object
created_atstringISO 8601 datetime when the attachment was originally created
updated_atstringISO 8601 datetime when the attachment was last updated
namestringFilename of the attachment
descriptionstring / nullDescription of what the attachment is
sizeintegerSize of the file in bytes
download_urlstringURL the user can access to download the attachment
stream_urlstringURL the user can access to view the attachment in the browser (If their browser supports it)
mime_typestringMime type of the attachment
typestringHuman readable file type (Document, Image, Video or Audio)

List all Attachments

Retrieve a paginated list of all the accounts Attachments. GET /attachments.

Filters

You may filter the results from the list endpoint using the following query parameters

FieldTypeDescription
uuidstringExact match for the attachment's uuid
contactRelational FilterFilter using contact attributes
propertyRelational FilterFilter using property attributes

Example Response

{
  "data": [
    {
      "uuid": "97b28627-d690-40f6-988e-018b28e5cf3e",
      "created_at": "2018-08-02T13:01:09+01:00",
      "updated_at": "2018-08-02T13:01:13+01:00",
      "name": "example.pdf",
      "description": null,
      "size": 500000,
      "download_url": "https://my.propertydeck.com/attachments/97b28627-d690-40f6-988e-018b28e5cf3e/download",
      "stream_url": "https://my.propertydeck.com/attachments/97b28627-d690-40f6-988e-018b28e5cf3e/stream",
      "mime_type": "application/pdf",
      "type": "Document"
    }
  ],
  "meta": {
    "pagination": {
      "total": 1,
      "count": 1,
      "per_page": 10,
      "current_page": 1,
      "total_pages": 1
    }
  }
}

Get a single Attachment

Retrieve a single attachment by it's uuid. GET /attachments/:uuid.

Example Response

{
  "data": {
    "uuid": "97b28627-d690-40f6-988e-018b28e5cf3e",
    "created_at": "2018-08-02T13:01:09+01:00",
    "updated_at": "2018-08-02T13:01:13+01:00",
    "name": "example.pdf",
    "description": null,
    "size": 500000,
    "download_url": "https://my.propertydeck.com/attachments/97b28627-d690-40f6-988e-018b28e5cf3e/download",
    "stream_url": "https://my.propertydeck.com/attachments/97b28627-d690-40f6-988e-018b28e5cf3e/stream",
    "mime_type": "application/pdf",
    "type": "Document"
  }
}

Creating an Attachment

There are two endpoints for creating an attachment, depending if you want to associate it with a Contact or Property. Perform a POST request to any of the following endpoints, they return a HTTP 201 status code on success.

Your Content-Type header for this request must be set to multipart/form-data

  • /properties/:uuid/attachments
  • /contacts/:uuid/attachments

Input

FieldTypeDescription
uploadstringContents of the file
descriptionstring / nullDescription of the file contents

Updating an Attachment

Perform a PUT request to the /attachments/:uuid endpoint. This endpoint will return a HTTP 200 status code on success.

Input

FieldTypeDescription
descriptionstring / nullDescription of the file contents

Deleting an Attachment

Perform a DELETE request to the /attachments/:uuid endpoint. This endpoint will return a HTTP 204 status code on success.

← ConceptsCompetencies →
  • Object Definition
  • List all Attachments
    • Filters
    • Example Response
  • Get a single Attachment
    • Example Response
  • Creating an Attachment
  • Updating an Attachment
  • Deleting an Attachment
Property Deck
Docs
IntroductionAuthenticationRate LimitingConcepts
API
AttachmentsCompetenciesCustom FieldsContactsProperties
 
NotesRemindersStatusesTypes
Copyright © 2018 Radweb Ltd