Digitail API
Appointments
Update an Appointment
1 min
code examples curl location globoff request put 'https //developer digitail io/api/v1/appointments/{id}' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{"body" "appointmentrequestbodyupdate"}'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "body" "appointmentrequestbodyupdate" }); var requestoptions = { method 'put', headers myheaders, body raw, redirect 'follow' }; fetch("https //developer digitail io/api/v1/appointments/{id}", 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/appointments/{id}" payload = json dumps({ "body" "appointmentrequestbodyupdate" }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("put", 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/appointments/{id}', curlopt returntransfer => true, curlopt encoding => '', curlopt maxredirs => 10, curlopt timeout => 0, curlopt followlocation => true, curlopt http version => curl http version 1 1, curlopt customrequest => 'put', curlopt postfields =>'{"body" "appointmentrequestbodyupdate"}', 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, "event id" 0, "clinic id" 1, "room id" 0, "guest" false, "pet id" 1, "record id" 0, "status" "1", "datetime" "2022 06 16 15 12 38", "end datetime" "2022 06 16 15 42 38", "datetime start utc" "2023 12 01t09 00 00 000000z", "datetime end utc" "2023 12 01t10 00 00 000000z", "notify owner" 1, "notify owner mode" \[ "" ], "observations" "", "user note" "", "pet name" "", "owner name" "", "patient" { "id" 1, "nickname" "fritz", "species id" "1", "breed id" "1", "observations" "", "gender" "male", "microchip" "", "crossbreed" "0", "crossbreed details id" 0, "crossbreed details" { "id" 0, "label" "", "breed" "", "species id" 0 }, "color" "navajowhite", "distinctive marks" "", "birthday" "1983 03 29", "gender string" "", "chip number" "", "microchip location" "", "insurance number" "", "passport" "", "profile picture" "https //dev 1 public digitail s3 eu central 1 amazonaws com/ionut/uploads/kxy8rlv2vluizyqwrcy2", "description" "lorem ipsum", "constitution" "", "conformation" "", "weight" "", "weight evolution" 0, "allergies" "", "nr recs" 0, "blood type" "", "hormonal status" 0, "age" "38 years, 3 months, 19 days", "age breakdown" { "years" 38, "months" 3, "days" 19 }, "patientnumber" "mxc 1 #jwq 1", "is verified" "1", "breeder" "", "archive" { "id" 1, "reason" "the patient was archived because ", "type" "deceased" }, "patients" \[ { "id" 1, "pet id" 1, "clinic id" 1, "number" "dgt 102", "archived at" "2020 08 16t08 56 44 000000z", "archive type id" 1, "archive reason" "pet deceased" } ], "birthday estimated" false, "rabic tag number" "12109384", "updated at" "2020 06 12 15 45 43" }, "room" { "id" 1, "clinic id" 1, "name" "consultation room 1" }, "event" { "id" 1, "address id" 1, "clinic id" 1, "capacity" 25, "date" "2022 06 16 15 12 38", "name" "event name", "preferences" "", "appointments number" 5, "visit types" \[ "" ] }, "service" { "id" 1, "category id" 1, "label" "general checkup", "translation slug" "services checkups general checkup", "label en" "general checkup", "service details" { "clinic id" 1, "service id" 1, "duration" 30, "visible" true, "color" "#ff0000", "order" 30, "printable files" \[ { "id" 0, "title" "" } ], "service packages" \[ { "id" 0, "name" "" } ] }, "task templates" \[ { "id" 0, "name" "" } ] }, "vet" { "id" 1, "first name" "john", "last name" "doe", "full name" "john doe", "name with title" "dr john doe", "email" "vet\@example com", "phone" "123456789", "avatar" "https //vet digitail io/images/profilepic jpg", "stamp" "https //vet digitail io/images/signature jpg", "license number" "123456789", "job title" "dr ", "deleted at" "", "active" true, "video link" "https //digitail com/video", "public appointment link" "https //digitail com/clinics/clinic slug/vet slug", "type" "", "two factor enabled" true, "has chat user" true, "colleague order" 1, "is visible on calendar" false, "employees" \[ { "clinic id" 0, "vet role id" 0, "is available for appointments" false, "is visible on calendar" false, "type" "" } ], "visit types" \[ { "id" 0, "clinic id" 0, "name" "", "description" "", "category" "", "category label" "", "duration" 0, "is visible" false, "color" "", "order" 0, "deposit for online booking" "", "printable files" \[ { "id" 0, "title" "" } ], "service packages" \[ { "id" 0, "name" "", "description" "", "unit price" "", "price" "", "price includes tax" false, "tax" "" } ] } ] }, "owner email" "", "owner phone" "", "reminder notifications" {}, "newrequests" \[ {} ], "consentforms" \[ {} ], "video link" "https //example com/1234235345 mp4", "notification message" "", "cancellation reason" "", "recurrence" "freq=daily;count=10", "has google cal error" false, "duration" 0, "occasion" "", "token" "", "visit type id" 0, "visit type" {} } }// the request was invalid or contained data that was not allowed { "message" "requested filter(s) `filter1` are not allowed allowed filter(s) are date, query, " }