Change Appointment status
1 min
PUT
/api/v1/appointment/{id}/change-status
Body Parameters
- bodyundefinedrequired
Responses
422
- undefinedExample
{ "message": "The given data was invalid.", "errors": { "status": [ "This value is invalid" ] } }
curl
curl --request PUT \
--url /api/v1/appointment/{id}/change-status \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{"body":"undefined"}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"body": "undefined"
});
var requestOptions = {
method: 'PUT',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/api/v1/appointment/{id}/change-status", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("/api/v1/appointment/{id}/change-status")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Put.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"body": "undefined"
})
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "/api/v1/appointment/{id}/change-status"
payload = json.dumps({
"body": "undefined"
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
422
// Bad request
"{\"message\":\"The given data was invalid.\",\"errors\":{\"status\":[\"This value is invalid\"]}}"