فهرست مصرفکنندگان
GET
/api/v1/customers فهرست صفحهبندیشدهٔ مصرفکنندگان تأمینکنندهٔ منابع را بازمیگرداند؛ در صورت نیاز میتوان آن را بر اساس تأمینکنندهٔ منابع فیلتر کرد.
پارامترهای پرسوجو
energy_id integer شناسهٔ تأمینکنندهٔ منابع. اختیاری — نتایج را محدود میکند.
page integer شمارهٔ صفحه.
فیلدهای پاسخ
| ویژگی | توضیح |
|---|---|
id | شناسه (کلید یکتا) مصرفکننده در سامانه |
name | نام مصرفکننده |
subdivision_type_name | نوع مصرفکننده |
inn | شمارهٔ شناسایی مالیاتی مصرفکننده (شناسهٔ VAT) |
contact_number | شمارهٔ تماس |
data | آرایهای از دادههای بازگرداندهشده |
total_pages | تعداد کل صفحهها در مجموعهٔ بازگرداندهشده |
current_page | صفحهٔ جاری |
next_page | صفحهٔ بعدی که برای بارگیری در دسترس است؛ اگر صفحهٔ جاری آخرین صفحه باشد، null |
درخواست
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/customers?energy_id=1&page=1"js
const res = await fetch('https://api.vadsro.eu/api/v1/customers?energy_id=1&page=1', {
headers: {
'access-token': '*********************',
'token-type': 'Bearer',
client: '**********************',
uid: 'api-user@example.com',
'Content-Type': 'application/json',
},
});
const data = await res.json();python
import requests
res = requests.get(
"https://api.vadsro.eu/api/v1/customers",
params={"energy_id": 1, "page": 1},
headers={
"access-token": "*********************",
"token-type": "Bearer",
"client": "**********************",
"uid": "api-user@example.com",
"Content-Type": "application/json",
},
)
data = res.json()go
req, _ := http.NewRequest("GET", "https://api.vadsro.eu/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", "api-user@example.com")
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)php
$ch = curl_init("https://api.vadsro.eu/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: api-user@example.com",
"Content-Type: application/json",
]);
$data = json_decode(curl_exec($ch), true);پاسخ
json
{"data":[
{
"id":13,
"name":"Example National Sports Federation",
"subdivision_type_name":"Unit owner",
"inn":"1000000042",
"contact_number":"+49-30-5550100"
},
...,
{
"id":22,
"name":"Example Rail Infrastructure SE",
"subdivision_type_name":"Unit owner",
"inn":"1000000043",
"contact_number":"+49-30-5550102"
}
],
"total_pages":8,
"current_page":1,
"next_page":2
} آخرین بهروزرسانی در
آیا این صفحه مفید بود؟
از بازخورد شما سپاسگزاریم!
فهرست تأمینکنندگان منابع
قبلی
گرههای اندازهگیری
بعدی