Digitail API
Appointments
Confirm an Appointment
1min
code examples curl location globoff request post 'https //developer digitail io/api/v1/appointments/{id}/confirm' \\ \ 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 'post', headers myheaders, redirect 'follow' }; fetch("https //developer digitail io/api/v1/appointments/{id}/confirm", 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}/confirm" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", 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}/confirm', curlopt returntransfer => true, curlopt encoding => '', curlopt maxredirs => 10, curlopt timeout => 0, curlopt followlocation => true, curlopt http version => curl http version 1 1, curlopt customrequest => 'post', curlopt httpheader => array( 'accept application/json', 'content type application/json' ), )); $response = curl exec($curl); curl close($curl); echo $response; responses // the action was successful but there is no content to return // 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" \[ "" ] } }