Clinic ↔ service pricing group assignments
Update service pricing groups assigned to a clinic
This endpoint is available to Group API Keys only.
Replaces the full list of service pricing groups assigned to a clinic. This determines which pricing tier the clinic uses for each service pricing category.
PUT
/
ext
/
v2
/
clinics
/
{clinic_id}
/
assigned-service-pricing-groups
/
Update service pricing groups assigned to a clinic
curl --request PUT \
--url https://connect.vetcove.com/ext/v2/clinics/{clinic_id}/assigned-service-pricing-groups/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assigned_service_pricing_group_ids": [
123
]
}
'import requests
url = "https://connect.vetcove.com/ext/v2/clinics/{clinic_id}/assigned-service-pricing-groups/"
payload = { "assigned_service_pricing_group_ids": [123] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({assigned_service_pricing_group_ids: [123]})
};
fetch('https://connect.vetcove.com/ext/v2/clinics/{clinic_id}/assigned-service-pricing-groups/', 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://connect.vetcove.com/ext/v2/clinics/{clinic_id}/assigned-service-pricing-groups/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'assigned_service_pricing_group_ids' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://connect.vetcove.com/ext/v2/clinics/{clinic_id}/assigned-service-pricing-groups/"
payload := strings.NewReader("{\n \"assigned_service_pricing_group_ids\": [\n 123\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://connect.vetcove.com/ext/v2/clinics/{clinic_id}/assigned-service-pricing-groups/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"assigned_service_pricing_group_ids\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://connect.vetcove.com/ext/v2/clinics/{clinic_id}/assigned-service-pricing-groups/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"assigned_service_pricing_group_ids\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"assigned_service_pricing_group_ids": [
123
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the clinic to update mappings for
Body
application/json
The IDs of the service pricing groups assigned to this clinic.
Response
200 - application/json
OK
The IDs of the service pricing groups assigned to this clinic.
Was this page helpful?
⌘I
Update service pricing groups assigned to a clinic
curl --request PUT \
--url https://connect.vetcove.com/ext/v2/clinics/{clinic_id}/assigned-service-pricing-groups/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assigned_service_pricing_group_ids": [
123
]
}
'import requests
url = "https://connect.vetcove.com/ext/v2/clinics/{clinic_id}/assigned-service-pricing-groups/"
payload = { "assigned_service_pricing_group_ids": [123] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({assigned_service_pricing_group_ids: [123]})
};
fetch('https://connect.vetcove.com/ext/v2/clinics/{clinic_id}/assigned-service-pricing-groups/', 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://connect.vetcove.com/ext/v2/clinics/{clinic_id}/assigned-service-pricing-groups/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'assigned_service_pricing_group_ids' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://connect.vetcove.com/ext/v2/clinics/{clinic_id}/assigned-service-pricing-groups/"
payload := strings.NewReader("{\n \"assigned_service_pricing_group_ids\": [\n 123\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://connect.vetcove.com/ext/v2/clinics/{clinic_id}/assigned-service-pricing-groups/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"assigned_service_pricing_group_ids\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://connect.vetcove.com/ext/v2/clinics/{clinic_id}/assigned-service-pricing-groups/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"assigned_service_pricing_group_ids\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"assigned_service_pricing_group_ids": [
123
]
}