Booking Comments

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

This resource represents the Booking’s Comments. Each Booking can have multiple comments and can be used for putting some extra notes about the Booking itself or as a way of communication between Users having access to the Account about this particular Booking to which the Comment is related to.

Overview

This resource represents the Booking’s Comments. Each Booking can have multiple comments and can be used for putting some extra notes about the Booking itself or as a way of communication between Users having access to the Account about this particular Booking to which the Comment is related to.

Parameters

Name Type Read/Write Description
account Integer Read Account’s ID related to the Booking Comment
booking Integer Read Booking’s ID related to the Booking Comment
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.
visible_for_all_account_users Boolean Read/Write Booking Comment is visible for every User having access to this Account. Particularly useful if you don’t want to expose Comment to Users with cleaner role.
created_at Time Read Booking Comment’s create time.
updated_at Time Read Booking Comment’s update time.
Name Type Read/Write Description Constraints
account Integer Read Account’s ID related to the BookingComment  
booking Integer Read Booking’s id related to the Booking Comment.  
id Integer Read Booking Comment’s id.  
booking_id Integer Write Booking’s id related to the Booking Comment. Required.
content String Read/Write Booking Comment’s content. Required, maximum length: 6000
editable Boolean Read Booking Comment can be edited if true is returned.  
visible_for_all_account_users Boolean Read/Write Booking Comment is visible for every User having access to this Account. Particularly useful if you don’t want to expose Comment to Users with cleaner role.  
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": "2023-12-11T08:26:27Z",
      "updated_at": "2023-12-11T08:26:27Z",
      "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": "2023-12-11T08:26:27Z",
      "updated_at": "2023-12-11T08:26:27Z",
      "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": "2023-12-11T08:26:27Z",
      "updated_at": "2023-12-11T08:26:27Z",
      "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": "2023-12-11T08:26:27Z",
      "updated_at": "2023-12-11T08:26:27Z",
      "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": "2023-12-11T08:26:27Z",
      "updated_at": "2023-12-11T08:26:27Z",
      "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": "2023-12-11T08:26:27Z",
      "updated_at": "2023-12-11T08:26:27Z",
      "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