---
title: List metering units
method: GET
weight: 1
section: 'Basics'
---

import {
  EndpointHeader,
  ParamField,
  ParamFields,
  CodeGroup,
  RequestExample,
  ResponseExample,
} from '@/components/api';

<EndpointHeader method="GET" path="/api/v1/stations" />

Returns a paged list of the resource provider's metering units, optionally filtered by consumer.

<ParamFields title="Query parameters">
  <ParamField name="customer_id" type="integer">
    Consumer identifier. Optional — narrows the selection to one consumer.
  </ParamField>
  <ParamField name="page" type="integer">
    Page number.
  </ParamField>
</ParamFields>

## Response fields

| Attribute                 | Description                                                                             |
| ------------------------- | --------------------------------------------------------------------------------------- |
| `id`                      | Identifier (unique key) of the metering unit in the system                              |
| `name`                    | Name of the metering unit                                                               |
| `equipment_type_id`       | Identifier of the metering device configuration type (corrector configuration type key) |
| `equipment_type_varname`  | String unique identifier of the metering device configuration type                      |
| `equipment_brand_name`    | Model of the metering device                                                            |
| `phone`                   | Phone                                                                                   |
| `equipment_id`            | Identifier (unique key) of the metering device in the system                            |
| `telemetry_id`            | Identifier (unique key) of the telemetry unit in the system                             |
| `customer_id`             | Consumer identifier                                                                     |
| `equipment_serial_number` | Serial number of the metering device                                                    |
| `status_name_value`       | Metering unit status                                                                    |
| `volume_value`            | Consumption volume value                                                                |
| `volume_unit`             | Consumption volume unit                                                                 |
| `pressure_value`          | Pressure value                                                                          |
| `pressure_unit`           | Pressure unit                                                                           |
| `temperature_value`       | Temperature value                                                                       |
| `temperature_unit`        | Temperature unit                                                                        |
| `last_seance_event_time`  | Time of the last communication session                                                  |
| `uid`                     | Exchange code                                                                           |
| `data`                    | Array of returned data                                                                  |
| `total_pages`             | Total number of pages in the returned set                                               |
| `current_page`            | Current page                                                                            |
| `next_page`               | Next page available for downloading, `null` if the current page is the last one         |

<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: user@local.net" \
  --header "Content-Type: application/json" \
  --request GET \
  "https://uztgs.uz/api/v1/stations?customer_id=83&page=1"
```

    </Fragment>
    <Fragment slot="panel-1">

```js
const res = await fetch('https://uztgs.uz/api/v1/stations?customer_id=83&page=1', {
  headers: {
    'access-token': '*********************',
    'token-type': 'Bearer',
    client: '**********************',
    uid: 'user@local.net',
    'Content-Type': 'application/json',
  },
});
const data = await res.json();
```

    </Fragment>
    <Fragment slot="panel-2">

```python
import requests

res = requests.get(
    "https://uztgs.uz/api/v1/stations",
    params={"customer_id": 83, "page": 1},
    headers={
        "access-token": "*********************",
        "token-type": "Bearer",
        "client": "**********************",
        "uid": "user@local.net",
        "Content-Type": "application/json",
    },
)
data = res.json()
```

    </Fragment>
    <Fragment slot="panel-3">

```go
req, _ := http.NewRequest("GET", "https://uztgs.uz/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", "user@local.net")
req.Header.Set("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)
```

    </Fragment>
    <Fragment slot="panel-4">

```php
$ch = curl_init("https://uztgs.uz/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: user@local.net",
    "Content-Type: application/json",
]);
$data = json_decode(curl_exec($ch), true);
```

    </Fragment>

  </CodeGroup>
</RequestExample>

<ResponseExample>

```json
{
  "data": [
    {
      "id": 91,
      "name": "LLC \"Coca-Cola Ichimligi Uzbekistan\" LTD",
      "equipment_type_id": 7,
      "equipment_type_varname": "Type-J",
      "equipment_brand_name": "Omega ETK R GSM",
      "phone": "+998-97-725-12-28",
      "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>
