Overview

This API endpoint allows you to output report data which can be used in external tools such as PowerBI or Tableau. Before being able to access the Reports endpoint you must make sure that you have enabled the Report (read-only) setting in the API Keys settings panel within PabauCRM.

Endpoint

GET OAuth2/reports/get.php

Route

GET OAuth2/reports/get.php?api_key=your_api_key&company_id=your_company_id&from_date=2020-01-01&to_date=2020-05-08&id=report_id

Parameters

Below are a list of the attributes you can currently pass into Pabau.
 
Our API Endpoint expects five parameters:

  • api_key(string)

  • company_id(int)

  • from_date(string/ date formatted in Y-m-d, example. 2020-01-01)

  • to_date(string/ date formatted in Y-m-d, exmaple. 2020-05-20)

  • id(int) - this is the report_id

Obtaining the report_id

You can obtain the report_id while browsing for your desired report within PabauCRM. Passing that report_id to the endpoint will return data for that report.

Sample Response

appointments": [
{
"contact_id": "13117807",
"Salutation": "None",
"first_name": "George (Sample)",
"last_name": "Best",
"email": "clientemail13@client.com",
"phone": "077 1234 5678",
"mobile": "07781654021",
"lead_source": "",
"DOB": "0000-00-00",
"mailing_street": "101 Victoria Street",
"other_street": "",
"mailing_city": "London",
"mailing_county": "London",
"mailing_country": "United Kingdom",
"MailingPostal": "SW91 9DF",
"gender": "",
"avatar": "https://prelive-crm.pabau.com/139794389.jpg",
"opt_in_email": null,
"opt_in_phone": null,
"opt_in_post": null,
"opt_in_sms": null,
"opt_in_newsletter": null,
"marketing_source": "0",
"custom_id": "",
"medical_alerts": "",
"contact_custom_fields": {}
}]
Did this answer your question?