Lista anunțurilor tale
curl --request GET \
--url https://staging.housera.ro/api/v1/account/listings \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.housera.ro/api/v1/account/listings",
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/listings', 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/listings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"code": "<string>",
"url": "<string>",
"type": "<string>",
"subtype": "<string>",
"transaction": "<string>",
"title": "<string>",
"description": "<string>",
"content_locale": "<string>",
"price": 123,
"currency": "EUR",
"price_period": "total",
"price_declared": {
"amount": 123,
"currency": "<string>"
},
"reserved": true,
"negotiable": true,
"location": {
"country": "<string>",
"county": "<string>",
"city": "<string>",
"area": "<string>",
"lat": 123,
"lng": 123,
"precision": "<string>"
},
"facts": {},
"features": [
"<string>"
],
"images": [
"<string>"
],
"published_at": "<string>",
"updated_at": "<string>",
"attribution": {
"lister": "<string>",
"source": "<string>",
"source_label": "<string>",
"source_external_id": "<string>"
}
}
],
"links": {
"first": "<string>",
"last": "<string>",
"prev": "<string>",
"next": "<string>"
},
"meta": {
"path": "<string>",
"per_page": 1,
"next_cursor": "<string>",
"prev_cursor": "<string>"
}
}Anunțurile tale
Lista anunțurilor tale
Anunțurile contului (și ale agenției, dacă ești owner sau admin al ei), în orice stare, ordonate după ultima modificare, cu paginare prin cursor. Cu fields primești doar câmpurile cerute, de exemplu code,external_ref,etag,updated_at pentru reconciliere.
GET
/
account
/
listings
Lista anunțurilor tale
curl --request GET \
--url https://staging.housera.ro/api/v1/account/listings \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.housera.ro/api/v1/account/listings",
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/listings', 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/listings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"code": "<string>",
"url": "<string>",
"type": "<string>",
"subtype": "<string>",
"transaction": "<string>",
"title": "<string>",
"description": "<string>",
"content_locale": "<string>",
"price": 123,
"currency": "EUR",
"price_period": "total",
"price_declared": {
"amount": 123,
"currency": "<string>"
},
"reserved": true,
"negotiable": true,
"location": {
"country": "<string>",
"county": "<string>",
"city": "<string>",
"area": "<string>",
"lat": 123,
"lng": 123,
"precision": "<string>"
},
"facts": {},
"features": [
"<string>"
],
"images": [
"<string>"
],
"published_at": "<string>",
"updated_at": "<string>",
"attribution": {
"lister": "<string>",
"source": "<string>",
"source_label": "<string>",
"source_external_id": "<string>"
}
}
],
"links": {
"first": "<string>",
"last": "<string>",
"prev": "<string>",
"next": "<string>"
},
"meta": {
"path": "<string>",
"per_page": 1,
"next_cursor": "<string>",
"prev_cursor": "<string>"
}
}Autorizări
Authorization: Bearer
Parametri interogare
Doar anunțurile în această stare (pending, active, paused, sold, rejected…). Fără el: toate.
Opțiuni disponibile:
draft, pending, active, rejected, paused, hidden, unconfirmed, sold Câte rezultate pe pagină (implicit 50, maximum 100).
Interval necesar:
1 <= x <= 100