List consumers
GET
/api/v1/customers Returns a paged list of the resource provider’s consumers, optionally filtered by resource provider.
Query parameters
energy_id integer Resource provider identifier. Optional — narrows the selection.
page integer Page number.
Response fields
| Attribute | Description |
|---|---|
id | Identifier (unique key) of the consumer in the system |
name | Consumer name |
subdivision_type_name | Consumer type |
inn | Tax identification number |
contact_number | Contact number |
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 |
Request
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/customers?energy_id=1&page=1"js
const res = await fetch('https://uztgs.uz/api/v1/customers?energy_id=1&page=1', {
headers: {
'access-token': '*********************',
'token-type': 'Bearer',
client: '**********************',
uid: 'user@local.net',
'Content-Type': 'application/json',
},
});
const data = await res.json();python
import requests
res = requests.get(
"https://uztgs.uz/api/v1/customers",
params={"energy_id": 1, "page": 1},
headers={
"access-token": "*********************",
"token-type": "Bearer",
"client": "**********************",
"uid": "user@local.net",
"Content-Type": "application/json",
},
)
data = res.json()go
req, _ := http.NewRequest("GET", "https://uztgs.uz/api/v1/customers?energy_id=1&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)php
$ch = curl_init("https://uztgs.uz/api/v1/customers?energy_id=1&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);Response
json
{"data":[
{
"id":13,
"name":"O'ZBEKISTON YENGIL ATLETIKA FEDERATSIYASI",
"subdivision_type_name":"Unit owner",
"inn":"0204875446",
"contact_number":"+998-91-381-18-88"
},
...,
{
"id":22,
"name":"\"TRANSYO`LQURILISH\" DUK",
"subdivision_type_name":"Unit owner",
"inn":"0300943875",
"contact_number":"+998-97-354-54-01"
}
],
"total_pages":8,
"current_page":1,
"next_page":2
} Ultimo aggiornamento il
Questa pagina è stata utile?
Grazie per il tuo feedback!
List resource providers
Precedente
Metering units
Successivo