Bookings Tags

  1. Overview
  2. List bookings tags
  3. Get a single bookings tag
  4. Create a new bookings tag
  5. Update a bookings tag
  6. Add a single bookings tag
  7. Remove a single bookings tag

Overview

This resource represents the Booking Tags that can be associated with the Bookings.

Parameters

Name Type Read/Write Description
account Integer Read Account’s ID related to the Bookings Tag
id Integer Read Bookings Tag’s id.
color String Read Bookings Tag’s color (Hexadecimal representation)
logo String Read Bookings Tag’s logo (Currently as font awesome class)
name Object Read Bookings Tag’s name, list of locales described in enums section.
created_at Time Read Bookings Tag’s create time.
updated_at Time Read Bookings Tag’s update time.
Name Type Read/Write Description Constraints
account Integer Read Account’s ID related to the Bookings Tag  
id Integer Read Bookings Tag’s id.  
color String Read/Write Bookings Tag’s color (Hexadecimal representation) Required
logo String Read/Write Bookings Tag’s logo (Currently as font awesome class)  
name Object Read/Write Bookings Tag’s name, list of locales described in enums section. Required
created_at Time Read Bookings Tag’s create time.  
updated_at Time Read Bookings Tag’s update time.  

List bookings tags

List all bookings tags for a given account(s).

GET /bookings_tags

Response

{
  "links": {
    "bookings_tags.account": "https://www.bookingsync.com/api/v3/accounts/{bookings_tags.account}"
  },
  "bookings_tags": [
    {
      "id": 3,
      "color": "#6666ff",
      "logo": "fa-link",
      "name": {
        "en": "Beach"
      },
      "created_at": "2017-04-26T08:21:58Z",
      "updated_at": "2017-05-02T09:41:51Z",
      "links": {
        "account": 3
      }
    }
  ],
  "meta": {
  }
}

Get a single bookings tag

Returns a single bookings tag identified by ID.

GET /bookings_tags/:bookings_tag_id

Response

{
  "links": {
    "bookings_tags.account": "https://www.bookingsync.com/api/v3/accounts/{bookings_tags.account}"
  },
  "bookings_tags": [
    {
      "id": 3,
      "color": "#6666ff",
      "logo": "fa-link",
      "name": {
        "en": "Beach"
      },
      "created_at": "2017-04-26T08:21:58Z",
      "updated_at": "2017-05-02T09:41:51Z",
      "links": {
        "account": 3
      }
    }
  ],
  "meta": {
  }
}

Create a new bookings tag

Creates a bookings tag for account.

POST /bookings_tags

Example JSON request

{
  "bookings_tags": [
    {
      "color": "#008080",
      "name_en": "tag_name"
    }
  ]
}

Response

{
  "links": {
    "bookings_tags.account": "https://www.bookingsync.com/api/v3/accounts/{bookings_tags.account}"
  },
  "bookings_tags": [
    {
      "id": 5,
      "color": "#008080",
      "logo": null,
      "name": {
        "en": "tag_name"
      },
      "created_at": "2019-04-25T02:26:42Z",
      "updated_at": "2019-04-25T02:26:42Z",
      "links": {
        "account": 1
      }
    }
  ],
  "meta": {
  }
}

Update a bookings tag

Returns an updated bookings tag identified by ID.

PUT /bookings_tags/:bookings_tag_id

Example JSON request

{
  "bookings_tags": [
    {
      "color": "#008080",
      "name_en": "tag_name"
    }
  ]
}

Response

{
  "links": {
    "bookings_tags.account": "https://www.bookingsync.com/api/v3/accounts/{bookings_tags.account}"
  },
  "bookings_tags": [
    {
      "id": 5,
      "color": "#008080",
      "logo": null,
      "name": {
        "en": "tag_name"
      },
      "created_at": "2019-04-25T02:26:42Z",
      "updated_at": "2019-04-25T02:26:42Z",
      "links": {
        "account": 1
      }
    }
  ],
  "meta": {
  }
}

Add a single bookings tag

Adds a tag to an existing booking.

POST /bookings/:id/add_tag/:bookings_tag_id

Returns empty body with status: 201

Remove a single bookings tag

Removes a tag from an existing booking.

DELETE /bookings/:id/remove_tag/:bookings_tag_id

Returns empty body with status: 204