Rental Agreements

  1. List rental agreements
  2. Get a single rental agreement
  3. Create a new default rental agreement
  4. Create a new rental agreement for a booking
  5. Create a new rental agreement for a rental

Parameters

Name Type Read/Write Description
id Integer Read Rental Agreement’s id.
body Text Read Rental Agreement’s body.
created_at Time Read Rental Agreement’s create time.
updated_at Time Read Rental Agreement’s update time.
Name Type Read/Write Description
id Integer Read Rental Agreement’s id.
body Text Read/Write Required. Rental Agreement’s body. (100 000 characters max)
created_at Time Read Rental Agreement’s create time.
updated_at Time Read Rental Agreement’s update time.

List rental agreements

List all rental agreements for rentals in given account(s).

GET /rental_agreements

Response

{
  "rental_agreements": [
    {
      "id": 1,
      "body": "My Agreement",
      "created_at": "2017-11-09T09:08:17Z",
      "updated_at": "2017-11-09T09:08:17Z"
    }
  ]
}

Get a single rental agreement

Returns a single rental agreement identified by ID.

GET /rental_agreements/:rental_agreement_id

Response

{
  "rental_agreements": [
    {
      "id": 1,
      "body": "My Agreement",
      "created_at": "2017-11-09T09:08:17Z",
      "updated_at": "2017-11-09T09:08:17Z"
    }
  ]
}

Create a new default rental agreement

Create a new rental agreement to be used by default. This rental agreement will be used, unless one is defined at rental or booking level.

Returns a newly created rental agreement.

POST /rental_agreements

Example JSON request

{
  "rental_agreements": [
    {
      "body": "My Agreement"
    }
  ]
}

Response

{
  "rental_agreements": [
    {
      "id": 1,
      "body": "My Agreement",
      "created_at": "2017-11-09T09:08:17Z",
      "updated_at": "2017-11-09T09:08:17Z"
    }
  ]
}

Create a new rental agreement for a booking

Create a new rental agreement to be used exclusivly for this booking.

Returns a newly created rental agreement.

POST /bookings/:booking_id/rental_agreements

Example JSON request

{
  "rental_agreements": [
    {
      "body": "My Agreement"
    }
  ]
}

Response

{
  "rental_agreements": [
    {
      "id": 1,
      "body": "My Agreement",
      "created_at": "2017-11-09T09:08:17Z",
      "updated_at": "2017-11-09T09:08:17Z"
    }
  ]
}

Create a new rental agreement for a rental

Create a new rental agreement to be used by default for the given rental.

Returns a newly created rental agreement.

POST /rentals/:rental_id/rental_agreements

Example JSON request

{
  "rental_agreements": [
    {
      "body": "My Agreement"
    }
  ]
}

Response

{
  "rental_agreements": [
    {
      "id": 1,
      "body": "My Agreement",
      "created_at": "2017-11-09T09:08:17Z",
      "updated_at": "2017-11-09T09:08:17Z"
    }
  ]
}