Digitail API
Pets
Update a Pet
1min
code examples curl location globoff request post 'https //developer digitail io/api/v1/pets/{id}' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ header 'x http method override patch'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); myheaders append("x http method override", "patch"); var requestoptions = { method 'post', headers myheaders, redirect 'follow' }; fetch("https //developer digitail io/api/v1/pets/{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/pets/{id}" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json', 'x http method override' 'patch' } 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/pets/{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 => 'post', curlopt httpheader => array( 'accept application/json', 'content type application/json', 'x http method override patch' ), )); $response = curl exec($curl); curl close($curl); echo $response; responses // successful operation { "data" { "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" "", "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" }, "birthday estimated" false, "rabic tag number" "12109384", "updated at" "2020 06 12 15 45 43" } }// 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