NAV Navbar
shell ruby javascript

Overview

In the following sections, you will find information relating to QA validation, batch requests, and limitations. You will also find common best practices around seeding and sending to our API.

QA Validation

In order to validate data, QA has been given access to endpoints to each operation to retrieve data after upserting. Each endpoint must pass limit & offset to be valid. Records can be searched by providing a specific id with the request. When requesting an operation, a count of all objects will be returned.

Batch Requests

Batching allows you to pass several operations in a single HTTP request and specify dependencies between related operations. Operations are processed sequentially, validating, creating, and updating objects. Once all operations are complete, a consolidated response is passed back to you and the HTTP connection is closed.

Often, the operations in the request are dependent - for example, the output of one operation may be used in the input of the next operation. The system requires dependant information to be passed in order.

Examples

  1. Creating a lease is dependant on units so units must be created before uploading leases.

  2. Another example is terminating a lease for a specific unit before moving uploading a new lease for the same unit. Sending in order is preferred.

Limits

Rate limiting defines limits on how many API calls can be made within a specified time period.

Currently, the servers are set to a 1 minute timeout, this is directly related to AWS recommendations, Nginx specifications, and security concerns on our end. Keeping a 1 minute timeout also allows for us to control threads and make sure the system is always up and running.

Below is a table with batch limits, maximum requests (on a per hour basis), and a description / why these calls could be extensive. Please see Timeouts & Best Practices sections below for more information on working within these limitations. The following are based on maximum cases, if you find that requests are taking too long, please contact the team and adjust accordingly.

Each call within the batch is counted separately for the purposes of calculating API call limits and resource limits.

Synchronous Requests

Batch Limit Max Requests Description/what to think about when importing
Companies 1000 30,000/hr n/a
Sites 1000 30,000/hr n/a
Roles 500 15,000/hr Roles touches site staff, when one role is updated, it is applied through all site staff
Site Staff 300 9,000/hr Inviting, assigning properties and roles are extensive
Buildings 500 15,000/hr Creating address with timezones is extensive
Units 1500 45,000/hr n/a
Leases 300 9,000/hr Leases are associated to units/buildings, and tenants. Becomes extensive when terminating, or updating tenants within lease. Leases also have a lot attached to them
Tenants 300 9,000/hr Tenants are associated to leases and also have a lot indirectly associated to them, making creates and updates extensive, most changes are tracked. Inviting and moving out can be heavy
Service Requests 400 12,000/hr Validation around service requests is extensive, leases are attached with tenants, and all changes are tracked
Amenities 500 15,000/hr n/a
Notices 500 15,000/hr When associating urls / images to notices, batch limit may decrease

Asynchronous Requests

Batch Limit
Leases 1000
Tenants 1000
Service Requests 1000
Notices 1000

Timeouts and How to Handle

Failures and How to Handle

Best Practices

Authentication

POST OAuth Create Token


curl --location --request POST "https://{API_URL}/partners/token?grant_type=client_credentials&client_id=:client_id&client_secret=:client_secret" \
  --header "Content-Type: application/json" \
  --header "Accept: application/json"


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/token?grant_type=client_credentials&client_id=:client_id&client_secret=:client_secret")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url:
    'https://{API_URL}/partners/token?grant_type=client_credentials&client_id=:client_id&client_secret=:client_secret',
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Accept: 'application/json',
  },
  processData: false,
  data: '',
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace :client_id, :client_secret with your credentials.

Example Response

{
  "access_token": "TOKEN",
  "token_type": "Bearer",
  "expires_in": 43200,
  "created_at": 1563990055
}

Yuhu follows OAuth 2.0 protocol for authentication. To generate a token the following is requested.

HTTP Request

POST https://{API_URL}/partners/token

Headers

header value
Content-Type application/json
Accept application/json

Parameters

parameter value description
grant_type client_credentials Keep as client_credentials
client_id client ID provided by Yuhu
client_secret client secret provided by Yuhu

POST OAuth Revoke Token


curl --location --request POST "https://{API_URL}/partners/revoke?grant_type=client_credentials&client_id=:client_id&client_secret=:client_secret&token=:token_to_revoke" \
  --header "Content-Type: application/json" \
  --header "Accept: application/json"


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/revoke?grant_type=client_credentials&client_id=:client_id&client_secret=:client_secret&token=:token_to_revoke")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url:
    'https://{API_URL}/partners/revoke?grant_type=client_credentials&client_id=:client_id&client_secret=:client_secret&token=:token_to_revoke',
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Accept: 'application/json',
  },
  processData: false,
  data: '',
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace :client_id, :client_secret, :token_to_revoke with your credentials.

This request is used to revoke a token

HTTP Request

POST https://{API_URL}/partners/revoke

Headers

header value
Content-Type application/json
Accept application/json

Parameters

parameter value description
grant_type client_credentials Keep as client_credentials
client_id client ID provided by Yuhu
client_secret client secret provided by Yuhu
token_to_revoke token you would like to revert

Companies

Get Companies


curl -X GET \
  'https://{API_URL}/partners/v1/companies?limit=:limit&offset=:offset' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/companies?limit=:limit&offset=:offset")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: 'https://{API_URL}/partners/v1/companies?limit=:limit&offset=:offset',
  method: 'GET',
  headers: {
    Accept: 'application/json',
    Authorization: 'Bearer {TOKEN}',
  },
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :limit and :offset

Example Response

[
  {
    "id": "111",
    "name": "Yuhu Inc.",
    "nameFr": "Yuhu Inc."
  },
  {
    "id": "222",
    "name": "Yuhu School",
    "nameFr": "École Yuhu"
  }
]

This endpoint retrieves all companies.

HTTP Request

GET https://{API_URL}/partners/v1/companies

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Query Parameters

parameter description
limit Max number of companies to return
offset Skip this number of rows

CREATE/UPDATE Companies


curl -X PUT \
  https://{API_URL}/partners/v1/companies \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '[{
        "id": "999",
        "name": "Boardwalk Lifestyle",
        "landlord_id": 1,
        "nameFr": "Boardwalk Lifestyle"
    }]'


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/companies")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'
request.body = '[
  {
    "id": "999",
    "name": "Boardwalk Lifestyle",
    "nameFr": "Boardwalk Lifestyle"
  }
]'

response = http.request(request)
puts response.read_body


var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{API_URL}/partners/v1/companies",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {TOKEN}",
  },
  "processData": false,
  "data": '[
    {
      "id": "999",
      "name": "Boardwalk Lifestyle",
      "nameFr": "Boardwalk Lifestyle"
    }
  ]'
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "id": "999",
    "success": true,
    "message": null
  }
]

Batch endpoint to upsert companies (branding) for a specific landlord/client.

HTTP Request

PUT https://{API_URL}/partners/v1/companies

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Parameters

parameter type description
id string Unique identifier of the company
name string Name of the company
nameFr
optional
string Name of the company in French

Sites / Projects

Get Sites / Projects


curl -X GET \
  'https://{API_URL}/partners/v1/sites?limit=:limit&offset=:offset' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/sites?limit=:limit&offset=:offset")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: 'https://{API_URL}/partners/v1/sites?limit=:limit&offset=:offset',
  method: 'GET',
  headers: {
    Accept: 'application/json',
    Authorization: 'Bearer {TOKEN}',
  },
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :limit and :offset

Example Response

[
  {
    "id": "1234",
    "company_id": "1",
    "name": "Brantford",
    "active": true
  },
  {
    "id": "8765",
    "company_id": "2",
    "name": "Brantford",
    "active": true
  }
]

This endpoint retrieves all sites / projects.

HTTP Request

GET https://{API_URL}/partners/v1/sites

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Query Parameters

parameter description
limit Max number of sites to return
offset Skip this number of rows

Get Sites / Projects by Company


curl -X GET \
  'https://{API_URL}/partners/v1/companies/:company_id/sites?limit=:limit&offset=:offset' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/companies/:company_id/sites?limit=:limit&offset=:offset")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: 'https://{API_URL}/partners/v1/companies/:company_id/sites?limit=:limit&offset=:offset',
  method: 'GET',
  headers: {
    Accept: 'application/json',
    Authorization: 'Bearer {TOKEN}',
  },
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :company_id, :limit and :offset

Example Response

[
  {
    "id": "1234",
    "company_id": "1",
    "name": "Brantford",
    "active": true
  }
]

This endpoint retrieves all sites / projects by a specific company.

HTTP Request

GET https://{API_URL}/partners/v1/companies/<company_id>/sites

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter description
company_id Unique ID of company to return sites from

Query Parameters

parameter description
limit Max number of sites to return
offset Skip this number of rows

CREATE/UPDATE Sites / Projects


curl -X PUT \
  https://{API_URL}/partners/v1/sites \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "id": "5001",
      "name": "Auburn Communities",
      "company_id": "1000",
      "active": true
    },
    {
      "id": "5002",
      "name": "Shawnessy Complex",
      "company_id": "2000",
      "active": true
    }
  ]'


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/sites")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'
request.body = '[
  {
    "id": "5001",
    "name": "Auburn Communities",
    "company_id": "1000",
    "active": true
  },
  {
    "id": "5002",
    "name": "Shawnessy Complex",
    "company_id": "2000",
    "active": true
  }
]'

response = http.request(request)
puts response.read_body


var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{API_URL}/partners/v1/sites",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {TOKEN}",
  },
  "processData": false,
  "data": '[
    {
      "id": "5001",
      "name": "Auburn Communities",
      "company_id": "1000",
      "active": true
    },
    {
      "id": "5002",
      "name": "Shawnessy Complex",
      "company_id": "2000",
      "active": true
    }
  ]'
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "id": "5001",
    "success": true,
    "message": null
  },
  {
    "id": "5002",
    "success": true,
    "message": null
  }
]

Batch endpoint to upsert sites /projects for a specific landlord/client.

HTTP Request

PUT https://{API_URL}/partners/v1/sites

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Parameters

parameter type description
id string Unique identifier of site
name string Name of the site / project
company_id string Unique identifier of the company this site is associated to
active boolean Whether the site / project as a whole is active

DELETE Sites / Projects


curl -X DELETE \
  https://{API_URL}/partners/v1/sites/:site_id \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/sites/:site_id")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: 'https://{API_URL}/partners/v1/sites/:site_id',
  method: 'DELETE',
  headers: {
    'Content-Type': 'application/json',
    Accept: 'application/json',
    Authorization: 'Bearer {TOKEN}',
  },
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "message": "Successfully inactivated site"
  }
]

This will inactivate a site as a whole, setting all properties, units, etc, associated to the site inactive.

HTTP Request

DELETE https://{API_URL}/partners/v1/sites/<site_id>

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter type description
site_id string Unique identifier of site to inactivate

Buildings

Get Buildings


curl -X GET \
  'https://{API_URL}/partners/v1/buildings/:building_id' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/buildings/:building_id")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: "https://{API_URL}/partners/v1/buildings/:building_id",
  method: "GET",
  headers: {
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :limit and :offset

Example Response

{
  "id": "1070",
  "site_id": "1",
  "friendly_name": "39 Brant St",
  "legal_name": "39 Brant St",
  "type": "apartment",
  "active": true,
  "address_street": "39 Brant Street",
  "address_city": "Toronto",
  "address_province": "Ontario",
  "address_postal_code": "M5V 1S7",
  "address_country": "Canada",
  "smoking": false,
  "pets": true,
  "services_and_utilities": {
    "services": {
      "gas": { "is_included": true },
      "air_conditioning": { "is_included": true },
      "storage_space": { "is_included": false },
      "on_site_laundry": { "is_included": true, "charge_type": "no_charge" },
      "guest_parking": { "is_included": true, "charge_type": "pay_per_use" }
    },
    "utilities": {
      "electricity": { "paid_by": "landlord" },
      "heat": { "paid_by": "tenant" },
      "water": { "paid_by": "landlord" }
    }
  }
}

This endpoint retrieve a specific building.

HTTP Request

GET https://{API_URL}/partners/v1/buildings/<building_id>

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter description
building_id unique identifier of the building to query

Get Buildings


curl -X GET \
  'https://{API_URL}/partners/v1/buildings?limit=:limit&offset=:offset' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/buildings?limit=:limit&offset=:offset")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: "https://{API_URL}/partners/v1/buildings?limit=:limit&offset=:offset",
  method: "GET",
  headers: {
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :limit and :offset

Example Response

[
  {
    "id": "1070",
    "site_id": "1",
    "friendly_name": "39 Brant St",
    "legal_name": "39 Brant St",
    "type": "apartment",
    "active": true,
    "address_street": "39 Brant Street",
    "address_city": "Toronto",
    "address_province": "Ontario",
    "address_postal_code": "M5V 1S7",
    "address_country": "Canada",
    "smoking": false,
    "pets": true,
    "services_and_utilities": {
      "services": {
        "gas": { "is_included": true },
        "air_conditioning": { "is_included": true },
        "storage_space": { "is_included": false },
        "on_site_laundry": { "is_included": true, "charge_type": "no_charge" },
        "guest_parking": { "is_included": true, "charge_type": "pay_per_use" }
      },
      "utilities": {
        "electricity": { "paid_by": "landlord" },
        "heat": { "paid_by": "tenant" },
        "water": { "paid_by": "landlord" }
      }
    }
  }
]

This endpoint retrieves all buildings.

HTTP Request

GET https://{API_URL}/partners/v1/buildings

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Query Parameters

parameter description
limit Max number of sites to return
offset Skip this number of rows

Get Buildings by Company


curl -X GET \
  'https://{API_URL}/partners/v1/companies/:company_id/buildings?limit=:limit&offset=:offset' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/companies/:company_id/buildings?limit=:limit&offset=:offset")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: "https://{API_URL}/partners/v1/companies/:company_id/buildings?limit=:limit&offset=:offset",
  method: "GET",
  headers: {
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :company_id, :limit and :offset

Example Response

[
  {
    "id": "1070",
    "site_id": "1",
    "friendly_name": "39 Brant St",
    "legal_name": "39 Brant St",
    "type": "apartment",
    "active": true,
    "address_street": "39 Brant Street",
    "address_city": "Toronto",
    "address_province": "Ontario",
    "address_postal_code": "M5V 1S7",
    "address_country": "Canada",
    "smoking": false,
    "pets": true,
    "services_and_utilities": {
      "services": {
        "gas": { "is_included": true },
        "air_conditioning": { "is_included": true },
        "storage_space": { "is_included": false },
        "on_site_laundry": { "is_included": true, "charge_type": "no_charge" },
        "guest_parking": { "is_included": true, "charge_type": "pay_per_use" }
      },
      "utilities": {
        "electricity": { "paid_by": "landlord" },
        "heat": { "paid_by": "tenant" },
        "water": { "paid_by": "landlord" }
      }
    }
  }
]

This endpoint retrieves all buildings by a specific company.

HTTP Request

GET https://{API_URL}/partners/v1/companies/<company_id>/buildings

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter description
company_id Unique ID of company to return buildings from

Query Parameters

parameter description
limit Max number of sites to return
offset Skip this number of rows

CREATE/UPDATE Buildings


curl -X PUT \
  https://{API_URL}/partners/v1/buildings \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "id": "10010",
      "site_id": "5001",
      "company_id": "1000",
      "friendly_name": "Auburn Heights",
      "legal_name": "Auburn Heights Limited 1200",
      "type": "apartment",
      "active": true,
      "address_unit_number": null,
      "address_street": "20 Auburn Street",
      "address_city": "Calgar",
      "address_province": "Alberta",
      "address_country": "Canada",
      "address_postal_code": "T2Y5C3",
      "contact_email": "[email protected]",
      "contact_phone_number": "4033003000",
      "smoking": false,
      "pets": true,
      "services_and_utilities": {
        "services": {
          "gas": { "is_included": true },
          "air_conditioning": { "is_included": true },
          "storage_space": { "is_included": false },
          "on_site_laundry": { "is_included": true, "charge_type": "no_charge" },
          "guest_parking": { "is_included": true, "charge_type": "pay_per_use" },
        },
        "utilities": {
          "electricity": { "paid_by": "landlord" },
          "heat": { "paid_by": "tenant" },
          "water": { "paid_by": "landlord" }
        }
      }
    },
    {
      "id": "10011",
      "site_id": "5002",
      "company_id": "2000",
      "friendly_name": "Shawnessy Heights",
      "legal_name": "Shawnessy 1500",
      "type": "apartment",
      "active": true,
      "address_unit_number": null,
      "address_street": "200 Shawnessy street",
      "address_city": "Toronto",
      "address_province": "Alberta",
      "address_country": "Canada",
      "address_postal_code": "T6J0C10",
      "contact_email": "[email protected]",
      "contact_phone_number": "4036003000",
      "smoking": false,
      "pets": true,
      "services_and_utilities": {
        "services": {
          "gas": { "is_included": true },
          "air_conditioning": { "is_included": true },
          "storage_space": { "is_included": false },
          "on_site_laundry": { "is_included": true, "charge_type": "no_charge" },
          "guest_parking": { "is_included": true, "charge_type": "pay_per_use" },
        },
        "utilities": {
          "electricity": { "paid_by": "landlord" },
          "heat": { "paid_by": "tenant" },
          "water": { "paid_by": "landlord" }
        }
      }
    }
  ]'


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/buildings")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'
request.body = '[
  {
    "id": "10010",
    "site_id": "5001",
    "company_id": "1000",
    "friendly_name": "Auburn Heights",
    "legal_name": "Auburn Heights Limited 1200",
    "type": "apartment",
    "active": true,
    "address_unit_number": null,
    "address_street": "20 Auburn Street",
    "address_city": "Calgar",
    "address_province": "Alberta",
    "address_country": "Canada",
    "address_postal_code": "T2Y5C3",
    "contact_email": "[email protected]",
    "contact_phone_number": "4033003000",
    "smoking": false,
      "pets": true,
      "services_and_utilities": {
        "services": {
          "gas": { "is_included": true },
          "air_conditioning": { "is_included": true },
          "storage_space": { "is_included": false },
          "on_site_laundry": { "is_included": true, "charge_type": "no_charge" },
          "guest_parking": { "is_included": true, "charge_type": "pay_per_use" },
        },
        "utilities": {
          "electricity": { "paid_by": "landlord" },
          "heat": { "paid_by": "tenant" },
          "water": { "paid_by": "landlord" }
        }
      }
  },
  {
    "id": "10011",
    "site_id": "5002",
    "company_id": "2000",
    "friendly_name": "Shawnessy Heights",
    "legal_name": "Shawnessy 1500",
    "type": "apartment",
    "active": true,
    "address_unit_number": null,
    "address_street": "200 Shawnessy street",
    "address_city": "Toronto",
    "address_province": "Alberta",
    "address_country": "Canada",
    "address_postal_code": "T6J0C10",
    "contact_email": "[email protected]",
    "contact_phone_number": "4036003000",
    "smoking": false,
      "pets": true,
      "services_and_utilities": {
        "services": {
          "gas": { "is_included": true },
          "air_conditioning": { "is_included": true },
          "storage_space": { "is_included": false },
          "on_site_laundry": { "is_included": true, "charge_type": "no_charge" },
          "guest_parking": { "is_included": true, "charge_type": "pay_per_use" },
        },
        "utilities": {
          "electricity": { "paid_by": "landlord" },
          "heat": { "paid_by": "tenant" },
          "water": { "paid_by": "landlord" }
        }
      }
  }
]'

response = http.request(request)
puts response.read_body


var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{API_URL}/partners/v1/buildings",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {TOKEN}",
  },
  "processData": false,
  "data": '[
    {
      "id": "10010",
      "site_id": "5001",
      "company_id": "1000",
      "friendly_name": "Auburn Heights",
      "legal_name": "Auburn Heights Limited 1200",
      "type": "apartment",
      "active": true,
      "address_unit_number": null,
      "address_street": "20 Auburn Street",
      "address_city": "Calgar",
      "address_province": "Alberta",
      "address_country": "Canada",
      "address_postal_code": "T2Y5C3",
      "contact_email": "[email protected]",
      "contact_phone_number": "4033003000",
      "smoking": false,
      "pets": true,
      "services_and_utilities": {
        "services": {
          "gas": { "is_included": true },
          "air_conditioning": { "is_included": true },
          "storage_space": { "is_included": false },
          "on_site_laundry": { "is_included": true, "charge_type": "no_charge" },
          "guest_parking": { "is_included": true, "charge_type": "pay_per_use" },
        },
        "utilities": {
          "electricity": { "paid_by": "landlord" },
          "heat": { "paid_by": "tenant" },
          "water": { "paid_by": "landlord" }
        }
      }
    },
    {
      "id": "10011",
      "site_id": "5002",
      "company_id": "2000",
      "friendly_name": "Shawnessy Heights",
      "legal_name": "Shawnessy 1500",
      "type": "apartment",
      "active": true,
      "address_unit_number": null,
      "address_street": "200 Shawnessy street",
      "address_city": "Toronto",
      "address_province": "Alberta",
      "address_country": "Canada",
      "address_postal_code": "T6J0C10",
      "contact_email": "[email protected]",
      "contact_phone_number": "4036003000",
      "smoking": false,
      "pets": true,
      "services_and_utilities": {
        "services": {
          "gas": { "is_included": true },
          "air_conditioning": { "is_included": true },
          "storage_space": { "is_included": false },
          "on_site_laundry": { "is_included": true, "charge_type": "no_charge" },
          "guest_parking": { "is_included": true, "charge_type": "pay_per_use" },
        },
        "utilities": {
          "electricity": { "paid_by": "landlord" },
          "heat": { "paid_by": "tenant" },
          "water": { "paid_by": "landlord" }
        }
      }
    }
  ]'
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "id": "10010",
    "success": true,
    "message": null
  },
  {
    "id": "10011",
    "success": true,
    "message": null
  }
]

Batch endpoint to upsert buildings for a specific landlord/client.

HTTP Request

PUT https://{API_URL}/partners/v1/buildings

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Parameters

parameter type description
id string Unique identifier of building
active boolean Whether the building is visible on the landlord portal, and ready to be rented
site_id string Unique identifier of site building is associated to
company_id string Unique identifier of company building is associated to
friendly_name string Name of the building that will be shown in the resident portal
legal_name string Name of the building that will be used in any legal document e.g., leases
type string Always use apartments
address_unit_number
optional
string Address unit number
address_street string Street number and street name, e.g. 180 John st.
address_city string City name, e.g. Calgary
address_province string Province name, e.g. Alberta
address_country string Country name, e.g. Canada
address_postal_code string Postal code eg. N3T1A1
contact_email
optional
string The email of the rental office for this building
contact_phone_number
optional
string The phone number of the rental office for this building
lease_cancellation_reasons
optional
array Array of valid lease cancellation reasons
smoking
optional
boolean Smoking allowed, default false
pets
optional
boolean Pets allowed, default true
services_and_utilities
optional
object Hash for services and utilities, see example to the side

DELETE Building


curl -X DELETE \
  https://{API_URL}/partners/v1/buildings/:building_id \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/buildings/:building_id")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: "https://{API_URL}/partners/v1/buildings/:building_id",
  method: "DELETE",
  headers: {
    "Content-Type": "application/json",
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "message": "Successfully inactivated building"
  }
]

This will inactivate a building as a whole, units associated to the property inactive.

HTTP Request

DELETE https://{API_URL}/partners/v1/buildings/<building_id>

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter type description
building_id string Unique identifier of building to inactivate

Unit Type

Get Unit Types


curl -X GET \
  'https://{API_URL}/partners/v1/unit_types' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/unit_types")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: "https://{API_URL}/partners/v1/unit_types",
  method: "GET",
  headers: {
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace `API_URL, TOKEN

Example Response

[
  {
    "id": "1",
    "active": "true",
    "name": "2bed 1 bath",
    "bedrooms": 2,
    "bathrooms": 1,
    "den": false,
    "deposit_amount_cents": 100000,
    "property_names": ["Yuhu Heights"],
    "property_ids": ["123"]
  },
  {
    "id": "2",
    "active": "true",
    "name": "1bed 1 bath",
    "bedrooms": 1,
    "bathrooms": 1,
    "den": false,
    "deposit_amount_cents": 80000,
    "property_names": ["Yuhu Heights"],
    "property_ids": ["123"]
  }
]

This endpoint retrieves all Unit Types.

HTTP Request

GET https://{API_URL}/partners/v1/unit_types

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Get Unit Types by Building


curl -X GET \
  'https://{API_URL}/partners/v1/buildings/123/unit_types' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/buildings/123/unit_types")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: "https://{API_URL}/partners/v1/buildings/123/unit_types",
  method: "GET",
  headers: {
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace `API_URL, TOKEN

Example Response

[
  {
    "id": "1",
    "active": "true",
    "name": "2bed 1 bath",
    "bedrooms": 2,
    "bathrooms": 1,
    "den": false,
    "deposit_amount_cents": 100000,
    "property_names": ["Yuhu Heights"],
    "property_ids": ["123"]
  },
  {
    "id": "2",
    "active": "true",
    "name": "1bed 1 bath",
    "bedrooms": 1,
    "bathrooms": 1,
    "den": false,
    "deposit_amount_cents": 80000,
    "property_names": ["Yuhu Heights"],
    "property_ids": ["123"]
  }
]

This endpoint retrieves all Unit Types.

HTTP Request

GET https://{API_URL}/partners/v1/buildings/<building_id>/unit_types

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter description
building_id Unique ID of building to return unit types from

CREATE/UPDATE Unit Types


curl -X PUT \
  https://{API_URL}/partners/v1/unit_types \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "id": "2001",
      "active": true
      "name": "1 bedroom",
      "bathrooms": 1
      "bathrooms": 1
      "den": true
      "deposit_amount_cents": 100000
    },
    {
      "id": "2002",
      "active": true
      "name": "2 bedroom",
      "bathrooms": 1
      "bathrooms": 2
      "den": true
      "deposit_amount_cents": 200000
    }
  ]'


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/unit_types")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'
request.body = '[
  {
      "id": "2001",
      "active": true
      "name": "1 bedroom",
      "bathrooms": 1
      "bathrooms": 1
      "den": true
      "deposit_amount_cents": 100000
    },
    {
      "id": "2002",
      "active": true
      "name": "2 bedroom",
      "bathrooms": 1
      "bathrooms": 2
      "den": true
      "deposit_amount_cents": 200000
    }
]'

response = http.request(request)
puts response.read_body


var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{API_URL}/partners/v1/unit_types",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {TOKEN}",
  },
  "processData": false,
  "data": '[
    {
      "id": "2001",
      "active": true
      "name": "1 bedroom",
      "bathrooms": 1
      "bathrooms": 1
      "den": true
      "deposit_amount_cents": 100000
    },
    {
      "id": "2002",
      "active": true
      "name": "2 bedroom",
      "bathrooms": 1
      "bathrooms": 2
      "den": true
      "deposit_amount_cents": 200000
    }
  ]'
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "id": "2001",
    "success": true,
    "message": null
  },
  {
    "id": "2002",
    "success": true,
    "message": null
  }
]

Batch endpoint to upsert unit types for a specific landlord/client.

HTTP Request

PUT https://{API_URL}/partners/v1/unit_types

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Parameters

parameter type description
id string Unique identifier of unit type
active boolean Whether the unit type is visible on the landlord portal
name string Name of the unit type, is public facing
bathrooms
optional
number
bedrooms
optional
number
den boolean Whether or not the unit type has a den
deposit_amount_cents number Indicates the deposit amount in cents. e.g. \$1000.00 = 100000

DELETE Unit Type


curl -X DELETE \
  https://{API_URL}/partners/v1/unit_types/:unit_type_id \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/unit_types/:unit_type_id")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: "https://{API_URL}/partners/v1/unit_types/:unit_type_id",
  method: "DELETE",
  headers: {
    "Content-Type": "application/json",
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "message": "Successfully inactivated unit type"
  }
]

This will inactivate a unit.

HTTP Request

DELETE https://{API_URL}/partners/v1/unit_types/<unit_type_id>

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter type description
unit_type_id string Unique identifier of unit to inactivate

Units

Get Units


curl -X GET \
  'https://{API_URL}/partners/v1/units?limit=:limit&offset=:offset' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/units?limit=:limit&offset=:offset")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: "https://{API_URL}/partners/v1/units?limit=:limit&offset=:offset",
  method: "GET",
  headers: {
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :limit and :offset

Example Response

[
  {
    "id": "1",
    "building_id": "1",
    "unit_number": "100",
    "square_footage": 1000,
    "number_of_beds": null,
    "number_of_baths": "1",
    "furnished": false,
    "den": false,
    "smoking": false,
    "floor": null,
    "riser": null,
    "monthly_market_rent_amount": 100000,
    "monthly_absolute_rent_amount": 100000,
    "active": true
  }
]

This endpoint retrieves all units.

HTTP Request

GET https://{API_URL}/partners/v1/units

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Query Parameters

parameter description
limit Max number of sites to return
offset Skip this number of rows

Get Units by Building


curl -X GET \
  'https://{API_URL}/partners/v1/buildings/:building_id/units?limit=:limit&offset=:offset' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/buildings/:building_id/units?limit=:limit&offset=:offset")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: "https://{API_URL}/partners/v1/buildings/:building_id/units?limit=:limit&offset=:offset",
  method: "GET",
  headers: {
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :company_id, :limit and :offset

Example Response

[
  {
    "id": "1",
    "building_id": "1",
    "unit_number": "100",
    "square_footage": 1000,
    "number_of_beds": null,
    "number_of_baths": "1",
    "furnished": false,
    "den": false,
    "smoking": false,
    "floor": null,
    "riser": null,
    "monthly_market_rent_amount": 100000,
    "monthly_absolute_rent_amount": 100000,
    "active": true,
    "is_bookable": true,
    "availability_date": "2020-02-01"
  }
]

This endpoint retrieves all units within a building.

HTTP Request

GET https://{API_URL}/partners/v1/buildings/<building_id>/units

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter description
building_id Unique ID of building to return units from

Query Parameters

parameter description
limit Max number of sites to return
offset Skip this number of rows

CREATE/UPDATE Units


curl -X PUT \
  https://{API_URL}/partners/v1/units \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "id": "2001",
      "building_id": "50010",
      "unit_number": "101",
      "company_id": "1000",
      "floor": "1",
      "row": null,
      "square_footage": 700,
      "number_of_beds": 1,
      "number_of_baths": 2,
      "furnished": false,
      "den": false,
      "smoking": false,
      "monthly_market_rent_amount": null,
      "monthly_absolute_rent_amount": null,
      "active": true
    },
    {
      "id": "2002",
      "building_id": "50011",
      "unit_number": "202",
      "company_id": "2000",
      "floor": null,
      "row": "10",
      "square_footage": 700,
      "number_of_beds": 1,
      "number_of_baths": 2,
      "furnished": false,
      "den": false,
      "smoking": false,
      "monthly_market_rent_amount": null,
      "monthly_absolute_rent_amount": null,
      "active": true
    }
  ]'


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/units")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'
request.body = '[
  {
      "id": "2001",
      "building_id": "50010",
      "unit_number": "101",
      "company_id": "1000",
      "floor": "1",
      "row": null,
      "square_footage": 700,
      "number_of_beds": 1,
      "number_of_baths": 2,
      "furnished": false,
      "den": false,
      "smoking": false,
      "monthly_market_rent_amount": null,
      "monthly_absolute_rent_amount": null,
      "active": true
    },
    {
      "id": "2002",
      "building_id": "50011",
      "unit_number": "202",
      "company_id": "2000",
      "floor": null,
      "row": "10",
      "square_footage": 700,
      "number_of_beds": 1,
      "number_of_baths": 2,
      "furnished": false,
      "den": false,
      "smoking": false,
      "monthly_market_rent_amount": null,
      "monthly_absolute_rent_amount": null,
      "active": true
    }
]'

response = http.request(request)
puts response.read_body


var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{API_URL}/partners/v1/buildings",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {TOKEN}",
  },
  "processData": false,
  "data": '[
    {
      "id": "2001",
      "building_id": "50010",
      "unit_number": "101",
      "company_id": "1000",
      "floor": "1",
      "row": null,
      "square_footage": 700,
      "number_of_beds": 1,
      "number_of_baths": 2,
      "furnished": false,
      "den": false,
      "smoking": false,
      "monthly_market_rent_amount": null,
      "monthly_absolute_rent_amount": null,
      "active": true
    },
    {
      "id": "2002",
      "building_id": "50011",
      "unit_number": "202",
      "company_id": "2000",
      "floor": null,
      "row": "10",
      "square_footage": 700,
      "number_of_beds": 1,
      "number_of_baths": 2,
      "furnished": false,
      "den": false,
      "smoking": false,
      "monthly_market_rent_amount": null,
      "monthly_absolute_rent_amount": null,
      "active": true
    }
  ]'
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "id": "2001",
    "success": true,
    "message": null
  },
  {
    "id": "2002",
    "success": true,
    "message": null
  }
]

Batch endpoint to upsert units for a specific landlord/client.

HTTP Request

PUT https://{API_URL}/partners/v1/units

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Parameters

parameter type description
id string Unique identifier of unit
active boolean Whether the unit is visible on the landlord portal, and ready to be rented
building_id string The building that this unit belongs to
unit_type_id
optional
string The unit type that this unit belongs to
company_id string Unique identifier of company unit is associated to
unit_number string
floor
optional
string
riser
optional
string The vertical section of a building typically where the water pipes run
square_footage
optional
string
number_of_beds
optional
string
number_of_baths
optional
string
furnished
optional
boolean
den
optional
boolean
smoking
optional
boolean
monthly_market_rent_amount number Indicates the default amount in cents to have as monthly rent for this unit. e.g. \$1000.00 = 100000
monthly_absolute_rent_amount
optional
number Indicates the default amount in cents to have as the absolute/effective rent for this unit (after concessions are applied).
market_deposit_amount
optional
number Indicates the market deposit amount in cents.

DELETE Unit


curl -X DELETE \
  https://{API_URL}/partners/v1/units/:unit_id \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/units/:unit_id")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: "https://{API_URL}/partners/v1/units/:unit_id",
  method: "DELETE",
  headers: {
    "Content-Type": "application/json",
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "message": "Successfully inactivated unit"
  }
]

This will inactivate a unit.

HTTP Request

DELETE https://{API_URL}/partners/v1/units/<unit_id>

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter type description
unit_id string Unique identifier of unit to inactivate

Site Staff

Get Site Staff


curl -X GET \
  'https://{API_URL}/partners/v1/site_staff?limit=:limit&offset=:offset' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/site_staff?limit=:limit&offset=:offset")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: 'https://{API_URL}/partners/v1/site_staff?limit=:limit&offset=:offset',
  method: 'GET',
  headers: {
    Accept: 'application/json',
    Authorization: 'Bearer {TOKEN}',
  },
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :limit and :offset

Example Response

[
  {
    "id": "1",
    "active": true,
    "email": "[email protected]",
    "language": "en",
    "first_name": "Michael",
    "last_name": "Scott",
    "mobile_number": "1234567890",
    "office_number": "1234567890",
    "office_number_extension": null,
    "role_id": "4",
    "role_name": "admin",
    "target_building_ids": ["1", "2"]
  }
]

This endpoint retrieves all site staff.

HTTP Request

GET https://{API_URL}/partners/v1/site_staff

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Query Parameters

parameter description
limit Max number of site staff to return
offset Skip this number of rows

CREATE/UPDATE Site Staff


curl -X PUT \
  https://{API_URL}/partners/v1/site_staff \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '[
    {
        "id": "2",
        "active": true,
        "email": "[email protected]",
        "language": "en-ca",
        "first_name": "Al",
        "last_name": "Berto",
        "mobile_number": "6754715555",
        "office_number": "6754715555",
        "office_number_extension": "4321",
        "role_id": "1"
    }
]'


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/site_staff")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'
request.body = '[
  {
    "id": "2",
    "active": true,
    "email": "[email protected]",
    "language": "en-ca",
    "first_name": "Al",
    "last_name": "Berto",
    "mobile_number": "6754715555",
    "office_number": "6754715555",
    "office_number_extension": "4321",
    "role_id": "1"
  }
]'

response = http.request(request)
puts response.read_body


var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{API_URL}/partners/v1/site_staff",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {TOKEN}",
  },
  "processData": false,
  "data": '[
    {
      "id": "2",
      "active": true,
      "email": "[email protected]",
      "language": "en-ca",
      "first_name": "Al",
      "last_name": "Berto",
      "mobile_number": "6754715555",
      "office_number": "6754715555",
      "office_number_extension": "4321",
      "role_id": "1"
    }
  ]'
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "id": "2",
    "success": true,
    "message": null
  }
]

Batch endpoint to upsert site staff (associates) for a specific landlord/client.

HTTP Request

PUT https://{API_URL}/partners/v1/site_staff

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Parameters

parameter type description
id string Unique identifier of the user
active
optional
boolean Setting to false will inactivate user
email string reqiured
language string Requested language of the user. Valid values: en-ca, fr-ca
first_name string First name of user
last_name string Last name of user
mobile_number
optional
string Only numbers. e.g. (123)-456-7890 -> 1234567890
office_number
optional
string Only numbers. e.g. (123)-456-7890 -> 1234567890
office_number_extension
optional
string
target_building_ids
optional
array Buildings this agent is assigned to. Will default to none when not provided ["1", "2", "3"]
role_id string See Roles & Permissions to create / upload a role

Roles & Permissions

Get Roles & Permissions


curl -X GET \
  'https://{API_URL}/partners/v1/roles?limit=:limit&offset=:offset' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/roles?limit=:limit&offset=:offset")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: 'https://{API_URL}/partners/v1/roles?limit=:limit&offset=:offset',
  method: 'GET',
  headers: {
    Accept: 'application/json',
    Authorization: 'Bearer {TOKEN}',
  },
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :limit and :offset

Example Response

[
  {
    "id": "4",
    "name": "Plumber",
    "permissions": {
      "dashboard": false,
      "reporting": false,
      "applications": true,
      "rent_roll": false,
      "maintenance": false,
      "tenants": false,
      "events": false,
      "notices": false,
      "amenities": false,
      "promotions": false,
      "messaging": false,
      "properties": false,
      "users": false
    }
  }
]

This endpoint retrieves all roles & permissions.

HTTP Request

GET https://{API_URL}/partners/v1/roles

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Query Parameters

parameter description
limit Max number of roles to return
offset Skip this number of rows

CREATE/UPDATE Roles & Permissions


curl -X PUT \
  https://{API_URL}/partners/v1/roles \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "id": "1",
      "name": "Marketing",
      "permissions": {
        "dashboard": false,
        "reporting": false,
        "applications": true,
        "rent_roll": false,
        "maintenance": false,
        "tenants": false,
        "events": false,
        "notices": false,
        "amenities": false,
        "promotions": false,
        "messaging": false,
        "properties": false,
        "users": false
      }
    }
  ]'


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/roles")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'
request.body = '[
  {
    "id": "1",
    "name": "Marketing",
    "permissions": {
        "dashboard": false,
        "reporting": false,
        "applications": true,
        "rent_roll": false,
        "maintenance": false,
        "tenants": false,
        "events": false,
        "notices": false,
        "amenities": false,
        "promotions": false,
        "messaging": false,
        "properties": false,
        "users": false
    }
  }
]'

response = http.request(request)
puts response.read_body


var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{API_URL}/partners/v1/roles",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {TOKEN}",
  },
  "processData": false,
  "data": '[
    {
      "id": "1",
      "name": "Marketing",
      "permissions": {
          "dashboard": false,
          "reporting": false,
          "applications": true,
          "rent_roll": false,
          "maintenance": false,
          "tenants": false,
          "events": false,
          "notices": false,
          "amenities": false,
          "promotions": false,
          "messaging": false,
          "properties": false,
          "users": false
      }
    }
  ]'
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "id": "1",
    "success": true,
    "message": null
  }
]

Batch endpoint to upsert roles & permissions for a specific landlord/client.

HTTP Request

PUT https://{API_URL}/partners/v1/roles

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Parameters

parameter type description
id string Unique identifier of role
name
optional
string Name of the role, e.g. Concierege
permissions object See below

Permissions Object

Attach within the payload, an object containing the following options and true/false for their values.

option description
dashboard Main dashboard
reporting Reporting
applications Applications
rent_roll Rent roll & leasing
maintenance Maintenance tickets
tenants Tenants / Residents
notices Notices
amenities Amenities
promotions Promotions
messaging Messaging
properties Properties
users Site staff

Leases

Get Leases


curl -X GET \
  'https://{API_URL}/partners/v1/leases?limit=:limit&offset=:offset' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/leases?limit=:limit&offset=:offset")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: 'https://{API_URL}/partners/v1/leases?limit=:limit&offset=:offset',
  method: 'GET',
  headers: {
    Accept: 'application/json',
    Authorization: 'Bearer {TOKEN}',
  },
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :limit and :offset

Example Response

[
  {
    "id": "363340",
    "unit_id": "4",
    "start_date": "2018-09-01",
    "end_date": "2020-12-31",
    "early_move_in_date": "2018-09-01",
    "month_to_month": false,
    "monthly_rent_amount": 100000,
    "deposit_amount": 1000,
    "key_deposit_amount": 0
  }
]

This endpoint retrieves all leases.

HTTP Request

GET https://{API_URL}/partners/v1/leases

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Query Parameters

parameter description
limit Max number of sites to return
offset Skip this number of rows

Get Leases by Building


curl -X GET \
  'https://{API_URL}/partners/v1/buildings/:building_id/leases?limit=:limit&offset=:offset' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/buildings/:building_id/leases?limit=:limit&offset=:offset")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: 'https://{API_URL}/partners/v1/buildings/:building_id/leases?limit=:limit&offset=:offset',
  method: 'GET',
  headers: {
    Accept: 'application/json',
    Authorization: 'Bearer {TOKEN}',
  },
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :company_id, :limit and :offset

Example Response

[
  {
    "id": "363340",
    "unit_id": "4",
    "start_date": "2018-09-01",
    "end_date": "2020-12-31",
    "early_move_in_date": "2018-09-01",
    "month_to_month": false,
    "monthly_rent_amount": 100000,
    "deposit_amount": 1000,
    "key_deposit_amount": 0
  }
]

This endpoint retrieves all leases by a specific building.

HTTP Request

GET https://{API_URL}/partners/v1/buildings/<building_id>/leases

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter description
building_id Unique ID of building to return tenants from

Query Parameters

parameter description
limit Max number of sites to return
offset Skip this number of rows

CREATE/UPDATE Leases


curl -X PUT \
  https://{API_URL}/partners/v1/leases \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "id": "9001",
      "company_id": "1000",
      "unit_id": "2001",
      "start_date": "2017-01-01",
      "end_date": "2019-12-31",
      "early_move_in_date": null,
      "termination_date": null,
      "month_to_month": false,
      "monthly_rent_amount": 100000,
      "deposit_amount": 5000,
      "key_deposit_amount": 2500
    },
    {
      "id": "9002",
      "company_id": "2000",
      "unit_id": "2002",
      "start_date": "2019-05-01",
      "end_date": "2020-04-30",
      "early_move_in_date": null,
      "termination_date": null,
      "month_to_month": false,
      "monthly_rent_amount": 100000,
      "deposit_amount": 5000,
      "key_deposit_amount": 2500
    }
  ]'


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/leases")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'
request.body = '[
  {
    "id": "9001",
    "company_id": "1000",
    "unit_id": "2001",
    "start_date": "2017-01-01",
    "end_date": "2019-12-31",
    "early_move_in_date": null,
    "termination_date": null,
    "month_to_month": false,
    "monthly_rent_amount": 100000,
    "deposit_amount": 5000,
    "key_deposit_amount": 2500
  },
  {
    "id": "9002",
    "company_id": "2000",
    "unit_id": "2002",
    "start_date": "2019-05-01",
    "end_date": "2020-04-30",
    "early_move_in_date": null,
    "termination_date": null,
    "month_to_month": false,
    "monthly_rent_amount": 100000,
    "deposit_amount": 5000,
    "key_deposit_amount": 2500
  }
]'

response = http.request(request)
puts response.read_body


var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{API_URL}/partners/v1/leases",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {TOKEN}",
  },
  "processData": false,
  "data": '[
    {
      "id": "9001",
      "company_id": "1000",
      "unit_id": "2001",
      "start_date": "2017-01-01",
      "end_date": "2019-12-31",
      "early_move_in_date": null,
      "termination_date": null,
      "month_to_month": false,
      "monthly_rent_amount": 100000,
      "deposit_amount": 5000,
      "key_deposit_amount": 2500
    },
    {
      "id": "9002",
      "company_id": "2000",
      "unit_id": "2002",
      "start_date": "2019-05-01",
      "end_date": "2020-04-30",
      "early_move_in_date": null,
      "termination_date": null,
      "month_to_month": false,
      "monthly_rent_amount": 100000,
      "deposit_amount": 5000,
      "key_deposit_amount": 2500
    }
  ]'
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "id": "9001",
    "success": true,
    "message": null
  },
  {
    "id": "9002",
    "success": true,
    "message": null
  }
]

Batch endpoint to upsert leases for a specific landlord/client.

HTTP Request

PUT https://{API_URL}/partners/v1/leases

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Parameters

parameter type description
id string Unique identifier of lease. Will be displayed on portal
company_id string The company that this lease belongs to
unit_id string The unit that this lease is assigned to.
start_date string The start date of the lease in yyy-mm-dd format, e.g. 2017-09-01
end_date
optional
string The current end date (anniversary date) of the lease in yyy-mm-dd format, e.g. 2017-09-01
early_move_in_date
optional
string Early move in date for lease, in yyy-mm-dd format, e.g. 2017-09-01. Defaults to start_date if null
termination_date
optional
string the effective end date of the lease. If passed, the lease will be terminated, and tenants will be deactived after 5 days of this date. In yyy-mm-dd format, e.g. 2017-09-01
month_to_month boolean whether the lease is month-to-month
monthly_rent_amount number Indicates the base rent in cents for the unit on this lease (not including ancillary items), e.g. \$10.00 = 1000
deposit_amount
optional
number Indicates the deposit or last month rent in cents, e.g. \$10.00 = 1000
key_deposit_amount
optional
number Indicates the key deposit for the unit on this lease in cents, e.g. \$10.00 = 1000

CREATE/UPDATE Leases (ASYNC)


curl -X PUT \
  https://{API_URL}/partners/v1/async/leases?group_key=:group_key \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "id": "9001",
      "company_id": "1000",
      "unit_id": "2001",
      "start_date": "2017-01-01",
      "end_date": "2019-12-31",
      "early_move_in_date": null,
      "termination_date": null,
      "month_to_month": false,
      "monthly_rent_amount": 100000,
      "deposit_amount": 5000,
      "key_deposit_amount": 2500
    },
    {
      "id": "9002",
      "company_id": "2000",
      "unit_id": "2002",
      "start_date": "2019-05-01",
      "end_date": "2020-04-30",
      "early_move_in_date": null,
      "termination_date": null,
      "month_to_month": false,
      "monthly_rent_amount": 100000,
      "deposit_amount": 5000,
      "key_deposit_amount": 2500
    }
  ]'


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/async/leases?group_key=:group_key")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'
request.body = '[
  {
    "id": "9001",
    "company_id": "1000",
    "unit_id": "2001",
    "start_date": "2017-01-01",
    "end_date": "2019-12-31",
    "early_move_in_date": null,
    "termination_date": null,
    "month_to_month": false,
    "monthly_rent_amount": 100000,
    "deposit_amount": 5000,
    "key_deposit_amount": 2500
  },
  {
    "id": "9002",
    "company_id": "2000",
    "unit_id": "2002",
    "start_date": "2019-05-01",
    "end_date": "2020-04-30",
    "early_move_in_date": null,
    "termination_date": null,
    "month_to_month": false,
    "monthly_rent_amount": 100000,
    "deposit_amount": 5000,
    "key_deposit_amount": 2500
  }
]'

response = http.request(request)
puts response.read_body


var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{API_URL}/partners/v1/async/leases?group_key=:group_key",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {TOKEN}",
  },
  "processData": false,
  "data": '[
    {
      "id": "9001",
      "company_id": "1000",
      "unit_id": "2001",
      "start_date": "2017-01-01",
      "end_date": "2019-12-31",
      "early_move_in_date": null,
      "termination_date": null,
      "month_to_month": false,
      "monthly_rent_amount": 100000,
      "deposit_amount": 5000,
      "key_deposit_amount": 2500
    },
    {
      "id": "9002",
      "company_id": "2000",
      "unit_id": "2002",
      "start_date": "2019-05-01",
      "end_date": "2020-04-30",
      "early_move_in_date": null,
      "termination_date": null,
      "month_to_month": false,
      "monthly_rent_amount": 100000,
      "deposit_amount": 5000,
      "key_deposit_amount": 2500
    }
  ]'
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "message": "Enqueued 1 jobs.",
    "report_link": "https://{API_URL}/partners/async/async_jobs/:group_key"
  }
]

Batch endpoint to upsert leases asynchronously for a specific landlord/client.

HTTP Request

PUT https://{API_URL}/partners/v1/async/leases

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Url Parameters

parameter description
group_key Will associate all requests under one group key. Sending multiple requests to the same group key will put all messages under the same link

Parameters

parameter type description
id string Unique identifier of lease. Will be displayed on portal
company_id string The company that this lease belongs to
unit_id string The unit that this lease is assigned to.
start_date string The start date of the lease in yyy-mm-dd format, e.g. 2017-09-01
end_date
optional
string The current end date (anniversary date) of the lease in yyy-mm-dd format, e.g. 2017-09-01
early_move_in_date
optional
string Early move in date for lease, in yyy-mm-dd format, e.g. 2017-09-01. Defaults to start_date if null
termination_date
optional
string the effective end date of the lease. If passed, the lease will be terminated, and tenants will be deactived after 5 days of this date. In yyy-mm-dd format, e.g. 2017-09-01
month_to_month boolean whether the lease is month-to-month
monthly_rent_amount number Indicates the base rent in cents for the unit on this lease (not including ancillary items), e.g. \$10.00 = 1000
deposit_amount
optional
number Indicates the deposit or last month rent in cents, e.g. \$10.00 = 1000
key_deposit_amount
optional
number Indicates the key deposit for the unit on this lease in cents, e.g. \$10.00 = 1000

Tenants

Get Tenants


curl -X GET \
  'https://{API_URL}/partners/v1/tenants?limit=:limit&offset=:offset' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/tenants?limit=:limit&offset=:offset")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: 'https://{API_URL}/partners/v1/tenants?limit=:limit&offset=:offset',
  method: 'GET',
  headers: {
    Accept: 'application/json',
    Authorization: 'Bearer {TOKEN}',
  },
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :limit and :offset

Example Response

[
  {
    "id": "123",
    "lease_id": "363340",
    "first_name": "Jane",
    "last_name": "Doe",
    "phone_number": "1234567890",
    "email": "[email protected]",
    "move_in_date": "2017-09-01",
    "move_out_date": null
  }
]

This endpoint retrieves all tenants.

HTTP Request

GET https://{API_URL}/partners/v1/tenants

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Query Parameters

parameter description
limit Max number of sites to return
offset Skip this number of rows

Get Leases by Building


curl -X GET \
  'https://{API_URL}/partners/v1/buildings/:building_id/tenants?limit=:limit&offset=:offset' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/buildings/:building_id/tenants?limit=:limit&offset=:offset")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: 'https://{API_URL}/partners/v1/buildings/:building_id/tenants?limit=:limit&offset=:offset',
  method: 'GET',
  headers: {
    Accept: 'application/json',
    Authorization: 'Bearer {TOKEN}',
  },
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :company_id, :limit and :offset

Example Response

[
  {
    "id": "123",
    "lease_id": "363340",
    "first_name": "Jane",
    "last_name": "Doe",
    "phone_number": "1234567890",
    "email": "[email protected]",
    "move_in_date": "2017-09-01",
    "move_out_date": null
  }
]

This endpoint retrieves all tenants by a specific building.

HTTP Request

GET https://{API_URL}/partners/v1/buildings/<building_id>/tenants

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter description
building_id Unique ID of building to return tenants from

Query Parameters

parameter description
limit Max number of sites to return
offset Skip this number of rows

CREATE/UPDATE Tenants


curl -X PUT \
  https://{API_URL}/partners/v1/tenants \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "id": "1",
      "company_id": "1000",
      "lease_id": "1",
      "first_name": "Alberto",
      "last_name": "Saavedra",
      "phone_number": "4033001111",
      "email": "[email protected]",
      "move_in_date": "2019-04-21",
      "move_out_date": null
    }
  ]'


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/tenants")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'
request.body = '[
  {
    "id": "1",
    "company_id": "1000",
    "lease_id": "1",
    "first_name": "Alberto",
    "last_name": "Saavedra",
    "phone_number": "4033001111",
    "email": "[email protected]",
    "move_in_date": "2019-04-21",
    "move_out_date": null
  }
]'

response = http.request(request)
puts response.read_body


var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{API_URL}/partners/v1/tenants",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {TOKEN}",
  },
  "processData": false,
  "data": '[
    {
      "id": "1",
      "company_id": "1000",
      "lease_id": "1",
      "first_name": "Alberto",
      "last_name": "Saavedra",
      "phone_number": "4033001111",
      "email": "[email protected]",
      "move_in_date": "2019-04-21",
      "move_out_date": null
    }
  ]'
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "id": "1",
    "success": true,
    "message": null
  }
]

Batch endpoint to upsert tenants for a specific landlord/client.

HTTP Request

PUT https://{API_URL}/partners/v1/tenants

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Parameters

parameter type description
id string Unique identifier of tenant.
lease_id string The lease that this tenant belongs to
first_name string
last_name string
phone_number
optional
string Only numbers. e.g. (123)-456-7890 -> 1234567890
email
optional
string
move_in_date string The date that the tenant moved in. It varies from cotenant to cotenant if the cotenant is a roommate. yyy-mm-dd format, e.g. 2017-09-01
move_out_date
optional
string when the tenant decides to move out of the current lease. When passed, the tenant account is deactivated after 5 days. yyy-mm-dd format, e.g. 2017-09-01
emergency_contact
optional
object Emergency contact of the tenant. See below
language string Default language code for tenant. Valid values: en-ca, fr-ca, en, fr
pad_status string Valid values are: approved, rejected

Emergency Contact

parameter type description
full_name string Full name of emergency contact
phone_number
optional
string Only numbers. e.g. (123)-456-7890 -> 1234567890

CREATE/UPDATE Tenants (ASYNC)


curl -X PUT \
  https://{API_URL}/partners/v1/async/tenants?group_key=:group_key \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "id": "1",
      "company_id": "1000",
      "lease_id": "1",
      "first_name": "Alberto",
      "last_name": "Saavedra",
      "phone_number": "4033001111",
      "email": "[email protected]",
      "move_in_date": "2019-04-21",
      "move_out_date": null
    }
  ]'


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/async/tenants?group_key=:group_key")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'
request.body = '[
  {
    "id": "1",
    "company_id": "1000",
    "lease_id": "1",
    "first_name": "Alberto",
    "last_name": "Saavedra",
    "phone_number": "4033001111",
    "email": "[email protected]",
    "move_in_date": "2019-04-21",
    "move_out_date": null
  }
]'

response = http.request(request)
puts response.read_body


var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{API_URL}/partners/v1/async/tenants?group_key=:group_key",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {TOKEN}",
  },
  "processData": false,
  "data": '[
    {
      "id": "1",
      "company_id": "1000",
      "lease_id": "1",
      "first_name": "Alberto",
      "last_name": "Saavedra",
      "phone_number": "4033001111",
      "email": "[email protected]",
      "move_in_date": "2019-04-21",
      "move_out_date": null
    }
  ]'
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "message": "Enqueued 1 jobs.",
    "report_link": "https://{API_URL}/partners/async/async_jobs/:group_key"
  }
]

Batch endpoint to upsert tenants asynchronously for a specific landlord/client.

HTTP Request

PUT https://{API_URL}/partners/v1/async/tenants

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Url Parameters

parameter description
group_key Will associate all requests under one group key. Sending multiple requests to the same group key will put all messages under the same link

Parameters

parameter type description
id string Unique identifier of tenant.
lease_id string The lease that this tenant belongs to
first_name string
last_name string
phone_number
optional
string Only numbers. e.g. (123)-456-7890 -> 1234567890
email
optional
string
move_in_date string The date that the tenant moved in. It varies from cotenant to cotenant if the cotenant is a roommate. yyy-mm-dd format, e.g. 2017-09-01
move_out_date
optional
string when the tenant decides to move out of the current lease. When passed, the tenant account is deactivated after 5 days. yyy-mm-dd format, e.g. 2017-09-01
emergency_contact
optional
object Emergency contact of the tenant. See below
language string Default language code for tenant. Valid values: en-ca, fr-ca, en, fr
pad_status string Valid values are: approved, rejected

Emergency Contact

parameter type description
full_name string Full name of emergency contact
phone_number
optional
string Only numbers. e.g. (123)-456-7890 -> 1234567890

Service Requests

Get Service Requests


curl -X GET \
  'https://{API_URL}/partners/v1/service_requests?limit=:limit&offset=:offset' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/service_requests?limit=:limit&offset=:offset")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url:
    "https://{API_URL}/partners/v1/service_requests?limit=:limit&offset=:offset",
  method: "GET",
  headers: {
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :limit and :offset

Example Response

[
  {
    "id": "1",
    "status": "Reviewed",
    "permission_to_enter": true,
    "building_id": "1",
    "unit_id": "4",
    "subject": "Paint Chipping",
    "description": "Paint is chipping on back wall",
    "scheduled_starts_at": null,
    "created_at": "2019-08-27T02:48:57.416Z",
    "completed_at": null
  }
]

This endpoint retrieves all service requests.

HTTP Request

GET https://{API_URL}/partners/v1/service_requests

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Query Parameters

parameter description
limit Max number of sites to return
offset Skip this number of rows

Get Service Requests by Building


curl -X GET \
  'https://{API_URL}/partners/v1/buildings/:building_id/service_requests?limit=:limit&offset=:offset' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/buildings/:building_id/service_requests?limit=:limit&offset=:offset")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url:
    "https://{API_URL}/partners/v1/buildings/:building_id/service_requests?limit=:limit&offset=:offset",
  method: "GET",
  headers: {
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :company_id, :limit and :offset

Example Response

[
  {
    "id": "1",
    "status": "Reviewed",
    "permission_to_enter": true,
    "building_id": "1070",
    "unit_id": "4",
    "subject": "Paint Chipping",
    "description": "Paint is chipping on back wall",
    "scheduled_starts_at": null,
    "created_at": "2019-08-27T02:48:57.416Z",
    "completed_at": null
  }
]

This endpoint retrieves all service requests by a specific building.

HTTP Request

GET https://{API_URL}/partners/v1/buildings/<building_id>/service_requests

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter description
building_id Unique ID of building to return service requests from

Query Parameters

parameter description
limit Max number of sites to return
offset Skip this number of rows

Get Service Requests by Tenant


curl -X GET \
  'https://{API_URL}/partners/v1/tenants/:tenant_id/service_requests?limit=:limit&offset=:offset' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/tenants/:tenant_id/service_requests?limit=:limit&offset=:offset")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url:
    "https://{API_URL}/partners/tenants/:tenant_id/service_requests?limit=:limit&offset=:offset",
  method: "GET",
  headers: {
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :company_id, :limit and :offset

Example Response

[
  {
    "id": "1",
    "status": "Reviewed",
    "permission_to_enter": true,
    "building_id": "1070",
    "unit_id": "4",
    "subject": "Paint Chipping",
    "description": "Paint is chipping on back wall",
    "scheduled_starts_at": null,
    "created_at": "2019-08-27T02:48:57.416Z",
    "completed_at": null
  }
]

This endpoint retrieves all service requests of a specific tenant.

HTTP Request

GET https://{API_URL}/tenants/<tenant_id>/service_requests

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter description
tenant_id Unique ID of tenant to return service requests from

Query Parameters

parameter description
limit Max number of sites to return
offset Skip this number of rows

CREATE/UPDATE Service Requests


curl -X PUT \
  https://{API_URL}/partners/v1/service_requests \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "id": "200",
      "scheduled_starts_at": "2011-08-12T20:17:46.384Z",
      "status": "fixed",
      "permission_to_enter": true,
      "building_id": "1",
      "unit_id": "2",
      "subject": "Damaged floors"
    }
  ]'


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/service_requests")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'
request.body = '[
  {
    "id": "200",
    "scheduled_starts_at": "2011-08-12T20:17:46.384Z",
    "status": "fixed",
    "permission_to_enter": true,
    "building_id": "1",
    "unit_id": "2",
    "subject": "Damaged floors",
    "category": "Other"
  }
]'

response = http.request(request)
puts response.read_body


var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{API_URL}/partners/v1/service_requests",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {TOKEN}",
  },
  "processData": false,
  "data": '[
    {
      "id": "200",
      "scheduled_starts_at": "2011-08-12T20:17:46.384Z",
      "status": "fixed",
      "permission_to_enter": true,
      "building_id": "1",
      "unit_id": "2",
      "subject": "Damaged floors",
      "category": "Other"
    }
  ]'
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

*Note: In some situations (particularly if there are multiple integrations) Yuhu will return a unique new_id that you will have to use to identify the created service request with on future api calls. json [ { "id": "200", "success": true, "message": null, "new_id": "123" } ]

Batch endpoint to upsert service requests for a specific landlord/client.

HTTP Request

PUT https://{API_URL}/partners/v1/service_requests

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Parameters

parameter type description
id string Unique identifier of service request. Will be displayed on portal
created_at
optional
string The date that the ticket was created. In UTC Datetime, e.g. 2019-07-12T19:05:54
completed_at
optional
string The date that the ticket was fixed / cancelled. In UTC Datetime, e.g. 2019-07-12T19:05:54
status string Valid values: new, cancelled, reviewed, scheduled, parts_needed, contractor_needed, deferred, fixed
permission_to_enter boolean Wether or not staff have permission to enter the unit either due to sent 24 hr notice to tenant or they explicitly granted permission to enter in less than 24 hr notice
building_id string The building / property that this service request is assigned to.
lease_id
optional
string The lease that this service request is assigned to.
unit_id
optional
string The unit that this service request is assigned to.
tenant_id
optional
string The tenant that this service request is assigned to.
subject
optional
string The subject of the service request, to be viewed by the tenant.
description
optional
string Description of the service request, to be viewed by the tenant.
scheduled_starts_at
optional
string applicable if status = scheduled, in UTC Datetime, e.g. 2019-07-12T19:05:54
priority
optional
string priority of the ticket, valid values: 'High', 'Low', 'Normal'
location
optional
string location of the ticket, valid values: balcony, basement, bedroom, bathroom, corridor, dining_room, entrance​, exterior​, kitchen​, laundry, living_room​, locker​, mechanical​, other​, pantry​, parking, private_outdoor_space​, stairs​, walk_in_closet
priority
optional
string priority of the ticket, valid values: 'High', 'Low', 'Normal'
category string please see GET /partners/v1/service_request_categories

CREATE/UPDATE Service Requests (ASYNC)


curl -X PUT \
  https://{API_URL}/partners/v1/async/service_requests?group_key=:group_key \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "id": "200",
      "scheduled_starts_at": "2011-08-12T20:17:46.384Z",
      "status": "fixed",
      "permission_to_enter": true,
      "building_id": "1",
      "unit_id": "2",
      "subject": "Damaged floors",
      "category": "Other"

    }
  ]'


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/async/service_requests?group_key=:group_key")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'
request.body = '[
  {
    "id": "200",
    "scheduled_starts_at": "2011-08-12T20:17:46.384Z",
    "status": "fixed",
    "permission_to_enter": true,
    "building_id": "1",
    "unit_id": "2",
    "subject": "Damaged floors",
    "category": "Other"
  }
]'

response = http.request(request)
puts response.read_body


var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{API_URL}/partners/v1/async/service_requests?group_key=:group_key",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {TOKEN}",
  },
  "processData": false,
  "data": '[
    {
      "id": "200",
      "scheduled_starts_at": "2011-08-12T20:17:46.384Z",
      "status": "fixed",
      "permission_to_enter": true,
      "building_id": "1",
      "unit_id": "2",
      "subject": "Damaged floors",
      "category": "Other"
    }
  ]'
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "message": "Enqueued 1 jobs.",
    "report_link": "https://{API_URL}/partners/async/async_jobs/:group_key"
  }
]

Batch endpoint to upsert service requests asynchronously for a specific landlord/client.

HTTP Request

PUT https://{API_URL}/partners/v1/async/service_requests

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Url Parameters

parameter description
group_key Will associate all requests under one group key. Sending multiple requests to the same group key will put all messages under the same link

Parameters

parameter type description
id string Unique identifier of service request. Will be displayed on portal
created_at
optional
string The date that the ticket was created. In UTC Datetime, e.g. 2019-07-12T19:05:54
completed_at
optional
string The date that the ticket was fixed / cancelled. In UTC Datetime, e.g. 2019-07-12T19:05:54
status string Valid values: new, cancelled, reviewed, scheduled, parts_needed, contractor_needed, deferred, fixed
permission_to_enter boolean Wether or not staff have permission to enter the unit either due to sent 24 hr notice to tenant or they explicitly granted permission to enter in less than 24 hr notice
building_id string The building / property that this service request is assigned to.
lease_id
optional
string The lease that this service request is assigned to.
unit_id
optional
string The unit that this service request is assigned to.
tenant_id
optional
string The unit that this service request is assigned to.
subject
optional
string The subject of the service request, to be viewed by the tenant.
description
optional
string Description of the service request, to be viewed by the tenant.
scheduled_starts_at
optional
string applicable if status = scheduled, in UTC Datetime, e.g. 2019-07-12T19:05:54
priority
optional
string priority of the ticket, valid values: 'High', 'Low', 'Normal'
location
optional
string location of the ticket, valid values: balcony, basement, bedroom, bathroom, corridor, dining_room, entrance​, exterior​, kitchen​, laundry, living_room​, locker​, mechanical​, other​, pantry​, parking, private_outdoor_space​, stairs​, walk_in_closet
priority
optional
string priority of the ticket, valid values: 'High', 'Low', 'Normal'
category string please see GET /partners/v1/service_request_categories

ATTACH Photos to Service Requests


curl -X PUT \
  https://{API_URL}/partners/v1/service_requests/:id/photos
  -H 'Accept: multipart/form-data' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: multipart/form-data' \
  --form 'file=Photo.jpg' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/service_requests/:id/photos")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'multipart/form-data'
request["Accept"] = 'multipart/form-data'
request["Authorization"] = 'Bearer {TOKEN}'
form_data = [["file", Photo.jpg]]
request.set_form form_data, 'multipart/form-data'


response = http.request(request)
puts response.read_body

var form = new FormData();
form.append("file", fileInput.files[0], "eye.png");

var settings = {
  "url": "https://{API_URL}/partners/v1/service_requests/:id/photos",
  "method": "POST",
  "timeout": 0,
  "headers": {
    "Authorization": "Bearer {TOKEN}"
  },
  "processData": false,
  "mimeType": "multipart/form-data",
  "contentType": false,
  "data": form
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "message": "Service Request photo successfully added"
  }
]

Endpoint to attach photos to service requests for a specific service request.

HTTP Request

PUT https://{API_URL}/partners/v1/service_requests/:id/photos

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Url Parameters

parameter description
id Unique id of the service request you would like to attach a photo to

Parameters

parameter type description
file file Image / PDF / .DOC / .XLSX / .DOCX / .GIF
display_to_resident boolean Displays the attached file to the resident (defaults to false)

Get Service Request Categories


curl -X GET \
  'https://{API_URL}/partners/v1/service_request_categories \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/service_request_categories")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: "https://{API_URL}/partners/v1/service_request_categories",
  method: "GET",
  headers: {
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "category": "other",
    "frontend_copy": { "en": "Other", "fr": "Other" },
    "display_to_user_type": "show_to_all_users",
    "location": "all_locations",
    "property_type": "apartment"
  }
]

This endpoint retrieves all service request categories

HTTP Request

GET https://{API_URL}/partners/v1/service_request_categories

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Notices

Get Notices


curl -X GET \
  'https://{API_URL}/partners/v1/notices?limit=:limit&offset=:offset' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/notices?limit=:limit&offset=:offset")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: 'https://{API_URL}/partners/v1/notices?limit=:limit&offset=:offset',
  method: 'GET',
  headers: {
    Accept: 'application/json',
    Authorization: 'Bearer {TOKEN}',
  },
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :limit and :offset

Example Response

[
  {
    "id": "1",
    "name": "Test notice",
    "nameFr": "Test Notice",
    "description": "this is a test notice",
    "descriptionFr": "this is a test notice",
    "attachment_url": null,
    "image_url": null,
    "post_date": "2019-09-22",
    "expiration_date": null,
    "effective_periods": null,
    "target_building_ids": ["1"],
    "target_unit_ids": []
  }
]

This endpoint retrieves all notices.

HTTP Request

GET https://{API_URL}/partners/v1/notices

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Query Parameters

parameter description
limit Max number of sites to return
offset Skip this number of rows

Get Notices by Building


curl -X GET \
  'https://{API_URL}/partners/v1/buildings/:building_id/notices?limit=:limit&offset=:offset' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/buildings/:building_id/notices?limit=:limit&offset=:offset")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: 'https://{API_URL}/partners/v1/buildings/:building_id/notices?limit=:limit&offset=:offset',
  method: 'GET',
  headers: {
    Accept: 'application/json',
    Authorization: 'Bearer {TOKEN}',
  },
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :company_id, :limit and :offset

Example Response

[
  {
    "id": "1",
    "name": "Test notice",
    "nameFr": "Test Notice",
    "description": "this is a test notice",
    "descriptionFr": "this is a test notice",
    "attachment_url": null,
    "image_url": null,
    "post_date": "2019-09-22",
    "expiration_date": null,
    "effective_periods": null,
    "target_building_ids": ["1"],
    "target_unit_ids": []
  }
]

This endpoint retrieves all notices by a specific building.

HTTP Request

GET https://{API_URL}/partners/v1/buildings/<building_id>/notices

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter description
building_id Unique ID of building to return notices from

Query Parameters

parameter description
limit Max number of sites to return
offset Skip this number of rows

CREATE/UPDATE Notices


curl -X PUT \
  https://{API_URL}/partners/v1/notices \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "id": 1,
      "name": "Elevators Out of Service",
      "description": "Elevators Out of Service, This is the place for more description",
      "attachment_url": "https://something.com/attachment.pdf",
      "image_url": "https://something.com/image.png",
      "post_date": "2019-07-12T19:05:54",
      "expiration_date": "2019-07-12T19:05:54",
      "effective_periods": [
        {
            "period_start": "2019-07-12T19:05:54",
            "period_end": "2019-07-12T19:05:54"
        },
        {
            "period_start": "2019-07-12T19:05:54",
            "period_end": "2019-07-12T19:05:54"
        }
      ],
      "target_building_ids": ["1", "2", "3"]
    }
  ]'


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/notices")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'
request.body = '[
  {
    "id": 1,
    "name": "Elevators Out of Service",
    "description": "Elevators Out of Service, This is the place for more description",
    "attachment_url": "https://something.com/attachment.pdf",
    "image_url": "https://something.com/image.png",
    "post_date": "2019-07-12T19:05:54",
    "expiration_date": "2019-07-12T19:05:54",
    "effective_periods": [
      {
          "period_start": "2019-07-12T19:05:54",
          "period_end": "2019-07-12T19:05:54"
      },
      {
          "period_start": "2019-07-12T19:05:54",
          "period_end": "2019-07-12T19:05:54"
      }
    ],
    "target_building_ids": ["1", "2", "3"]
  }
]'

response = http.request(request)
puts response.read_body


var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{API_URL}/partners/v1/notices",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {TOKEN}",
  },
  "processData": false,
  "data": '[
    {
      "id": 1,
      "name": "Elevators Out of Service",
      "description": "Elevators Out of Service, This is the place for more description",
      "attachment_url": "https://something.com/attachment.pdf",
      "image_url": "https://something.com/image.png",
      "post_date": "2019-07-12T19:05:54",
      "expiration_date": "2019-07-12T19:05:54",
      "effective_periods": [
        {
          "period_start": "2019-07-12T19:05:54",
          "period_end": "2019-07-12T19:05:54"
        },
        {
          "period_start": "2019-07-12T19:05:54",
          "period_end": "2019-07-12T19:05:54"
        }
      ],
      "target_building_ids": ["1", "2", "3"]
    }
  ]'
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "id": "1",
    "success": true,
    "message": null
  }
]

Batch endpoint to upsert notices for a specific landlord/client.

HTTP Request

PUT https://{API_URL}/partners/v1/notices

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Parameters

parameter type description
id string Unique identifier of notice.
name string Title of this notice
nameFr
optional
string Title of this notice in french
description string Description text of this notice
descriptionFr
optional
string Description text of this notice in French
target_building_ids array Building ID's associated to notice, e.g. `["1", "2"]
target_unit_ids
optional
array Only effective when target_building_ids length is 1. Unit ID's associated to notice, e.g. `["1", "2"]
attachment_url
optional
string Attachment URL, will be used as a callback when tenant requesting notice
image_url
optional
string Attachment URL, will be used as a callback when tenant requesting notice
post_time datetime datetime in utc at which this notice will be posted, e.g. 2019-07-12T19:05:54
expiration_time datetime datetime in utc at which this notice will be expired (removed from tenant portal), e.g. 2019-07-12T19:05:54
effective_periods array See below, Periods for which this notice will be effective, Array of periods each having a period_start and period_end in UTC datetime.

Effective Date Object

parameter type description
period_start datetime e.g. 2019-07-12T19:05:54
period_end datetime e.g. 2019-07-14T19:05:54

CREATE/UPDATE Notices (ASYNC)


curl -X PUT \
  https://{API_URL}/partners/v1/async/notices?group_key=:group_key \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "id": 1,
      "name": "Elevators Out of Service",
      "description": "Elevators Out of Service, This is the place for more description",
      "attachment_url": "https://something.com/attachment.pdf",
      "image_url": "https://something.com/image.png",
      "post_date": "2019-07-12T19:05:54",
      "expiration_date": "2019-07-12T19:05:54",
      "effective_periods": [
        {
          "period_start": "2019-07-12T19:05:54",
          "period_end": "2019-07-12T19:05:54"
        },
        {
          "period_start": "2019-07-12T19:05:54",
          "period_end": "2019-07-12T19:05:54"
        }
      ],
      "target_building_ids": ["1", "2", "3"]
    }
  ]'


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/async/notices?group_key=:group_key")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'
request.body = '[
  {
    "id": 1,
    "name": "Elevators Out of Service",
    "description": "Elevators Out of Service, This is the place for more description",
    "attachment_url": "https://something.com/attachment.pdf",
    "image_url": "https://something.com/image.png",
    "post_date": "2019-07-12T19:05:54",
    "expiration_date": "2019-07-12T19:05:54",
    "effective_periods": [
      {
        "period_start": "2019-07-12T19:05:54",
        "period_end": "2019-07-12T19:05:54"
      },
      {
        "period_start": "2019-07-12T19:05:54",
        "period_end": "2019-07-12T19:05:54"
      }
    ],
    "target_building_ids": ["1", "2", "3"]
  }
]'

response = http.request(request)
puts response.read_body


var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{API_URL}/partners/v1/async/notices?group_key=:group_key",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {TOKEN}",
  },
  "processData": false,
  "data": '[
    {
      "id": 1,
      "name": "Elevators Out of Service",
      "description": "Elevators Out of Service, This is the place for more description",
      "attachment_url": "https://something.com/attachment.pdf",
      "image_url": "https://something.com/image.png",
      "post_date": "2019-07-12T19:05:54",
      "expiration_date": "2019-07-12T19:05:54",
      "effective_periods": [
        {
          "period_start": "2019-07-12T19:05:54",
          "period_end": "2019-07-12T19:05:54"
        },
        {
          "period_start": "2019-07-12T19:05:54",
          "period_end": "2019-07-12T19:05:54"
        }
      ],
      "target_building_ids": ["1", "2", "3"]
    }
  ]'
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "message": "Enqueued 1 jobs.",
    "report_link": "https://{API_URL}/partners/async/async_jobs/:group_key"
  }
]

Batch endpoint to upsert notices asynchronously for a specific landlord/client.

HTTP Request

PUT https://{API_URL}/partners/v1/async/notices

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Url Parameters

parameter description
group_key Will associate all requests under one group key. Sending multiple requests to the same group key will put all messages under the same link

Parameters

parameter type description
id string Unique identifier of notice.
name string Title of this notice
nameFr
optional
string Title of this notice in french
description string Description text of this notice
descriptionFr
optional
string Description text of this notice in French
target_building_ids array Building ID's associated to notice, e.g. `["1", "2"]
target_unit_ids
optional
array Only effective when target_building_ids length is 1. Unit ID's associated to notice, e.g. `["1", "2"]
attachment_url
optional
string Attachment URL, will be used as a callback when tenant requesting notice
image_url
optional
string Attachment URL, will be used as a callback when tenant requesting notice
post_time datetime datetime in utc at which this notice will be posted, e.g. 2019-07-12T19:05:54
expiration_time datetime datetime in utc at which this notice will be expired (removed from tenant portal), e.g. 2019-07-12T19:05:54
effective_periods array See below, Periods for which this notice will be effective, Array of periods each having a period_start and period_end in UTC datetime.

Effective Date Object

parameter type description
period_start datetime e.g. 2019-07-12T19:05:54
period_end datetime e.g. 2019-07-14T19:05:54

Notification Preferences

Get Notification Preferences by Tenant

curl -X GET \
  'https://{API_URL}/partners/v1/leases/:lease_id/tenants/:tenant_id/notification_preferences'
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
require 'uri'
require 'net/http'
url = URI("https://{API_URL}/partners/v1/leases/:lease_id/tenants/:tenant_id/notification_preferences")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'
response = http.request(request)
puts response.read_body
var settings = {
  async: true,
  crossDomain: true,
  url:
    "https://{API_URL}/partners/v1/leases/:lease_id/tenants/:tenant_id/notification_preferences",
  method: "GET",
  headers: {
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};
$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :lease_id and :tenant_id Example Response json [ { "notice_by_email": true, "notification_preferences": { "building_communications": { "use_push": false, "use_email": false, "use_sms": false, }, "payments": { "use_push": true, "use_email": true, "use_sms": true, }, "maintenance_requests": { "use_push": true, "use_email": true, "use_sms": true, }, "amenity_bookings": { "use_push": true, "use_email": true, "use_sms": true, }, "promotions": { "use_push": true, "use_email": true, "use_sms": true, }, "surveys": { "use_push": true, "use_email": true, "use_sms": true, }, } } ]

This endpoint retrieves all notification preferences for a specific tenant.

HTTP Request

GET https://{API_URL}/partners/v1/leases/<lease_id>/tenants/<tenant_id>/notification_preferences

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter description
tenant_id Unique ID of tenant to return service requests from
lease_id Unique ID of the lease

UPDATE Notification Preferences


curl -X PUT \

  https://{API_URL}/partners/v1/leases/:lease_id/tenants/:tenant_id/notification_preferences \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "notice_by_email": true,
      "notification_preferences": {
        "building_communications": {
          "use_push": false,
          "use_email": false,
          "use_sms": false,
        },
        "payments": {
          "use_push": true,
          "use_email": true,
          "use_sms": true,
        },
        "maintenance_requests": {
          "use_push": true,
          "use_email": true,
          "use_sms": true,
        },
        "amenity_bookings": {
          "use_push": true,
          "use_email": true,
          "use_sms": true,
        },
        "promotions": {
          "use_push": true,
          "use_email": true,
          "use_sms": true,
        },
        "surveys": {
          "use_push": true,
          "use_email": true,
          "use_sms": true,
        },
      }
    }
  ]'


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/leases/{lease_id}/tenants/{tenant_id}/notification_preferences")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'
request.body = '[
  {
    "notice_by_email": true,
    "notification_preferences": {
      "building_communications": {
        "use_push": false,
        "use_email": false,
        "use_sms": false,
      },
      "payments": {
        "use_push": true,
        "use_email": true,
        "use_sms": true,
      },
      "maintenance_requests": {
        "use_push": true,
        "use_email": true,
        "use_sms": true,
      },
      "amenity_bookings": {
        "use_push": true,
        "use_email": true,
        "use_sms": true,
      },
      "promotions": {
        "use_push": true,
        "use_email": true,
        "use_sms": true,
      },
      "surveys": {
        "use_push": true,
        "use_email": true,
        "use_sms": true,
      },
    }
  }
]'

response = http.request(request)
puts response.read_body


var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{API_URL}/partners/v1/leases/{lease_id}/tenants/{tenant_id}/notification_preferences",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {TOKEN}",
  },
  "processData": false,
  "data": '[
    {
      "notice_by_email": true,
      "notification_preferences": {
        "building_communications": {
          "use_push": false,
          "use_email": false,
          "use_sms": false,
        },
        "payments": {
          "use_push": true,
          "use_email": true,
          "use_sms": true,
        },
        "maintenance_requests": {
          "use_push": true,
          "use_email": true,
          "use_sms": true,
        },
        "amenity_bookings": {
          "use_push": true,
          "use_email": true,
          "use_sms": true,
        },
        "promotions": {
          "use_push": true,
          "use_email": true,
          "use_sms": true,
        },
        "surveys": {
          "use_push": true,
          "use_email": true,
          "use_sms": true,
        },
      }
    }
  ]'
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :lease_id and :tenant_id

Example Response

[
  {
    "message": "Successfully updated user notification preferences."
  }
]

HTTP Request

PUT https://{API_URL}/partners/v1/leases/{lease_id}/tenants/{tenant_id}/notification_preferences

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Parameters

header type value
notice_by_email boolean Whether or not to receive the Notice of Entry by email
notification_preferences object A collection of different types of notification preference objects

Notification Preferences Object

option description
building_communications Property team messages, building notices and parcel deliveries
payments Balance and payment reminders
maintenance_requests Information, status updates, and messages related to maintenance requests
amenity_bookings Amenity booking confirmations, cancellation and modification updates, booking reminders
promotions Promotions
surveys Surveys

Send Method Parameters

Attach within each notification preference, an object containing the following options and true/false for their values.

parameter type description
use_push boolean Whether or not to allow push notifications for the resident mobile app
use_sms boolean Whether or not to allow sms text message notifications
use_email boolean Whether or not to allow email notifications

Amenities

Get Amenities


curl -X GET \
  'https://{API_URL}/partners/v1/amenities?limit=:limit&offset=:offset' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/amenities?limit=:limit&offset=:offset")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: 'https://{API_URL}/partners/v1/amenities?limit=:limit&offset=:offset',
  method: 'GET',
  headers: {
    Accept: 'application/json',
    Authorization: 'Bearer {TOKEN}',
  },
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :limit and :offset

Example Response

[
  {
    "id": "1",
    "name": "Hot Tub",
    "name_fr": "Spa",
    "amenity_type": "room",
    "offline": false,
    "bookable": true,
    "target_building_ids": ["1"],
    "day_availabilities": {
      "available": true,
      "availabilities": {
        "Sunday": { "start_time": "8:00 AM", "end_time": "10:00 PM", "available": true },
        "Monday": { "start_time": "8:00 AM", "end_time": "10:00 PM", "available": true },
        "Tuesday": { "start_time": "8:00 AM", "end_time": "10:00 PM", "available": true },
        "Wednesday": { "start_time": "8:00 AM", "end_time": "10:00 PM", "available": true },
        "Thursday": { "start_time": "8:00 AM", "end_time": "10:00 PM", "available": true },
        "Friday": { "start_time": "8:00 AM", "end_time": "10:00 PM", "available": true },
        "Saturday": { "start_time": "8:00 AM", "end_time": "10:00 PM", "available": true }
      }
    }
  }
]

This endpoint retrieves all amenities.

HTTP Request

GET https://{API_URL}/partners/v1/amenities

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Query Parameters

parameter description
limit Max number of sites to return
offset Skip this number of rows

Get Amenities by Building


curl -X GET \
  'https://{API_URL}/partners/v1/buildings/:building_id/amenities?limit=:limit&offset=:offset' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/buildings/:building_id/amenities?limit=:limit&offset=:offset")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: 'https://{API_URL}/partners/v1/buildings/:building_id/amenities?limit=:limit&offset=:offset',
  method: 'GET',
  headers: {
    Accept: 'application/json',
    Authorization: 'Bearer {TOKEN}',
  },
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :company_id, :limit and :offset

Example Response

[
  {
    "id": "1",
    "name": "Hot Tub",
    "name_fr": "Spa",
    "amenity_type": "room",
    "offline": false,
    "bookable": true,
    "target_building_ids": ["1"],
    "day_availabilities": {
      "available": true,
      "availabilities": {
        "Sunday": { "start_time": "8:00 AM", "end_time": "10:00 PM", "available": true },
        "Monday": { "start_time": "8:00 AM", "end_time": "10:00 PM", "available": true },
        "Tuesday": { "start_time": "8:00 AM", "end_time": "10:00 PM", "available": true },
        "Wednesday": { "start_time": "8:00 AM", "end_time": "10:00 PM", "available": true },
        "Thursday": { "start_time": "8:00 AM", "end_time": "10:00 PM", "available": true },
        "Friday": { "start_time": "8:00 AM", "end_time": "10:00 PM", "available": true },
        "Saturday": { "start_time": "8:00 AM", "end_time": "10:00 PM", "available": true }
      }
    }
  }
]

This endpoint retrieves all amenities within a building.

HTTP Request

GET https://{API_URL}/partners/v1/buildings/<building_id>/amenities

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter description
building_id Unique ID of building to return amenities from

Query Parameters

parameter description
limit Max number of sites to return
offset Skip this number of rows

CREATE/UPDATE Amenities


curl -X PUT \
  https://{API_URL}/partners/v1/amenities \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "id": "1",
      "bookable": true,
      "name": "Moving Elevator",
      "nameFr": "French Name",
      "amenity_type": "room",
      "offline": false,
      "day_availabilities":
        [
          {
          "day_of_week": "monday",
          "start_hour": 9,
          "start_minute": 0,
          "end_hour": 17,
          "end_minute": 0
          }
            ],
      "target_building_ids":  ["1", "2", "3"]
    }
  ]'


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/amenities")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'
request.body = '[
  {
    "id": "1",
    "bookable": true,
    "name": "Moving Elevator",
    "nameFr": "French Name",
    "amenity_type": "room",
    "offline": false,
    "day_availabilities":
      [
        {
        "day_of_week": "monday",
        "start_hour": 9,
        "start_minute": 0,
        "end_hour": 17,
        "end_minute": 0
        }
      ],
    "target_building_ids":  ["1", "2", "3"]
  }
]'

response = http.request(request)
puts response.read_body


var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{API_URL}/partners/v1/buildings",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {TOKEN}",
  },
  "processData": false,
  "data": '[
    {
      "id": "1",
      "bookable": true,
      "name": "Moving Elevator",
      "nameFr": "French Name",
      "amenity_type": "room",
      "offline": false,
      "day_availabilities":
        [
          {
          "day_of_week": "monday",
          "start_hour": 9,
          "start_minute": 0,
          "end_hour": 17,
          "end_minute": 0
          }
            ],
      "target_building_ids":  ["1", "2", "3"]
    }
  ]'
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "id": "1",
    "success": true,
    "message": null
  }
]

Batch endpoint to upsert amenities for a specific landlord/client.

HTTP Request

PUT https://{API_URL}/partners/v1/amenities

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Parameters

parameter type description
id string Unique identifier of amenity
bookable boolean Whether the amenity can be bookable or not
name string Title of this amenity
nameFr
optional
string Title of this amenity in french
amenity_type string Valid values: room, moving_elevator
offline boolean Whether the amenity is out of service
target_building_ids array Buildings this amenity is associated to, e.g. ["1", "2"]
day_availabilities array Array of availabilities for this amenity, must be bookable = true. See below

Day Availabilities Object

parameter type description
day_of_week string Valid values: monday, tuesday, wednesday, thursday, friday, saturday, sunday
start_hour number hour in 24hours.
start_minute number
end_hour number hour in 24hours.
end_minute number

Payments

GET PAP DETAILS (Beta)


curl -X GET \
  https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/pap_details \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/pap_details")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: 'https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/pap_details',
  method: 'GET',
  headers: {
    Accept: 'application/json',
    Authorization: 'Bearer {TOKEN}',
  },
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace `API_URL, TOKEN, and :tenant_id

Example Response for EFT

{
  "type": "EFT",
  "account_holder_name": "John Smith",
  "account_number": "1234", 
  "transit_number": "5678",
  "institution_number": "9012"
}

Example Response for ACH

{
  "type": "ACH",
  "account_holder_name": "John Smith",
  "account_number": "1234", 
  "routing_number": "5678",
  "account_type": "savings"
}

This endpoint retrieves all PAP details (masked) for a given tenant.

HTTP Request

GET https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/pap_details

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter description
lease_id Unique ID of the respective lease
tenant_id Unique ID of the tenant to retrieve their PAP details

VIEW LEDGER (Beta)


curl -X GET \
  https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/view_ledger?limit=:limit&offset=:offset \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/view_ledger?limit=:limit&offset=:offset")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: 'https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/view_ledger?limit=:limit&offset=:offset',
  method: 'GET',
  headers: {
    Accept: 'application/json',
    Authorization: 'Bearer {TOKEN}',
  },
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace `API_URL, TOKEN, :tenant_id, :limit, and :offset

Example Response

[
  {
    "due_date": "2021-01-19T17:21:53.998Z",
    "payment_type": "Payment",
    "sub_payment_type": "pending fee",
    "currency_code": "CAD",
    "amount": "123",
    "tenant_amount": "100",
    "amount_received": "123",
    "tenant_amount_received": "100",
    "description": "Pending online portal transaction fee",
    "extra_details": "{}", 
    "balance": "-1000"
  }
]

This endpoint retrieves the ledger for a given tenant. All amounts are in the smallest currency unit.

HTTP Request

GET https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/ledger?limit=:limit&offset=:offset

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter description
lease_id Unique ID of the respective lease
tenant_id Unique ID of the tenant to retrieve their ledger
limit Max number of items to return
offset Skip this number of rows

SIGNUP FOR EFT PAP (Beta)


curl --location --request POST "https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/eft/signup" \
--header 'Content-Type: multipart/form-data; boundary=--------------------------547360561065134872686285' \
--form 'account_holder_name=John Smith' \
--form 'account_number=1111111' \
--form 'transit_number=2222222' \
--form 'institution_number=99999999'


require "uri"
require "net/http"

url = URI("https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/eft/signup")

https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "multipart/form-data; boundary=--------------------------547360561065134872686285"
form_data = [
  ['account_holder_name', 'John Smith'],
  ['account_number', '1111111'],
  ['transit_number', '2222222'],
  ['institution_number', '99999999']
]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body

var form = new FormData();
form.append("account_holder_name", "John Smith");
form.append("account_number", "111111111");
form.append("transit_number", "22222222");
form.append("institution_number", "9999999");

var settings = {
  async: true,
  crossDomain: true,
  url:
    'https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/eft/signup',
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Accept: 'application/json',
  },
  processData: false,
  data: form,
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace tenant_id, account_holder_name, account_number, transit_number, and institution_number

Example Response

{
  "success": true,
  "status": "pending_activation",
  "terms_and_conditions": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
  "version_code": "1.0"
}

Signup for PAP payment

HTTP Request

POST https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/eft/signup

Headers

header value
Content-Type application/json
Accept application/json

Url Parameters

parameter description
lease_id Unique ID of the lease
tenant_id Unique ID of the tenant

Parameters

parameter description
account_holder_name Account holder name
account_number The account number
transit_number Bank transit number
institution_number Bank branch number

SIGNUP FOR ACH PAP (Beta)


curl --location --request POST "https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/ach/signup" \
--header 'Content-Type: multipart/form-data; boundary=--------------------------547360561065134872686285' \
--form 'account_holder_name=John Smith' \
--form 'account_number=1111111' \
--form 'routing_number=2222222' \
--form 'account_type=savings'


require "uri"
require "net/http"

url = URI("https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/ach/signup")

https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "multipart/form-data; boundary=--------------------------547360561065134872686285"
form_data = [
  ['account_holder_name', 'John Smith'],
  ['account_number', '1111111'],
  ['routing_number', '2222222'],
  ['account_type', 'savings']
]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body

var form = new FormData();
form.append("account_holder_name", "John Smith");
form.append("account_number", "111111111");
form.append("routing_number", "22222222");
form.append("account_type", "savings");

var settings = {
  async: true,
  crossDomain: true,
  url:
    'https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/ach/signup',
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Accept: 'application/json',
  },
  processData: false,
  data: form,
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace tenant_id, account_holder_name, account_number, routing_number, and account_type

Example Response

{
  "success": true,
  "terms_and_conditions": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
  "version_code": "1.0"
}

Signup for PAP payment

HTTP Request

POST https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/ach/signup

Headers

header value
Content-Type application/json
Accept application/json

Url Parameters

parameter description
lease_id Unique ID of the lease
tenant_id Unique ID of the tenant

Parameters

parameter description
account_holder_name Account holder name
account_number The account number
routing_number Routing number
account_type Can be 'savings', 'checking', or 'loan'

ACTIVATE EFT PAP (Beta)


curl --location --request POST "https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/eft/activation" \
--header 'Content-Type: multipart/form-data; boundary=--------------------------547360561065134872686285' \
--form 'version_code=1.0' 


require "uri"
require "net/http"

url = URI("https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/eft/activation")

https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "multipart/form-data; boundary=--------------------------547360561065134872686285"
form_data = [
  ['version_code', '1.0']
]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body

var form = new FormData();
form.append("version_code", "1.0");

var settings = {
  async: true,
  crossDomain: true,
  url:
    'https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/eft/activation',
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Accept: 'application/json',
  },
  processData: false,
  data: form,
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace tenant_id and version_code

Example Response

{
  "success": true
}

After signing up for the PAP, this endpoint should be called to confirm terms and conditions approval by the tenant.

HTTP Request

POST https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/eft/activation

Headers

header value
Content-Type application/json
Accept application/json

Url Parameters

parameter description
lease_id Unique ID of the lease
tenant_id Unique ID of the tenant

Parameters

parameter description
version_code Terms and Conditions version code (received from the pap signup call)

ACTIVATE ACH PAP (Beta)


curl --location --request POST "https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/ach/activation" \
--header 'Content-Type: multipart/form-data; boundary=--------------------------547360561065134872686285' \
--form 'version_code=1.0' 


require "uri"
require "net/http"

url = URI("https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/ach/activation")

https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "multipart/form-data; boundary=--------------------------547360561065134872686285"
form_data = [
  ['version_code', '1.0']
]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body

var form = new FormData();
form.append("version_code", "1.0");

var settings = {
  async: true,
  crossDomain: true,
  url:
    'https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/ach/activation',
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Accept: 'application/json',
  },
  processData: false,
  data: form,
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace tenant_id and version_code

Example Response

{
  "success": true
}

After signing up for the PAP, this endpoint should be called to confirm terms and conditions approval by the tenant.

HTTP Request

POST https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/ach/activation

Headers

header value
Content-Type application/json
Accept application/json

Url Parameters

parameter description
lease_id Unique ID of the lease
tenant_id Unique ID of the tenant

Parameters

parameter description
version_code Terms and Conditions version code (received from the pap signup call)

AUTHORIZE ONE TIME EFT DIRECT DEBIT PAYMENT (Beta)


curl --location --request POST "https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/eft/direct_debit_authorization" \
--header 'Content-Type: multipart/form-data; boundary=--------------------------547360561065134872686285' \
--form 'amount=100074' \
--form 'currency_code=CAD' \
--form 'account_holder_name=John Smith' \
--form 'account_number=1111111' \
--form 'transit_number=2222222' \
--form 'institution_number=99999999'


require "uri"
require "net/http"

url = URI("https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/eft/direct_debit_authorization")

https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "multipart/form-data; boundary=--------------------------547360561065134872686285"
form_data = [
  ['amount', '100074'],
  ['currency_code', 'CAD'],
  ['account_holder_name', 'John Smith'],
  ['account_number', '1111111'],
  ['transit_number', '2222222'],
  ['institution_number', '99999999']
]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body

var form = new FormData();
form.append("amount", "100074");
form.append("currency_code", "CAD");
form.append("account_holder_name", "John Smith");
form.append("account_number", "111111111");
form.append("transit_number", "22222222");
form.append("institution_number", "9999999");

var settings = {
  async: true,
  crossDomain: true,
  url:
    'https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/eft/direct_debit_authorization',
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Accept: 'application/json',
  },
  processData: false,
  data: form,
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace tenant_id, amount, currency_code, account_holder_name, account_number, transit_number, and institution_number

Example Response

{
  "success": true,
  "currency_code": "CAD",
  "payment_amount": "1,000.74",
  "fee_amount": "20.17",
  "total_amount": "1,020.91",
  "amount": 100074,
  "fee": 2017,
  "total": 102091
}

Authorize one time EFT direct debit PAP payment. This endpoint shows PAP details, to make sure all the details are accurate and valid. Moreover, the total payable amount (including fees) will be shown. Using this endpoint, the payment details will not be sent to the payment processor.

HTTP Request

POST https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/eft/direct_debit_authorization

Headers

header value
Content-Type application/json
Accept application/json

Url Parameters

parameter description
lease_id Unique ID of the lease
tenant_id Unique ID of the tenant

Parameters

parameter type description
amount integer Payment amount in the smallest currency unit. The processing fee will be calculated by Yuhu.
currency_code string Currency code
account_number string The account number
transit_number string Transit number
institution_number string Branch number

CREATE EFT ONE TIME DIRECT DEBIT PAYMENT (Beta)


curl --location --request POST "https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/eft/direct_debit_purchase" \
--header 'Content-Type: multipart/form-data; boundary=--------------------------547360561065134872686285' \
--form 'amount=100074' \
--form 'currency_code=CAD' \
--form 'account_holder_name=John Smith' \
--form 'account_number=1111111' \
--form 'transit_number=2222222' \
--form 'institution_number=99999999'


require "uri"
require "net/http"

url = URI("https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/eft/direct_debit_purchase")

https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "multipart/form-data; boundary=--------------------------547360561065134872686285"
form_data = [
  ['amount', '100074'],
  ['currency_code', 'CAD'],
  ['account_holder_name', 'John Smith'],
  ['account_number', '1111111'],
  ['transit_number', '2222222'],
  ['institution_number', '99999999']
]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body

var form = new FormData();
form.append("amount", "100074");
form.append("currency_code", "CAD");
form.append("account_holder_name", "John Smith");
form.append("account_number", "111111111");
form.append("transit_number", "22222222");
form.append("institution_number", "9999999");

var settings = {
  async: true,
  crossDomain: true,
  url:
    'https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/eft/direct_debit_purchase',
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Accept: 'application/json',
  },
  processData: false,
  data: form,
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace tenant_id, amount, currency_code, account_holder_name, account_number, transit_number, and institution_number

Example Response

{
  "success": true,
  "currency_code": "CAD",
  "payment_amount": "1,000.74",
  "fee_amount": "20.17",
  "total_amount": "1,020.91",
  "amount": 1000.74,
  "fee": 20.17,
  "total": 1020.91
}

Send the payment details to the payment processor, in order to create the direct debit payment using an EFT account.

HTTP Request

POST https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/eft/direct_debit_purchase

Headers

header value
Content-Type application/json
Accept application/json

Url Parameters

parameter description
lease_id Unique ID of the lease
tenant_id Unique ID of the tenant

Parameters

parameter type description
amount integer Payment amount in the smallest currency unit. The processing fee will be calculated by Yuhu.
currency_code string Currency code
account_number string The account number
transit_number string Transit number
institution_number string Branch number

AUTHORIZE ONE TIME ACH DIRECT DEBIT PAYMENT (Beta)


curl --location --request POST "https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/ach/direct_debit_authorization" \
--header 'Content-Type: multipart/form-data; boundary=--------------------------547360561065134872686285' \
--form 'amount=100074' \
--form 'currency_code=CAD' \
--form 'account_holder_name=John Smith' \
--form 'account_number=1111111' \
--form 'routing_number=2222222' \
--form 'account_type=savings'


require "uri"
require "net/http"

url = URI("https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/ach/direct_debit_authorization")

https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "multipart/form-data; boundary=--------------------------547360561065134872686285"
form_data = [
  ['amount', '100074'],
  ['currency_code', 'CAD'],
  ['account_holder_name', 'John Smith'],
  ['account_number', '1111111'],
  ['routing_number', '2222222'],
  ['account_type', 'savings']
]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body

var form = new FormData();
form.append("amount", "100074");
form.append("currency_code", "CAD");
form.append("account_holder_name", "John Smith");
form.append("account_number", "111111111");
form.append("routing_number", "22222222");
form.append("account_type", "savings");

var settings = {
  async: true,
  crossDomain: true,
  url:
    'https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/ach/direct_debit_authorization',
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Accept: 'application/json',
  },
  processData: false,
  data: form,
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace tenant_id, amount, currency_code, account_holder_name, account_number, transit_number, and institution_number

Example Response

{
  "success": true,
  "currency_code": "CAD",
  "payment_amount": "1,000.74",
  "fee_amount": "20.17",
  "total_amount": "1,020.91",
  "amount": 100074,
  "fee": 2017,
  "total": 102091
}

Authorize one time ACH direct debit PAP payment. This endpoint shows PAP details, to make sure all the details are accurate and valid. Moreover, the total payable amount (including fees) will be shown. Using this endpoint, the payment details will not be sent to the payment processor.

HTTP Request

POST https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/ach/direct_debit_authorization

Headers

header value
Content-Type application/json
Accept application/json

Url Parameters

parameter description
lease_id Unique ID of the lease
tenant_id Unique ID of the tenant

Parameters

parameter type description
amount integer Payment amount in the smallest currency unit. The processing fee will be calculated by Yuhu.
currency_code string Currency code
account_number string The account number
routing_number string Routing number
account_type string Can be 'savings', 'checking', or 'loan'

CREATE ACH ONE TIME DIRECT DEBIT PAYMENT (Beta)


curl --location --request POST "https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/ach/direct_debit_purchase" \
--header 'Content-Type: multipart/form-data; boundary=--------------------------547360561065134872686285' \
--form 'amount=100074' \
--form 'currency_code=CAD' \
--form 'account_holder_name=John Smith' \
--form 'account_number=1111111' \
--form 'routing_number=2222222' \
--form 'account_type=savings'


require "uri"
require "net/http"

url = URI("https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/ach/direct_debit_purchase")

https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "multipart/form-data; boundary=--------------------------547360561065134872686285"
form_data = [
  ['amount', '100074'],
  ['currency_code', 'CAD'],
  ['account_holder_name', 'John Smith'],
  ['account_number', '1111111'],
  ['routing_number', '2222222'],
  ['account_type', 'savings']
]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body

var form = new FormData();
form.append("amount", "100074");
form.append("currency_code", "CAD");
form.append("account_holder_name", "John Smith");
form.append("account_number", "111111111");
form.append("routing_number", "22222222");
form.append("account_type", "savings");

var settings = {
  async: true,
  crossDomain: true,
  url:
    'https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/ach/direct_debit_purchase',
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Accept: 'application/json',
  },
  processData: false,
  data: form,
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace tenant_id, amount, account_holder_name, account_number, transit_number, and institution_number

Example Response

{
  "success": true,
  "currency_code": "CAD",
  "payment_amount": "1,000.74",
  "fee_amount": "20.17",
  "total_amount": "1,020.91",
  "amount": 100074,
  "fee": 2017,
  "total": 102091
}

Send the payment details to the payment processor, in order to create the direct debit payment using an ACH account.

HTTP Request

POST https://{API_URL}/partners/v1/payments/leases/:lease_id/tenants/:tenant_id/ach/direct_debit_purchase

Headers

header value
Content-Type application/json
Accept application/json

Url Parameters

parameter description
lease_id Unique ID of the lease
tenant_id Unique ID of the tenant

Parameters

parameter type description
amount integer Payment amount in the smallest currency unit. The processing fee will be calculated by Yuhu.
currency_code string Currency code
account_number string The account number
routing_number string Routing number
account_type string Can be 'savings', 'checking', or 'loan'

UPDATE PAP


curl -X PUT \
  https://{API_URL}/partners/v1/leases/:lease_id/tenants/:tenant_id/pad_details \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '{ "pad_status": "approved" }'


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/leases/:lease_id/tenants/:tenant_id/pad_details")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'
request.body = '{ "pad_status": "approved" }'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: 'https://{API_URL}/partners/v1/leases/:lease_id/tenants/:tenant_id/pad_details',
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
    Accept: 'application/json',
    Authorization: 'Bearer {TOKEN}',
  },
  processData: false,
  data: '{ "pad_status": "approved" }',
};

$.ajax(settings).done(function(response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "id": "tenant_id",
    "success": true,
    "message": null
  }
]

This endpoint updates the pap state of the tenant given a lease lease_id and a tenant tenant_id

HTTP Request

PUT https://{API_URL}/partners/v1/leases/<lease_id>/tenants/<tenant_id>/pad_details

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Paramaters

parameter value
lease_id lease id to update status
tenant_id tenant id to update status

Parameters

parameter type description
pad_status string Valid values are: approved, rejected

Traffic Source

Get Traffic sources


curl -X GET \
  'https://{API_URL}/partners/v1/traffic_sources' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/traffic_sources")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: "https://{API_URL}/partners/v1/traffic_sources",
  method: "GET",
  headers: {
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace `API_URL, TOKEN

Example Response

[
  {
    "id": "1",
    "traffic_source": "Walk-in",
    "active": true,
    "properties": ["Yuhu heights"]
  },
  {
    "id": "2",
    "traffic_source": "Direct",
    "active": true,
    "properties": ["Yuhu heights"]
  }
]

This endpoint retrieves all traffic sources.

HTTP Request

GET https://{API_URL}/partners/v1/traffic_sources

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Get Traffic Sources by Building


curl -X GET \
  'https://{API_URL}/partners/v1/buildings/123/traffic_sources' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/buildings/123/traffic_sources")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: "https://{API_URL}/partners/v1/buildings/123/traffic_sources",
  method: "GET",
  headers: {
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace `API_URL, TOKEN

Example Response

[
  {
    "id": "1",
    "traffic_source": "Walk-in",
    "active": true,
    "properties": ["Yuhu heights"]
  },
  {
    "id": "2",
    "traffic_source": "Direct",
    "active": true,
    "properties": ["Yuhu heights"]
  }
]

This endpoint retrieves all traffic sources from a property.

HTTP Request

GET https://{API_URL}/partners/v1/buildings/<building_id>/unit_types

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter description
building_id Unique ID of building to return unit types from

CREATE/UPDATE Traffic Sources


curl -X PUT \
  https://{API_URL}/partners/v1/traffic_sources \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "id": "1",
      "traffic_source": "Walk-in",
      "active": true,
    },
    {
      "id": "2",
      "traffic_source": "Direct",
      "active": true,
      "properties": ["Yuhu heights"]
    }
  ]'


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/traffic_sources")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'
request.body = '[
     {
        "id": "1",
        "traffic_source": "Walk-in",
        "active": true,
      },
      {
        "id": "2",
        "traffic_source": "Direct",
        "active": true,
        "properties": ["Yuhu heights"]
      }
]'

response = http.request(request)
puts response.read_body


var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{API_URL}/partners/v1/traffic_sources",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {TOKEN}",
  },
  "processData": false,
  "data": '[
     {
        "id": "1",
        "traffic_source": "Walk-in",
        "active": true,
      },
      {
        "id": "2",
        "traffic_source": "Direct",
        "active": true,
        "properties": ["Yuhu heights"]
      }
  ]'
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "id": "1",
    "success": true,
    "message": null
  },
  {
    "id": "2",
    "success": true,
    "message": null
  }
]

Batch endpoint to upsert traffic sources for a specific landlord/client.

HTTP Request

PUT https://{API_URL}/partners/v1/traffic_sources

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Parameters

parameter type description
id string Unique identifier of traffic source
active boolean Whether the traffic source is active on the landlord portal
traffic_source string Name of the traffic source
properties
optional
array Array of building IDs. If not provided, defaults to all properties

DELETE Traffic Sources [BETA - not live]


curl -X DELETE \
  https://{API_URL}/partners/v1/traffic_sources/:traffic_source_id \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/traffic_sources/:traffic_source_id")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: "https://{API_URL}/partners/v1/traffic_sources/:traffic_source_id",
  method: "DELETE",
  headers: {
    "Content-Type": "application/json",
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "message": "Successfully inactivated traffic source"
  }
]

This will inactivate a traffic source.

HTTP Request

DELETE https://{API_URL}/partners/v1/traffic_sources/<traffic_source_id>

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter type description
traffic_source_id string Unique identifier of traffic source to inactivate

Prospects

Get Prospect


curl -X GET \
  'https://{API_URL}/partners/v1/prospects/:prospect_id' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/prospects/:prospect_id")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: "https://{API_URL}/partners/v1/prospects/:prospect_id",
  method: "GET",
  headers: {
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :prospect_id, :limit and :offset

Example Response

[
  {
    "id": "123",
    "first_name": "Jane",
    "last_name": "Doe",
    "property_name": "8 Camden",
    "birthday": "1994-01-11",
    "email": "[email protected]",
    "phone_number": "1234567890",
    "traffic_source": "Direct",
    "target_move_in_date": "2020-01-11",
    "desired_unit_type": "1 bedroom",
    "status": "New",
    "min_budget_cents": "100000",
    "max_budget_cents": "300000",
    "first_contact_date": "2020-01-01"
  }
]

This endpoint retrieves a prospect.

HTTP Request

GET https://{API_URL}/partners/v1/prospects/<prospect_id>

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter description
prospect_id Unique ID of prospect

CREATE/UPDATE Prospect


curl -X PUT \
  https://{API_URL}/partners/v1/prospects \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "id":                   "100",
      "first_name":           "Tony",
      "last_name":            "Hawk",
      "email":                "[email protected]",
      "phone_number":         "1234567890",
      "birthday":             "1994-01-01",
      "desired_num_bedrooms": "1",
      "target_move_in_date":  "2020-01-11",
      "traffic_source":       "Direct",
      "building_id":          "123",
      "min_budget":           100000,
      "max_budget":           200000,
      "first_contact_date":   "2020-01-01",
      "status":               "new"
    }
  ]'


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/prospects")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'
request.body = '[
  {
    "id":                   "100",
    "first_name":           "Tony",
    "last_name":            "Hawk",
    "email":                "[email protected]",
    "phone_number":         "1234567890",
    "birthday":             "1994-01-01",
    "desired_num_bedrooms": "1",
    "target_move_in_date":  "2020-01-11",
    "traffic_source":       "Direct",
    "building_id":          "123",
    "min_budget":           100000,
    "max_budget":           200000,
    "first_contact_date":   "2020-01-01",
    "status":               "new"
  }
]'

response = http.request(request)
puts response.read_body


var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{API_URL}/partners/v1/prospects",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {TOKEN}",
  },
  "processData": false,
  "data": '[
    {
      "id":                   "100",
      "first_name":           "Tony",
      "last_name":            "Hawk",
      "email":                "[email protected]",
      "phone_number":         "1234567890",
      "birthday":             "1994-01-01",
      "desired_num_bedrooms": "1",
      "target_move_in_date":  "2020-01-11",
      "traffic_source":       "Direct",
      "building_id":          "123",
      "min_budget":           100000,
      "max_budget":           200000,
      "first_contact_date":   "2020-01-01",
      "status":               "new"
    }
  ]'
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "id": "100",
    "success": true,
    "message": null
  }
]

Batch endpoint to upsert prospects for a specific landlord/client.

HTTP Request

PUT https://{API_URL}/partners/v1/prospects

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Parameters

parameter type description
id string Unique identifier of prospect.
first_contact_date
optional
string Date of first contact with prospect. yyyy-mm-dd format, e.g. 2017-09-01
first_name string
last_name string
phone_number
optional
string Only numbers. e.g. (123)-456-7890 -> 1234567890
email
optional
string
birthday
optional
string Birthday of the prospect. yyyy-mm-dd format, e.g. 2017-09-01
target_move_in_date
optional
string The desired move in of the prospect. yyy-mm-dd format, e.g. 2017-09-01
building_id string Building ID prospect iss interested in. Please see Building Endpoint.
status
optional
string Valid values are: new, in_contact, applying, rejected, converted, booked_showing, stale, waitlisted. Default: new
min_budget_cents
optional
string Minimum budget for the prospect in Cents
max_budget_cents
optional
string Minimum budget for the prospect in Cents
desired_num_bedrooms
optional
string Desired number of bedrooms prospect is interested in.
unit_type_id
optional
string ID (from yardi or see unit_types endpoint) to attach a desired unit type. Will take presedence over desired_num_bedrooms
traffic_source
optional
string Traffic source the prospect was created by. Can be found using the traffic source endpoint

DELETE Prospect [BETA - not live]


curl -X DELETE \
  https://{API_URL}/partners/v1/prospects/:prospect_id \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/prospects/:prospect_id")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: "https://{API_URL}/partners/v1/prospects/:prospect_id",
  method: "DELETE",
  headers: {
    "Content-Type": "application/json",
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "message": "Successfully inactivated prospect"
  }
]

This will inactivate a prospect.

HTTP Request

DELETE https://{API_URL}/partners/v1/prospects/<prospect_id>

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter type description
prospect_id string Unique identifier of prospect to inactivate

Applications

CREATE Application


curl -X POST \
  https://{API_URL}/partners/v1/applications \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      id: "100",
      prospect_id: "1",
      building_id: "1",
      unit_id: "1",
      lease_start_date: "01-01-2020"
      early_move_in_date: "01-01-2020",
      lease_end_date: "01-01-2021",
      monthly_rent: 1000,
      deposit_amount: 100,
      key_deposit: 100,
      collect_first_months_with_deposit: false,
      create_prorated_charge: false,
      coapplicants_in_application: true
    }
  ]'


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/applications")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'
request.body = '[
  {
    id: "100",
    prospect_id: "1",
    building_id: "1",
    unit_id: "1",
    lease_start_date: "01-01-2020"
    early_move_in_date: "01-01-2020",
    lease_end_date: "01-01-2021",
    monthly_rent: 1000,
    deposit_amount: 100,
    key_deposit: 100,
    collect_first_months_with_deposit: false,
    create_prorated_charge: false,
    coapplicants_in_application: true
  }
]'

response = http.request(request)
puts response.read_body


var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{API_URL}/partners/v1/applications",
  "method": "POST",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {TOKEN}",
  },
  "processData": false,
  "data": '[
    {
      id: "100",
      prospect_id: "1",
      building_id: "1",
      unit_id: "1",
      lease_start_date: "01-01-2020"
      early_move_in_date: "01-01-2020",
      lease_end_date: "01-01-2021",
      monthly_rent: 1000,
      deposit_amount: 100,
      key_deposit: 100,
      collect_first_months_with_deposit: false,
      create_prorated_charge: false,
      coapplicants_in_application: true
    }
  ]'
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "id": "100",
    "success": true,
    "message": null
  }
]

Batch endpoint to create application for a specific landlord/client. To create an application, you must first create a prospect using the prospects endpoint and then pass it through to this endpoint using the prospect_id

HTTP Request

POST https://{API_URL}/partners/v1/applications

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Parameters

parameter type description
id string of the application
prospect_id string The id of the prospect applying to the unit
building_id string The id of the building the prospect is applying to
unit_id string The id of the unit the prospect is applying to
lease_start_date string The start date of the prospects lease. yyy-mm-dd format, e.g. 2017-09-01
lease_end_date string The eend date of the prospects lease. yyy-mm-dd format, e.g. 2017-09-01
early_move_in_date
optional
string If the move in date differs from the lease start date. yyy-mm-dd format, e.g. 2017-09-01
monthly_rent string monthly rent in dollars, i.e. \$4.00 -> 4.00
deposit_amount string deposit amount in dollars, i.e. \$4.00 -> 4.00
key_deposit string key deposit amount in dollars, i.e. \$4.00 -> 4.00
collect_first_months_with_deposit
optional
boolean if the application should collect first months rent with deposit
create_prorated_charge
optional
boolean If the application should prorate charge if early move in date is prior to lease start date
coapplicants_in_application
optional
boolean Allow this applicant to invite others to the application

Showings

Get Showings Availability


curl -X GET \
  'https://{API_URL}/v1/bookings/apartment_showings/find_availability' \
  -H 'Accept: application/json' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/v1/bookings/apartment_showings/find_availability")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: "https://{API_URL}/v1/bookings/apartment_showings/find_availability",
  method: "GET",
  headers: {
    Accept: "application/json",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN, :property_id, :unit_type_ids and :requested_date

Example Response

  {
    availabilities: {
        lucky: true, // is true when requested date and availabilities.day_0.date match
        availabilities: {
            availabilities: {
                day_0: {
                    date: "July 09, 2020",
                    available_times: [null, null, null, null, null, null, null, null, null, null, null, null, "10:00AM", "10:15AM",…],
                    }
                day_1: {
                    date: "July 10, 2020",
                    available_times: [null, null, null, null, null, null, null, null, null, null, null, null, "10:00AM", "10:15AM",…],
                    }
            ...},
        showing_length: 30
    }
  }

This endpoint retrieves the showings availability

HTTP Request

GET https://{API_URL}/v1/bookings/apartment_showings/find_availability

Headers

header value
Content-Type application/json
Accept application/json

URL Parameters

parameter description
property_id Unique ID of building, please use the buildings endpoint
unit_type_ids Unique IDs of Unit types. For now just use 'all' - need to open and endpoint to retrieve unit types
requested_date Requested Date of showing. yyyy-mm-dd format, e.g. 2017-09-01

Create Showing


curl --location --request POST 'https://{API_URL}/v1/landlords/create_lead_booking' \
--header 'Content-Type: multipart/form-data; boundary=--------------------------547360561065134872686285' \
--form 'property_id=2' \
--form 'desired_unit=[20]' \
--form 'book_date=Jul 30, 2020' \
--form 'book_time=09:15AM' \
--form 'first_name=Hugh' \
--form 'last_name=Smith' \
--form '[email protected]' \
--form 'phone_number=0000000000' \
--form 'move_in_date=Jul 31, 2020' \
--form 'traffic_source=15' \
--form 'max_budget=$350.00' \
--form 'min_budget=$150.00' \
--form 'notify_by_sms=true' \
--form 'notify_by_email=true'


require "uri"
require "net/http"

url = URI("https://{API_URL}/v1/landlords/create_lead_booking")

https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "multipart/form-data; boundary=--------------------------547360561065134872686285"
form_data = [['property_id', '2'],['desired_unit', '[20]'],['book_date', 'Jul 30, 2020'],['book_time', '09:15AM'],['first_name', 'Hugh'],['last_name', 'Smith'],['email', '[email protected]'],['phone_number', '0000000000'],['move_in_date', 'Jul 31, 2020'],['traffic_source', '15'],['max_budget', '$350.00'],['min_budget', '$150.00'],['notify_by_sms', 'true'],['notify_by_email', 'true']]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body

var form = new FormData();
form.append("property_id", "2");
form.append("desired_unit", "[20]");
form.append("book_date", "Jul 30, 2020");
form.append("book_time", "09:15AM");
form.append("first_name", "Hugh");
form.append("last_name", "Smith");
form.append("email", "[email protected]");
form.append("phone_number", "0000000000");
form.append("move_in_date", "Jul 31, 2020");
form.append("traffic_source", "15");
form.append("max_budget", "$350.00");
form.append("min_budget", "$150.00");
form.append("notify_by_sms", "true");
form.append("notify_by_email", "true");

var settings = {
  "url": "https://{API_URL}/v1/landlords/create_lead_booking",
  "method": "POST",
  "timeout": 0,
  "headers": {
    "Content-Type": "multipart/form-data; boundary=--------------------------547360561065134872686285"
  },
  "processData": false,
  "mimeType": "multipart/form-data",
  "contentType": false,
  "data": form
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, :property_id, :desired_unit, :book_date, :book_time, :first_name, :last_name, :email, :phone_number, :move_in_date, :traffic_source, :max_budget, :min_budget, :notify_by_sms, :notify_by_email and :requested_date

Example Response

  {
    success: "Showing Successfully Confirmed."
  }

This endpoint creates a showing

HTTP Request

POST https://{API_URL}/v1/landlords/create_lead_booking

Headers

header value
Content-Type application/json
Accept application/json

URL Parameters

NOTE: desired_unit IDs and traffic_sources can be found by calling https://{API_URL}/v1/landlords/public_properties/{property_id}?for_showings=true

parameter description
property_id Unique ID of building, please use the buildings endpoint
desired_unit Unique IDs of the prospect's desired unit type ID array format, e.g. [20]
book_date Requested Date of showing. yyyy-mm-dd format, e.g. 2017-09-01
book_time Requested Time of showing. string format, e.g. 09:00PM
first_name Prospect's first name. string format, e.g. Damon
last_name Prospect's last name. string format, e.g. Richards
email Prospect's email. string format, e.g. [email protected]
phone_number Prospect's phone number. string format, must be ten digits, e.g. 4169929048
move_in_date Requested Move in Date of the prospect. yyyy-mm-dd format, e.g. 2017-09-01
traffic_source Lead marketing source of the prospect. string format, must already exist within the Yuhu System e.g. Google
min_budget Minimum desired budget of the prospect. integer format, e.g. 1000.00
max_budget Maximum desired budget of the prospect. integer format, e.g. 2000.00
notify_by_sms Whether the prospect would like to be notified by SMS. boolean format, e.g. true
notify_by_email Whether the prospect would like to be notified by Email. boolean format, e.g. true

Rentable Items

Get Rentable Items


curl -X GET \
  'https://{API_URL}/partners/v1/rentable_items' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/rentable_items")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: "https://{API_URL}/partners/v1/rentable_items",
  method: "GET",
  headers: {
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace `API_URL, TOKEN

Example Response

[
  {
    "id": "1",
    "building_id" "123",
    "active": true,
    "asset_number": "p1",
    "item_type": "Parking",
    "item_sub_type": null,
    "is_rentable": true,
    "available_to_tenants": true,
    "market_amount_cents": 10000,
    "market_deposit_amount_cents": 10000,
    "market_key_deposit_amount_cents": 100,
  },
  {
    "id": "2",
    "building_id" "123",
    "active": true,
    "asset_number": "p2",
    "item_type": "Parking",
    "item_sub_type": null,
    "is_rentable": true,
    "available_to_tenants": true,
    "market_amount_cents": 10000,
    "market_deposit_amount_cents": 10000,
    "market_key_deposit_amount_cents": 100,
  }
]

This endpoint retrieves all Rentable items.

HTTP Request

GET https://{API_URL}/partners/v1/rentable_items

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Get Rentable items for Building


curl -X GET \
  'https://{API_URL}/partners/v1/buildings/:building_id/rentable_items' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/buildings/123/rentable_items")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: "https://{API_URL}/partners/v1/buildings/123/rentable_items",
  method: "GET",
  headers: {
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace `API_URL, TOKEN

Example Response

[
  {
    "id": "1",
    "building_id" "123",
    "active": true,
    "asset_number": "p1",
    "item_type": "Parking",
    "item_sub_type": null,
    "is_rentable": true,
    "available_to_tenants": true,
    "market_amount_cents": 10000,
    "market_deposit_amount_cents": 10000,
    "market_key_deposit_amount_cents": 100,
  },
  {
    "id": "2",
    "building_id" "123",
    "active": true,
    "asset_number": "p2",
    "item_type": "Parking",
    "item_sub_type": null,
    "is_rentable": true,
    "available_to_tenants": true,
    "market_amount_cents": 10000,
    "market_deposit_amount_cents": 10000,
    "market_key_deposit_amount_cents": 100,
  },
]

This endpoint retrieves all rentable items for a building.

HTTP Request

GET https://{API_URL}/partners/v1/buildings/<building_id>/rentable_items

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter description
building_id Unique ID of building to return rentable items from

CREATE/UPDATE Rentable Items


curl -X PUT \
  https://{API_URL}/partners/v1/rentable_items \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "id": "1",
      "building_id" "123",
      "active": true,
      "asset_number": "p1",
      "item_type": "Parking",
      "item_sub_type": null,
      "is_rentable": true,
      "available_to_tenants": true,
      "market_amount_cents": 10000,
      "market_deposit_amount_cents": 10000,
      "market_key_deposit_amount_cents": 100,
    },
    {
      "id": "2",
      "building_id" "123",
      "active": true,
      "asset_number": "p2",
      "item_type": "Parking",
      "item_sub_type": null,
      "is_rentable": true,
      "available_to_tenants": true,
      "market_amount_cents": 10000,
      "market_deposit_amount_cents": 10000,
      "market_key_deposit_amount_cents": 100,
    }
  ]'


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/rentable_items")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'
request.body = '[
     {
      "id": "1",
      "building_id" "123",
      "active": true,
      "asset_number": "p1",
      "item_type": "Parking",
      "item_sub_type": null,
      "is_rentable": true,
      "available_to_tenants": true,
      "market_amount_cents": 10000,
      "market_deposit_amount_cents": 10000,
      "market_key_deposit_amount_cents": 100,
    },
    {
      "id": "2",
      "building_id" "123",
      "active": true,
      "asset_number": "p2",
      "item_type": "Parking",
      "item_sub_type": null,
      "is_rentable": true,
      "available_to_tenants": true,
      "market_amount_cents": 10000,
      "market_deposit_amount_cents": 10000,
      "market_key_deposit_amount_cents": 100,
    }
]'

response = http.request(request)
puts response.read_body


var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{API_URL}/partners/v1/rentable_items",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {TOKEN}",
  },
  "processData": false,
  "data": '[
     {
      "id": "1",
      "building_id" "123",
      "active": true,
      "asset_number": "p1",
      "item_type": "Parking",
      "item_sub_type": null,
      "is_rentable": true,
      "available_to_tenants": true,
      "market_amount_cents": 10000,
      "market_deposit_amount_cents": 10000,
      "market_key_deposit_amount_cents": 100,
    },
    {
      "id": "2",
      "building_id" "123",
      "active": true,
      "asset_number": "p2",
      "item_type": "Parking",
      "item_sub_type": null,
      "is_rentable": true,
      "available_to_tenants": true,
      "market_amount_cents": 10000,
      "market_deposit_amount_cents": 10000,
      "market_key_deposit_amount_cents": 100,
    }
  ]'
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "id": "1",
    "success": true,
    "message": null
  },
  {
    "id": "2",
    "success": true,
    "message": null
  }
]

Batch endpoint to upsert rentable items for a specific landlord/client.

HTTP Request

PUT https://{API_URL}/partners/v1/rentable_items

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Parameters

parameter type description
id string Unique identifier of rentable item
active boolean Whether the rentable item is active on the landlord portal
building_id string Unique identifier for building to associate too
asset_number string Identification number
item_type string Type of rentable item, e.g. Parking
item_sub_type
optional
string Item sub type
is_rentable
optional
boolean Defaults to true, indicates if it can be rentable
available_to_tenants
optional
boolean Defaults to true, indicates if it is available to tenants to rent
market_amount_cents number Indicates the market amount in cents for rentable item. e.g. \$1000.00 = 100000.
market_deposit_amount_cents number Indicates the market deposit amount in cents for rentable item. e.g. \$1000.00 = 100000.
market_key_deposit_amount_cents number Indicates the market key deposit amount in cents for rentable item. e.g. \$1000.00 = 100000.

DELETE Rentable Items [BETA - not live]


curl -X DELETE \
  https://{API_URL}/partners/v1/rentable_items/:rentable_item_id \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/rentable_items/:rentable_item_id")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: "https://{API_URL}/partners/v1/rentable_items/:rentable_item_id",
  method: "DELETE",
  headers: {
    "Content-Type": "application/json",
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "message": "Successfully inactivated rentable item"
  }
]

This will inactivate a rentable item.

HTTP Request

DELETE https://{API_URL}/partners/v1/rentable_items/<rentable_item_id>

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter type description
rentable_item_id string Unique identifier of rentable item to inactivate

Rental Incentives [BETA - not live]

Get Rental Incentives [BETA - not live]


curl -X GET \
  'https://{API_URL}/partners/v1/rental_incentives' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/rental_incentives")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: "https://{API_URL}/partners/v1/rental_incentives",
  method: "GET",
  headers: {
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace `API_URL, TOKEN

Example Response

[
  {
    "id": "1",
    "active": true,
    "name": "100 off",
    "amount_cents": 10000,
    "concession_type": "dollar_amount",
    "term_in_months": 2,
    "unit_type_id": "1234",
    "unit_id": null,
    "building_id" null,
  },
  {
    "id": "2",
    "active": true,
    "name": "200 off for year",
    "concession_type": "percentage_amount",
    "percentage": 10,
    "term_in_months": 12,
    "unit_type_id": null,
    "unit_id": "12",
    "building_id": "1234"
  }
]

This endpoint retrieves all Rental Incentives.

HTTP Request

GET https://{API_URL}/partners/v1/rental_incentives

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Get Rental Incentives for Unit Type [BETA - not live]


curl -X GET \
  'https://{API_URL}/partners/v1/unit_types/:unit_type_id/rental_incentives' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/unit_types/123/rental_incentives")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: "https://{API_URL}/partners/v1/unit_types/123/rental_incentives",
  method: "GET",
  headers: {
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace `API_URL, TOKEN

Example Response

[
  {
    "id": "1",
    "active": true,
    "name": "100 off",
    "concession_type": "dollar_amount",
    "amount_cents": 10000,
    "term_in_months": 2,
    "unit_type_id": "123",
    "unit_id": null,
    "building_id" null
  },
  {
    "id": "2",
    "active": true,
    "name": "200 off for year",
    "concession_type": "percentage_amount",
    "percentage": 10,
    "term_in_months": 12,
    "unit_type_id": "123",
    "unit_id": null,
    "building_id": null
  }
]

This endpoint retrieves all rental incentives for a unit type.

HTTP Request

GET https://{API_URL}/partners/v1/unit_types/<unit_type_id>/rental_incentives

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter description
unit_type_id Unique ID of unit type to return rental incentives from

Get Rental Incentives for Unit [BETA - not live]


curl -X GET \
  'https://{API_URL}/partners/v1/buildings/123/units/12/rental_incentives' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/buildings/123/units/12/rental_incentives")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: "https://{API_URL}/partners/v1/buildings/123/units/12/rental_incentives",
  method: "GET",
  headers: {
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace `API_URL, TOKEN

Example Response

[
  {
    "id": "1",
    "active": true,
    "name": "200 off for year",
    "concession_type": "dollar_amount",
    "amount_cents": 20000,
    "term_in_months": 12,
    "unit_type_id": null,
    "unit_id": "12",
    "building_id": "123"
  }
]

This endpoint retrieves all rental incentives for a unit.

HTTP Request

GET https://{API_URL}/partners/v1/buildings/<building_id>/units/<unit_id>/rental_incentives

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter description
building_id Unique ID of building
unit_id Unique ID of unit to return rental incentivesfrom

CREATE/UPDATE Rental Incentives [BETA - not live]


curl -X PUT \
  https://{API_URL}/partners/v1/rental_incentives \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "id": "1",
      "active": true,
      "name": "100 off",
      "concession_type": "dollar_amount",
      "amount_cents": 10000,
      "term_in_months": 2,
      "unit_type_id": "123",
      "unit_id": null,
      "building_id" null
    },
    {
      "id": "2",
      "active": true,
      "name": "200 off for year",
      "concession_type": "percentage_amount",
      "percentage": 10,
      "term_in_months": 12,
      "unit_type_id": null,
      "unit_id": "123",
      "building_id": "1234"
    }
  ]'


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/rental_incentives")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'
request.body = '[
    {
      "id": "1",
      "active": true,
      "name": "100 off",
      "concession_type": "percentage_amount",
      "percentage": 10,
      "term_in_months": 2,
      "unit_type_id": "123",
      "unit_id": null,
      "building_id" null
    },
    {
      "id": "2",
      "active": true,
      "name": "200 off for year",
      "amount_cents": 20000,
      "term_in_months": 12,
      "unit_type_id": null,
      "unit_id": "123",
      "building_id": "1234"
    }
]'

response = http.request(request)
puts response.read_body


var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{API_URL}/partners/v1/rental_incentives",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {TOKEN}",
  },
  "processData": false,
  "data": '[
    {
      "id": "1",
      "active": true,
      "name": "100 off",
      "concession_type": "dollar_amount",
      "amount_cents": 10000,
      "term_in_months": 2,
      "unit_type_id": "123",
      "unit_id": null,
      "building_id" null
    },
    {
      "id": "2",
      "active": true,
      "name": "200 off for year",
      "concession_type": "percentage_amount",
      "percentage": 10,
      "term_in_months": 12,
      "unit_type_id": null,
      "unit_id": "123",
      "building_id": "1234"
    }
  ]'
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "id": "1",
    "success": true,
    "message": null
  },
  {
    "id": "2",
    "success": true,
    "message": null
  }
]

Batch endpoint to upsert rental incentives for a specific landlord/client.

HTTP Request

PUT https://{API_URL}/partners/v1/rental_incentives

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

Parameters

parameter type description
id string Unique identifier of rental incentive
active boolean Whether the rental incentive is active on the landlord portal
name string Name / title of the rental incentive
concession_type string Valid values: dollar_amount, percentage_amount,
amount_cents number Indicates the amount in cents. e.g. \$1000.00 = 100000. Required if concession_type is dollar_amount
percentage number Indicates the percentage. Required if concession_type is percentage_amount
term_in_months number Length of the incentive
unit_type_id string Unique identifier for the unit type to attach too, required if no unit_id attached
unit_id string Unique identifier for unit to attach too, required if no unit_type_id. Requires a building_id
building_id string Unique identifier for building for the unit to attach too, required if no unit_type_id

DELETE Rental Incentive [BETA - not live]


curl -X DELETE \
  https://{API_URL}/partners/v1/rental_incentives/:rental_incentive_id \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {TOKEN}' \
  -H 'Content-Type: application/json' \


require 'uri'
require 'net/http'

url = URI("https://{API_URL}/partners/v1/rental_incentives/:rental_incentive_id")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {TOKEN}'

response = http.request(request)
puts response.read_body

var settings = {
  async: true,
  crossDomain: true,
  url: "https://{API_URL}/partners/v1/rental_incentives/:rental_incentive_id",
  method: "DELETE",
  headers: {
    "Content-Type": "application/json",
    Accept: "application/json",
    Authorization: "Bearer {TOKEN}",
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Make sure to replace API_URL, TOKEN

Example Response

[
  {
    "message": "Successfully inactivated rental incentive"
  }
]

This will inactivate a rental incentive.

HTTP Request

DELETE https://{API_URL}/partners/v1/rental_incentives/<rental_incentive_id>

Headers

header value
Content-Type application/json
Accept application/json
Authorization Bearer {TOKEN}

URL Parameters

parameter type description
rental_incentive_id string Unique identifier of rental incentive to inactivate