List branches
branches:readPaginated; ordered by name. Scope branches:read.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
page | query | integer (int32)Default: 1 | Page number, starting at 1. |
pageSize | query | integer (int32)Default: 25 | Items per page, 1 to 100 (larger values are clamped to 100). |
search | query | string | Optional text matched against name, code and city. |
activeOnly | query | boolean | When true, only active branches. |
Request example
curl -G "https://apiv1.groperator.com/api/public/v1/branches" \
-H "X-API-Key: lmc_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "X-API-Secret: YOUR_API_SECRET" \
--data-urlencode 'activeOnly=true'const params = new URLSearchParams({
"activeOnly": "true"
});
const response = await fetch(`https://apiv1.groperator.com/api/public/v1/branches?${params}`, {
method: "GET",
headers: {
"X-API-Key": "lmc_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"X-API-Secret": "YOUR_API_SECRET"
},
});
const data = await response.json();
console.log(response.status, data);<?php
$url = 'https://apiv1.groperator.com/api/public/v1/branches?' . http_build_query([
'activeOnly' => 'true',
]);
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-API-Key: lmc_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'X-API-Secret: YOUR_API_SECRET',
],
]);
$result = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
var_dump($status, json_decode($result, true));import requests
response = requests.request(
"GET",
"https://apiv1.groperator.com/api/public/v1/branches",
headers={
"X-API-Key": "lmc_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"X-API-Secret": "YOUR_API_SECRET",
},
params={
"activeOnly": "true",
},
timeout=30,
)
print(response.status_code, response.json())Samples use an API key; replace the placeholders. To use a bearer token instead, send Authorization: Bearer <accessToken>.
Responses
200A page of branches.
Responses · Field
| Field | Type | Description |
|---|---|---|
itemsrequired | array<PublicBranchDto> | Items of the requested page. |
iditems[].id required | string (uuid) | Branch id. |
nameitems[].name required | string | Branch name. |
codeitems[].code required | string | Branch code. |
cityitems[].city required | string | City name as entered on the branch. |
phoneitems[].phone | stringnullable | Branch phone, when set. |
latitudeitems[].latitude | number (double)nullable | Latitude, when set. |
longitudeitems[].longitude | number (double)nullable | Longitude, when set. |
isActiveitems[].isActive required | boolean | Whether the branch is active. |
pagerequired | integer (int32) | Current page number, starting at 1. |
pageSizerequired | integer (int32) | Requested page size (1 to 100, default 25). |
totalCountrequired | integer (int32) | Total number of items across all pages. |
totalPagesrequired | integer (int32) | Total number of pages. |
{
"items": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"code": "string",
"city": "string",
"isActive": false
}
],
"page": 1,
"pageSize": 1,
"totalCount": 1,
"totalPages": 1
}| Status | Description |
|---|---|
400 | The request is invalid (code |
401 | Authentication is missing or invalid (code |
403 | Missing scope or public API disabled. |
429 | Too many requests (code |
Error responses share one body, described in the error reference. Error reference