Get branch groups
GET
{{server}}/api/v1/appointment/branchGroupsThis request returns the branch groups. You can use it to organize the branches into groups in the application.
Request
Authorization
| Header | Value |
|---|---|
Authorization | SmartToken {{smartToken}} |
Headers
| Key | Value |
|---|---|
Accept | application/json |
Code snippets
- cURL
- JavaScript
- Python
curl -X GET '{{server}}/api/v1/appointment/branchGroups' \
-H 'Accept: application/json' \
-H 'Authorization: SmartToken {{smartToken}}'
const response = await fetch("{{server}}/api/v1/appointment/branchGroups", {
method: "GET",
headers: {
"Accept": "application/json",
"Authorization": "SmartToken {{smartToken}}"
},
});
const data = await response.json();
console.log(data);
import requests
url = "{{server}}/api/v1/appointment/branchGroups"
headers = {
"Accept": "application/json",
"Authorization": "SmartToken {{smartToken}}"
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())
Example
Example request
GET
{{server}}/api/v1/appointment/branchGroupsHeaders (1)
| Key | Value |
|---|---|
Accept | application/json |
Example response 200 Ok
Response headers (9)
| Key | Value |
|---|---|
Access-Control-Expose-Headers | * |
Cache-Control | no-store, no-cache, must-revalidate |
Access-Control-Allow-Origin | * |
Access-Control-Allow-Methods | POST, PUT, GET, OPTIONS, DELETE |
Access-Control-Allow-Credentials | true |
Content-Length | 288 |
Access-Control-Max-Age | 86400 |
Access-Control-Allow-Headers | Content-Type, Authorization, X-Requested-With |
Content-Type | application/json;charset=utf-8 |
Body
[
{
"branches": [
"1967b6dd-f895-4fb3-92c3-f7d7acd37b1b",
"1967b6e4-0e41-4cac-3a19-bf68e4b2a626"
],
"name": "North branches",
"key": "1967b6eb-9392-49d6-6327-2e2a979561f6"
},
{
"branches": [
"00000000-0000-4000-0003-000000000001"
],
"name": "Central branches",
"key": "1967b6ed-f49a-486e-6569-1df67873ae6f"
}
]