---
title: Lista mernih mesta
method: GET
weight: 1
section: 'Basics'
---

import {
  EndpointHeader,
  ParamField,
  ParamFields,
  CodeGroup,
  RequestExample,
  ResponseExample,
} from '@/components/api';

<EndpointHeader method="GET" path="/api/v1/stations" />

Vraća listu mernih mesta snabdevača po stranicama, uz opciono filtriranje po potrošaču.

<ParamFields title="Parametri upita">
  <ParamField name="customer_id" type="integer">
    Identifikator potrošača. Opciono – sužava skup rezultata na jednog potrošača.
  </ParamField>
  <ParamField name="page" type="integer">
    Broj stranice.
  </ParamField>
</ParamFields>

## Polja odgovora

| Atribut                   | Opis                                                                                 |
| ------------------------- | ------------------------------------------------------------------------------------ |
| `id`                      | Identifikator (jedinstveni ključ) mernog mesta u sistemu                             |
| `name`                    | Naziv mernog mesta                                                                   |
| `equipment_type_id`       | Identifikator tipa konfiguracije mernog uređaja (ključ tipa konfiguracije korektora) |
| `equipment_type_varname`  | Jedinstveni tekstualni identifikator tipa konfiguracije mernog uređaja               |
| `equipment_brand_name`    | Model mernog uređaja                                                                 |
| `phone`                   | Telefon                                                                              |
| `equipment_id`            | Identifikator (jedinstveni ključ) mernog uređaja u sistemu                           |
| `telemetry_id`            | Identifikator (jedinstveni ključ) telemetrijskog modula u sistemu                    |
| `customer_id`             | Identifikator potrošača                                                              |
| `equipment_serial_number` | Serijski broj mernog uređaja                                                         |
| `status_name_value`       | Status mernog mesta                                                                  |
| `volume_value`            | Vrednost zapremine potrošnje                                                         |
| `volume_unit`             | Jedinica zapremine potrošnje                                                         |
| `pressure_value`          | Vrednost pritiska                                                                    |
| `pressure_unit`           | Jedinica pritiska                                                                    |
| `temperature_value`       | Vrednost temperature                                                                 |
| `temperature_unit`        | Jedinica temperature                                                                 |
| `last_seance_event_time`  | Vreme poslednje komunikacione sesije                                                 |
| `uid`                     | Kod za razmenu                                                                       |
| `data`                    | Niz vraćenih podataka                                                                |
| `total_pages`             | Ukupan broj stranica u vraćenom skupu                                                |
| `current_page`            | Trenutna stranica                                                                    |
| `next_page`               | Sledeća stranica dostupna za preuzimanje; `null` ako je trenutna stranica poslednja  |

<RequestExample>
  <CodeGroup labels={["curl", "Node", "Python", "Go", "PHP"]}>
    <Fragment slot="panel-0">

```bash
curl -i \
  --header "access-token: *********************" \
  --header "token-type: Bearer" \
  --header "client: **********************" \
  --header "uid: api-user@example.com" \
  --header "Content-Type: application/json" \
  --request GET \
  "https://api.vadsro.eu/api/v1/stations?customer_id=83&page=1"
```

    </Fragment>
    <Fragment slot="panel-1">

```js
const res = await fetch('https://api.vadsro.eu/api/v1/stations?customer_id=83&page=1', {
  headers: {
    'access-token': '*********************',
    'token-type': 'Bearer',
    client: '**********************',
    uid: 'api-user@example.com',
    'Content-Type': 'application/json',
  },
});
const data = await res.json();
```

    </Fragment>
    <Fragment slot="panel-2">

```python
import requests

res = requests.get(
    "https://api.vadsro.eu/api/v1/stations",
    params={"customer_id": 83, "page": 1},
    headers={
        "access-token": "*********************",
        "token-type": "Bearer",
        "client": "**********************",
        "uid": "api-user@example.com",
        "Content-Type": "application/json",
    },
)
data = res.json()
```

    </Fragment>
    <Fragment slot="panel-3">

```go
req, _ := http.NewRequest("GET", "https://api.vadsro.eu/api/v1/stations?customer_id=83&page=1", nil)
req.Header.Set("access-token", "*********************")
req.Header.Set("token-type", "Bearer")
req.Header.Set("client", "**********************")
req.Header.Set("uid", "api-user@example.com")
req.Header.Set("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)
```

    </Fragment>
    <Fragment slot="panel-4">

```php
$ch = curl_init("https://api.vadsro.eu/api/v1/stations?customer_id=83&page=1");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "access-token: *********************",
    "token-type: Bearer",
    "client: **********************",
    "uid: api-user@example.com",
    "Content-Type: application/json",
]);
$data = json_decode(curl_exec($ch), true);
```

    </Fragment>

  </CodeGroup>
</RequestExample>

<ResponseExample>

```json
{
  "data": [
    {
      "id": 91,
      "name": "Example Beverages Production GmbH",
      "equipment_type_id": 7,
      "equipment_type_varname": "Type-J",
      "equipment_brand_name": "Omega ETK R GSM",
      "phone": "+49-30-5550101",
      "equipment_id": 134,
      "telemetry_id": 85,
      "customer_id": 83,
      "equipment_serial_number": "0000014",
      "status_name_value": null,
      "volume_value": "5.34",
      "volume_unit": "m³",
      "pressure_value": null,
      "pressure_unit": "",
      "temperature_value": "20.12",
      "temperature_unit": "°C",
      "last_seance_event_time": "1627801534",
      "uid": "1234567891"
    }
  ],
  "total_pages": 9,
  "current_page": 1,
  "next_page": 2
}
```

</ResponseExample>
