curl --request POST \
--url https://api.opencals.com/storefront/appointments/{appointmentId}/feedback \
--header 'Content-Type: application/json' \
--data '
{
"answers": [
{
"questionId": "123e4567-e89b-12d3-a456-426614174000",
"question": "How would you rate the quality of service provided?",
"answer": "The service was excellent, very professional and timely.",
"fileIds": [
"<string>"
]
}
]
}
'import requests
url = "https://api.opencals.com/storefront/appointments/{appointmentId}/feedback"
payload = { "answers": [
{
"questionId": "123e4567-e89b-12d3-a456-426614174000",
"question": "How would you rate the quality of service provided?",
"answer": "The service was excellent, very professional and timely.",
"fileIds": ["<string>"]
}
] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
answers: [
{
questionId: '123e4567-e89b-12d3-a456-426614174000',
question: 'How would you rate the quality of service provided?',
answer: 'The service was excellent, very professional and timely.',
fileIds: ['<string>']
}
]
})
};
fetch('https://api.opencals.com/storefront/appointments/{appointmentId}/feedback', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.opencals.com/storefront/appointments/{appointmentId}/feedback",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'answers' => [
[
'questionId' => '123e4567-e89b-12d3-a456-426614174000',
'question' => 'How would you rate the quality of service provided?',
'answer' => 'The service was excellent, very professional and timely.',
'fileIds' => [
'<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.opencals.com/storefront/appointments/{appointmentId}/feedback"
payload := strings.NewReader("{\n \"answers\": [\n {\n \"questionId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"question\": \"How would you rate the quality of service provided?\",\n \"answer\": \"The service was excellent, very professional and timely.\",\n \"fileIds\": [\n \"<string>\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.opencals.com/storefront/appointments/{appointmentId}/feedback")
.header("Content-Type", "application/json")
.body("{\n \"answers\": [\n {\n \"questionId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"question\": \"How would you rate the quality of service provided?\",\n \"answer\": \"The service was excellent, very professional and timely.\",\n \"fileIds\": [\n \"<string>\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opencals.com/storefront/appointments/{appointmentId}/feedback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"answers\": [\n {\n \"questionId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"question\": \"How would you rate the quality of service provided?\",\n \"answer\": \"The service was excellent, very professional and timely.\",\n \"fileIds\": [\n \"<string>\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"appointmentId": "123e4567-e89b-12d3-a456-426614174001",
"questionId": "123e4567-e89b-12d3-a456-426614174002",
"question": "How would you rate the quality of service provided?",
"answer": "The service was excellent, very professional and timely.",
"createdAt": "2023-06-15T14:30:00Z",
"updatedAt": "2023-06-15T15:45:00Z"
}
]Submit appointment feedback
Allows customers to submit feedback for a completed appointment
curl --request POST \
--url https://api.opencals.com/storefront/appointments/{appointmentId}/feedback \
--header 'Content-Type: application/json' \
--data '
{
"answers": [
{
"questionId": "123e4567-e89b-12d3-a456-426614174000",
"question": "How would you rate the quality of service provided?",
"answer": "The service was excellent, very professional and timely.",
"fileIds": [
"<string>"
]
}
]
}
'import requests
url = "https://api.opencals.com/storefront/appointments/{appointmentId}/feedback"
payload = { "answers": [
{
"questionId": "123e4567-e89b-12d3-a456-426614174000",
"question": "How would you rate the quality of service provided?",
"answer": "The service was excellent, very professional and timely.",
"fileIds": ["<string>"]
}
] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
answers: [
{
questionId: '123e4567-e89b-12d3-a456-426614174000',
question: 'How would you rate the quality of service provided?',
answer: 'The service was excellent, very professional and timely.',
fileIds: ['<string>']
}
]
})
};
fetch('https://api.opencals.com/storefront/appointments/{appointmentId}/feedback', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.opencals.com/storefront/appointments/{appointmentId}/feedback",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'answers' => [
[
'questionId' => '123e4567-e89b-12d3-a456-426614174000',
'question' => 'How would you rate the quality of service provided?',
'answer' => 'The service was excellent, very professional and timely.',
'fileIds' => [
'<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.opencals.com/storefront/appointments/{appointmentId}/feedback"
payload := strings.NewReader("{\n \"answers\": [\n {\n \"questionId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"question\": \"How would you rate the quality of service provided?\",\n \"answer\": \"The service was excellent, very professional and timely.\",\n \"fileIds\": [\n \"<string>\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.opencals.com/storefront/appointments/{appointmentId}/feedback")
.header("Content-Type", "application/json")
.body("{\n \"answers\": [\n {\n \"questionId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"question\": \"How would you rate the quality of service provided?\",\n \"answer\": \"The service was excellent, very professional and timely.\",\n \"fileIds\": [\n \"<string>\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opencals.com/storefront/appointments/{appointmentId}/feedback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"answers\": [\n {\n \"questionId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"question\": \"How would you rate the quality of service provided?\",\n \"answer\": \"The service was excellent, very professional and timely.\",\n \"fileIds\": [\n \"<string>\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"appointmentId": "123e4567-e89b-12d3-a456-426614174001",
"questionId": "123e4567-e89b-12d3-a456-426614174002",
"question": "How would you rate the quality of service provided?",
"answer": "The service was excellent, very professional and timely.",
"createdAt": "2023-06-15T14:30:00Z",
"updatedAt": "2023-06-15T15:45:00Z"
}
]Path Parameters
Appointment unique identifier
"123e4567-e89b-12d3-a456-426614174000"
Body
Feedback answers from the customer
Array of feedback questions and answers for the appointment
1Show child attributes
Show child attributes
Response
The feedback has been successfully submitted
Unique identifier of the feedback question answer
"123e4567-e89b-12d3-a456-426614174000"
ID of the appointment this feedback relates to
"123e4567-e89b-12d3-a456-426614174001"
ID of the feedback question (set to null if question is deleted)
"123e4567-e89b-12d3-a456-426614174002"
The feedback question text presented to the customer
"How would you rate the quality of service provided?"
Customer's answer to the feedback question
"The service was excellent, very professional and timely."
Date and time when this feedback was recorded
"2023-06-15T14:30:00Z"
Date and time when this feedback was last updated
"2023-06-15T15:45:00Z"
Was this page helpful?