Charts


Mirrors the BookyFlow Charting functionality.

Optional : language suffix such as "en-GB" or "es-ES" (depending on installed languages) to return lables in a given language

Scope

Property Get / Property Set

Get charts - bookings

Endpoint

GET 

Response Example

Status: OK (200)

{
  "data": {
    "charts_bookings": {
      "2019": {
        "title": "reservas",
        "description": "El ingreso por a\u00f1o / mes",
        "labels": [
          "Jan",
          "Feb",
          "Mar",
          "Apr",
          "May",
          "Jun",
          "Jul",
          "Aug",
          "Sep",
          "Oct",
          "Nov",
          "Dec"
        ],
        "label": 2019,
        "data": [
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          72,
          0,
          0,
          0
        ],
        "fillColor": "rgba(240,4,167,0.2)",
        "strokeColor": "rgba(240,4,167,1)",
        "pointColor": "rgba(240,4,167,1)",
        "pointStrokeColor": "#fff",
        "pointHighlightFill": "#fff",
  ...
  (Response truncated for brevity)
}

Get charts - countries

Endpoint

GET https://yourdomain.com/bookyflow/api/charts/{{property_id}}/guest_countries/en-GB/

Path Parameters

Parameter Description
{{property_id}} (Required parameter)

Response Example

Status: OK (200)

{
  "data": {
    "charts_guest_contries": [
      {
        "title": "Guests",
        "description": "Country",
        "labels": {
          "Germany": 4,
          "United Kingdom": 1
        },
        "label": "October 2019",
        "data": [
          1,
          1,
          1,
          1,
          1
        ],
        "fillColor": "rgba(13,82,61,0.2)",
        "strokeColor": "rgba(13,82,61,1)",
        "pointColor": "rgba(13,82,61,1)",
        "pointStrokeColor": "#fff",
        "pointHighlightFill": "#fff",
        "pointHighlightStroke": "rgba(13,82,61,1)"
      }
    ]
  },
  "meta": {
    "code": 200
  }
}

Get charts - occupancy

Endpoint

GET https://yourdomain.com/bookyflow/api/charts/{{property_id}}/occupancy/

Path Parameters

Parameter Description
{{property_id}} (Required parameter)

Response Example

Status: OK (200)

{
  "data": {
    "charts_occupancy": [
      {
        "title": "Bookings October 2019",
        "description": "_BOOKYFLOW_CHART_OCCUPANCY_DESC",
        "labels": [
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19,
          20,
          21,
          22,
          23,
          24,
          25,
          26,
          27,
          28,
          29,
          30,
          31
        ],
        "label": "October 2019",
  ...
  (Response truncated for brevity)
}