Cheia cu care faci cererea
curl --request GET \
--url https://staging.housera.ro/api/v1/account/key \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.housera.ro/api/v1/account/key",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://staging.housera.ro/api/v1/account/key', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://staging.housera.ro/api/v1/account/key"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"name": "<string>",
"abilities": [
"<unknown>"
],
"created_at": "<string>",
"expires_at": "<string>",
"connection_id": 123,
"client": {
"name": "<string>"
},
"account": {
"name": "<string>"
},
"firm": {
"name": "<string>",
"kind": "agency"
},
"role": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}Cheia API
Cheia cu care faci cererea
Ce știe Housera despre cheia din cerere: numele, drepturile, când a fost creată și când expiră, firma de care e legată și rolul contului în firmă. De rol depinde ce vede cheia (vezi Ce anunțuri vede fiecare cheie), așa că îl poți citi înainte de primul apel. Pentru o legătură cu un integrator primești și connection_id și numele aplicației. Merge cu orice cheie valabilă, fără un drept anume. Emailul și telefonul contului nu apar aici.
GET
/
account
/
key
Cheia cu care faci cererea
curl --request GET \
--url https://staging.housera.ro/api/v1/account/key \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.housera.ro/api/v1/account/key",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://staging.housera.ro/api/v1/account/key', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://staging.housera.ro/api/v1/account/key"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"name": "<string>",
"abilities": [
"<unknown>"
],
"created_at": "<string>",
"expires_at": "<string>",
"connection_id": 123,
"client": {
"name": "<string>"
},
"account": {
"name": "<string>"
},
"firm": {
"name": "<string>",
"kind": "agency"
},
"role": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}Parametri interogare
Limba răspunsului, ro sau en. Schimbă mesajele erorilor (title, detail), etichetele și, când anunțul are o traducere aprobată în limba cerută, titlul și descrierea lui. Codurile sunt aceleași în orice limbă. Are întâietate față de Accept-Language și de limba contului.
Opțiuni disponibile:
ro, en