Get branch info
GET
{{server}}/api/v1/smart/branchInfo?branch={{branch}}This endpoint retrieves information about a specific branch.
Request
branch(string, required): The identifier of the branch for which information is requested.
Response
The response will include an array of objects, with each object containing the following properties:
-
branch: Branch key. -
waiting: The number of people waiting at the branch.
Request
Authorization
| Header | Value |
|---|---|
Authorization | SmartToken {{smartToken}} |
Headers
| Key | Value |
|---|---|
Accept | application/json |
Query parameters
| Key | Value |
|---|---|
branch | {{branch}} |
Code snippets
- cURL
- JavaScript
- Python
curl -X GET '{{server}}/api/v1/smart/branchInfo?branch={{branch}}' \
-H 'Accept: application/json' \
-H 'Authorization: SmartToken {{smartToken}}'
const response = await fetch("{{server}}/api/v1/smart/branchInfo?branch={{branch}}", {
method: "GET",
headers: {
"Accept": "application/json",
"Authorization": "SmartToken {{smartToken}}"
},
});
const data = await response.json();
console.log(data);
import requests
url = "{{server}}/api/v1/smart/branchInfo?branch={{branch}}"
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/smart/branchInfo?branch={{branch}}Query parameters (1)
| Key | Value |
|---|---|
branch | {{branch}} |
Headers (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 | 187 |
Access-Control-Max-Age | 86400 |
Access-Control-Allow-Headers | Content-Type, Authorization, X-Requested-With |
Content-Type | application/json;charset=utf-8 |
Body
[
{
"branch": "00000000-0000-4000-0003-000000000001",
"waiting": 0
},
{
"branch": "1967b6e4-0e41-4cac-3a19-bf68e4b2a626",
"waiting": 0
},
{
"branch": "1967b6dd-f895-4fb3-92c3-f7d7acd37b1b",
"waiting": 0
}
]