Booking Comments

  1. List booking comments
  2. Get a single booking comment
  3. Create a new booking comment
  4. Update a booking comment
  5. Destroy a booking comment

Parameters

Name Type Read/Write Description
id Integer Read Booking Comment’s id.
content String Read Booking Comment’s content.
editable Boolean Read Booking Comment can be edited if true is returned.
created_at Time Read Booking Comment’s create time.
updated_at Time Read Booking Comment’s update time.
Name Type Read/Write Description
id Integer Read Booking Comment’s id.
booking_id Integer Write Required. Booking id related to the Booking Comment.
content String Read/Write Required. Booking Comment’s content.
editable Boolean Read Booking Comment can be edited if true is returned.
created_at Time Read Booking Comment’s create time.
updated_at Time Read Booking Comment’s update time.

List booking comments

List all booking_comments for a given account.

GET /booking_comments

Response

{
  "links": {
    "booking_comments.account": "https://www.bookingsync.com/api/v3/accounts/{booking_comments.account}",
    "booking_comments.booking": "https://www.bookingsync.com/api/v3/bookings/{booking_comments.booking}"
  },
  "booking_comments": [
    {
      "id": 3,
      "content": "Comment content",
      "editable": false,
      "created_at": "2017-11-09T09:08:16Z",
      "updated_at": "2017-11-09T09:08:16Z",
      "links": {
        "account": 3,
        "booking": 1
      }
    }
  ],
  "meta": {
  }
}
{
  "links": {
    "booking_comments.account": "https://www.bookingsync.com/api/v3/accounts/{booking_comments.account}",
    "booking_comments.booking": "https://www.bookingsync.com/api/v3/bookings/{booking_comments.booking}"
  },
  "booking_comments": [
    {
      "id": 3,
      "content": "Comment content",
      "editable": true,
      "created_at": "2017-11-09T09:08:16Z",
      "updated_at": "2017-11-09T09:08:16Z",
      "links": {
        "account": 3,
        "booking": 1
      }
    }
  ],
  "meta": {
  }
}

Get a single booking comment

Returns a single booking_comment identified by ID.

GET /booking_comments/:booking_comment_id

Response

{
  "links": {
    "booking_comments.account": "https://www.bookingsync.com/api/v3/accounts/{booking_comments.account}",
    "booking_comments.booking": "https://www.bookingsync.com/api/v3/bookings/{booking_comments.booking}"
  },
  "booking_comments": [
    {
      "id": 3,
      "content": "Comment content",
      "editable": false,
      "created_at": "2017-11-09T09:08:16Z",
      "updated_at": "2017-11-09T09:08:16Z",
      "links": {
        "account": 3,
        "booking": 1
      }
    }
  ],
  "meta": {
  }
}
{
  "links": {
    "booking_comments.account": "https://www.bookingsync.com/api/v3/accounts/{booking_comments.account}",
    "booking_comments.booking": "https://www.bookingsync.com/api/v3/bookings/{booking_comments.booking}"
  },
  "booking_comments": [
    {
      "id": 3,
      "content": "Comment content",
      "editable": true,
      "created_at": "2017-11-09T09:08:16Z",
      "updated_at": "2017-11-09T09:08:16Z",
      "links": {
        "account": 3,
        "booking": 1
      }
    }
  ],
  "meta": {
  }
}

Create a new booking comment

Creates a booking_comment for given season.

POST /booking_comments

Example JSON request

{
  "booking_id": 1,
  "booking_comments": [
    {
      "content": "Comment content"
    }
  ]
}

Response

{
  "links": {
    "booking_comments.account": "https://www.bookingsync.com/api/v3/accounts/{booking_comments.account}",
    "booking_comments.booking": "https://www.bookingsync.com/api/v3/bookings/{booking_comments.booking}"
  },
  "booking_comments": [
    {
      "id": 3,
      "content": "Comment content",
      "editable": true,
      "created_at": "2017-11-09T09:08:16Z",
      "updated_at": "2017-11-09T09:08:16Z",
      "links": {
        "account": 3,
        "booking": 1
      }
    }
  ],
  "meta": {
  }
}

Update a booking comment

Returns an updated booking_comment identified by ID.

PUT /booking_comments/:booking_comment_id

Example JSON request

{
  "booking_comments": [
    {
      "content": "Comment content"
    }
  ]
}

Response

{
  "links": {
    "booking_comments.account": "https://www.bookingsync.com/api/v3/accounts/{booking_comments.account}",
    "booking_comments.booking": "https://www.bookingsync.com/api/v3/bookings/{booking_comments.booking}"
  },
  "booking_comments": [
    {
      "id": 3,
      "content": "Comment content",
      "editable": true,
      "created_at": "2017-11-09T09:08:16Z",
      "updated_at": "2017-11-09T09:08:16Z",
      "links": {
        "account": 3,
        "booking": 1
      }
    }
  ],
  "meta": {
  }
}

Destroy a booking comment

Required OAuth scope: :bookings_write or :bookings_write_owned

Returns an empty response with ‘204 No Content’ status code on success.

DELETE /booking_comments/:booking_comment_id