Digitail API
Reports

Get appointments report

1min
code examples curl location globoff 'https //developer digitail io/api/v1/reports/appointments?filter\[clinic id]=integer\&page=1\&per page=15' \\ \ header 'accept application/json' \\ \ header 'content type application/json'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var requestoptions = { method 'get', headers myheaders, redirect 'follow' }; fetch("https //developer digitail io/api/v1/reports/appointments?filter\[clinic id]=integer\&page=1\&per page=15", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));import requests import json url = "https //developer digitail io/api/v1/reports/appointments?filter\[clinic id]=integer\&page=1\&per page=15" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("get", url, headers=headers, data=payload) print(response text) \<?php $curl = curl init(); curl setopt array($curl, array( curlopt url => 'https //developer digitail io/api/v1/reports/appointments?filter\[clinic id]=integer\&page=1\&per page=15', curlopt returntransfer => true, curlopt encoding => '', curlopt maxredirs => 10, curlopt timeout => 0, curlopt followlocation => true, curlopt http version => curl http version 1 1, curlopt customrequest => 'get', curlopt httpheader => array( 'accept application/json', 'content type application/json' ), )); $response = curl exec($curl); curl close($curl); echo $response; responses // successful operation { "data" \[ { "id" 1, "datetime start utc" "2023 12 01t09 00 00 000000z", "datetime end utc" "2023 12 01t10 00 00 000000z", "status" "", "source" 0, "pet" { "id" 1, "nickname" "ben", "species" { "id" 1, "label" "dog", "species" "dog" }, "breed" { "id" 1, "label" "bull terrier", "breed" "bull terrier", "species id" 1 }, "pet parents" \[ { "id" 0, "name" "", "last name" "", "phone" "", "address" "", "address 2" "", "email" "", "chat uid" "" } ], "age" "" }, "service" { "id" 0, "label" "", "service details" { "id" 0, "duration" 0, "color" "#467626", "description" "", "deposit for online booking" "10 00" } }, "clinic" { "id" 1, "name" "" }, "vet" { "id" 1, "first name" "", "last name" "", "job title" "" }, "payment deposits" { "id" 0, "value" "", "paid value" "", "status" "", "appointments" \[ "" ], "payment links" \[ { "id" 0, "amount" "", "url" "" } ] }, "guest" false, "pet name" "", "pet parent name" "", "pet parent email" "", "pet parent phone" "", "revenue" "", "utm source" "" } ] }// the user is not authorized to perform the requested operation // this response is sent when a request fails validation the format is identical on all endpoints { "message" "the name field is required (and 1 more error)", "errors" { "field1" \[ "" ], "field2" \[ "" ] } }