Obter política de preço
curl --request GET \
--url https://api-bc.pgubright.com/sensors/{sensor_id}/price-policy \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-bc.pgubright.com/sensors/{sensor_id}/price-policy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-bc.pgubright.com/sensors/{sensor_id}/price-policy"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"min_sell_price_eur": "0.120000",
"max_buy_price_eur": "0.180000",
"enabled": true,
"id": "<string>",
"sensor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "Usuário sem permissão para operar neste sensor.",
"code": "SENSOR_FORBIDDEN"
}{
"message": "Usuário sem permissão para operar neste sensor.",
"code": "SENSOR_FORBIDDEN"
}Políticas
Obter política de preço
GET
/
sensors
/
{sensor_id}
/
price-policy
Obter política de preço
curl --request GET \
--url https://api-bc.pgubright.com/sensors/{sensor_id}/price-policy \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-bc.pgubright.com/sensors/{sensor_id}/price-policy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-bc.pgubright.com/sensors/{sensor_id}/price-policy"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"min_sell_price_eur": "0.120000",
"max_buy_price_eur": "0.180000",
"enabled": true,
"id": "<string>",
"sensor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "Usuário sem permissão para operar neste sensor.",
"code": "SENSOR_FORBIDDEN"
}{
"message": "Usuário sem permissão para operar neste sensor.",
"code": "SENSOR_FORBIDDEN"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
UUID do sensor no Meters Service.
