List all Vets of Role
1 min
code examples curl request get \\ \ url https //developer digitail io/api/v1/roles/{id}/vets \\ \ header 'accept 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/roles/{id}/vets", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //developer digitail io/api/v1/roles/{id}/vets") https = net http new(url host, url port) https use ssl = true request = net http get new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" response = https request(request) puts response read body import requests import json url = "https //developer digitail io/api/v1/roles/{id}/vets" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("get", url, headers=headers, data=payload) print(response text) responses // successful operation { "data" \[ { "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" "", "teams" \[ "" ] } ], "teams" \[ { "id" 0, "name" "", "handle" "", "clinic id" 0, "description" "", "type" "", "status" "", "color" "", "vet types" \[ "" ], "vets" \[ { "id" 1, "first name" "john", "last name" "doe", "full name" "john doe", "name with title" "dr john doe", "avatar" "http //digitail test/images/profilepic jpg", "job title" "dr ", "active" true, "clinic" \[ 0 ], "listing index" 1, "video link" "https //digitail com/video" } ], "vets count" 0 } ], "visit types" \[ { "id" 0, "clinic id" 0, "name" "", "description" "", "category" "", "category label" "", "duration" 0, "is visible" false, "color" "", "order" 0, "deposit for online booking" "", "has intake enabled" false, "printable files" \[ { "id" 0, "title" "" } ], "service packages" \[ { "id" 0, "name" "", "description" "", "unit price" "", "price" "", "price includes tax" false, "tax" "" } ] } ], "booking status" "" } ], "links" {}, "meta" {} }// 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, " }// the authorization token is missing or invalid // the user is not authorized to perform the requested operation // the user has sent too many requests in a given amount of time ("rate limiting") max 200 requests per minute