curl "https://connect.maklare.vitec.net/PublicAdvertising/Estate/StringValue?IncludeHouses=False&IncludeHousingCooperatives=False&IncludeCottages=False&IncludePlots=False&IncludeFarms=False&IncludeCommercialProperties=False&IncludeCondominiums=False&IncludeForeignProperties=False&IncludePremises=False&IncludeProjects=False&IncludeForSale=False&IncludeFutureSale=False&IncludeSoonForSale=False&PrimaryAgentId=StringValue&EstateId=StringValue" -X GET -H "Authorization: basic {Base64 kodad användarnamn och lösenord}"
Dokumentation för API-funktioner
GET PublicAdvertising/Estate/{customerId}
Hämta en lista över bostäder som kunden vill ha på marknadsplatsen. Använd för att synka en kund.
Request Information
URI Parameters
Response Information
Resource Description
Hämta en lista över bostäder som kunden vill ha på marknadsplatsen. Använd för att synka en kund.
PublicAdvertisingEstateList
Kodexempel
Testformulär
Text input
Response Formats
Namn | Beskrivning | Typ | Information |
customerId | Kund-id | string |
Krävs |
IncludeHouses | Inkludera villor | boolean | |
IncludeHousingCooperatives | Inkludera lägenheter (bostadsrätter) | boolean | |
IncludeCottages | Inkludera fritidshus | boolean | |
IncludePlots | Inkludera tomter | boolean | |
IncludeFarms | Inkludera lantbruk | boolean | |
IncludeCommercialProperties | Inkludera kommersiella objekt | boolean | |
IncludeCondominiums | Inkludera lägenheter (äganderätter) | boolean | |
IncludeForeignProperties | Inkludera utlandsobjekt | boolean | |
IncludePremises | Inkludera lokaler | boolean | |
IncludeProjects | Inkludera projekt | boolean | |
IncludeForSale | Inkludera bostäder med status till salu | boolean | |
IncludeFutureSale | Inkludera bostäder med status kommande | boolean | |
IncludeSoonForSale | Inkludera bostäder med status snart till salu | boolean | |
PrimaryAgentId | Urval på huvudhandläggare | string | |
EstateId | Urval på bostadsid | string |
Namn | Beskrivning | Typ | Information |
Houses | Lista på villor | Collection of PublicAdvertisingEstateInList | |
Cottages | Lista på fritidsvillor | Collection of PublicAdvertisingEstateInList | |
HousingCooperatives | Lista på bostadsrätter | Collection of PublicAdvertisingEstateInList | |
Plots | Lista på tomter | Collection of PublicAdvertisingEstateInList | |
Farms | Lista på gårdar | Collection of PublicAdvertisingEstateInList | |
CommercialProperties | Lista på kommersiella objekt | Collection of PublicAdvertisingEstateInList | |
Condominiums | Lista på ägarlägenheter | Collection of PublicAdvertisingEstateInList | |
ForeignProperties | Lista på utlandsbostäder | Collection of PublicAdvertisingEstateInList | |
Premises | Lista på lokaler | Collection of PublicAdvertisingEstateInList | |
Projects | Lista på projekt | Collection of PublicAdvertisingEstateInList |
$URL = "https://connect.maklare.vitec.net/PublicAdvertising/Estate/StringValue?IncludeHouses=False&IncludeHousingCooperatives=False&IncludeCottages=False&IncludePlots=False&IncludeFarms=False&IncludeCommercialProperties=False&IncludeCondominiums=False&IncludeForeignProperties=False&IncludePremises=False&IncludeProjects=False&IncludeForSale=False&IncludeFutureSale=False&IncludeSoonForSale=False&PrimaryAgentId=StringValue&EstateId=StringValue"
Invoke-WebRequest -Uri $URL -Method GET -Headers @{"authorization" = "basic {Base64 kodad användarnamn och lösenord}"}
// HttpClientInstance ska deklareras som en singleton
// public static readonly HttpClient HttpClientInstance = new HttpClient {
// BaseAddress = new Uri("https://connect.maklare.vitec.net"),
// DefaultRequestHeaders = {
// Authorization = new AuthenticationHeaderValue("Basic", "{Base64 kodad användarnamn och lösenord}")
// }
// }
using (var response = await HttpClientInstance.GetAsync("PublicAdvertising/Estate/StringValue?IncludeHouses=False&IncludeHousingCooperatives=False&IncludeCottages=False&IncludePlots=False&IncludeFarms=False&IncludeCommercialProperties=False&IncludeCondominiums=False&IncludeForeignProperties=False&IncludePremises=False&IncludeProjects=False&IncludeForSale=False&IncludeFutureSale=False&IncludeSoonForSale=False&PrimaryAgentId=StringValue&EstateId=StringValue")) {
if (response.StatusCode == HttpStatusCode.Unauthorized) {
// Authorization headern är inte korrekt
}
if (response.StatusCode == HttpStatusCode.Forbidden) {
// Begärt data som det saknas åtkomst till
}
if (response.StatusCode == HttpStatusCode.InternalServerError) {
// Oväntat fel, kontakta Vitec
}
if (response.StatusCode == HttpStatusCode.BadRequest) {
var json = await response.Content.ReadAsStringAsync();
var result = JsonConvert.DeserializeObject<dynamic>(json);
// Hantera valideringsfel, presenteras i resultatet
}
var json = await response.Content.ReadAsStringAsync();
// JsonConvert finns i biblioteket Newtonsoft.Json
var result = JsonConvert.DeserializeObject<dynamic>(json);
var houses = result.houses.Value ;
// TODO: Gör något med resultatet
}
$URL = "https://connect.maklare.vitec.net/PublicAdvertising/Estate/StringValue?IncludeHouses=False&IncludeHousingCooperatives=False&IncludeCottages=False&IncludePlots=False&IncludeFarms=False&IncludeCommercialProperties=False&IncludeCondominiums=False&IncludeForeignProperties=False&IncludePremises=False&IncludeProjects=False&IncludeForSale=False&IncludeFutureSale=False&IncludeSoonForSale=False&PrimaryAgentId=StringValue&EstateId=StringValue";
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERNAME, "{Användarnamn}");
curl_setopt($ch, CURLOPT_PASSWORD, "{Lösenord}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $URL);
$result = curl_exec($ch);
if (curl_errno($ch)) {
die(curl_getinfo($ch));
}
$info = curl_getinfo($ch);
curl_close($ch);
$http_code = $info["http_code"];
if ($http_code == 401) {
// Användarnamnet eller lösenordet är felaktigt
}
if ($http_code == 403) {
// Begärt data som det saknas åtkomst till
}
if ($http_code == 500) {
// Oväntat fel, kontakta Vitec
}
if ($http_code == 400) {
$json = json_decode($result, true);
// Hantera valideringsfel, presenteras i $json
}
$field_on_result = $result["houses"];
// TODO: Gör något med resultatet
Resultat av begäran
{ "houses": [ { "id": "sample string 1", "changedAt": "2025-01-22T17:59:45.9532415+01:00" }, { "id": "sample string 1", "changedAt": "2025-01-22T17:59:45.9532415+01:00" } ], "cottages": [ { "id": "sample string 1", "changedAt": "2025-01-22T17:59:45.9532415+01:00" }, { "id": "sample string 1", "changedAt": "2025-01-22T17:59:45.9532415+01:00" } ], "housingCooperatives": [ { "id": "sample string 1", "changedAt": "2025-01-22T17:59:45.9532415+01:00" }, { "id": "sample string 1", "changedAt": "2025-01-22T17:59:45.9532415+01:00" } ], "plots": [ { "id": "sample string 1", "changedAt": "2025-01-22T17:59:45.9532415+01:00" }, { "id": "sample string 1", "changedAt": "2025-01-22T17:59:45.9532415+01:00" } ], "farms": [ { "id": "sample string 1", "changedAt": "2025-01-22T17:59:45.9532415+01:00" }, { "id": "sample string 1", "changedAt": "2025-01-22T17:59:45.9532415+01:00" } ], "commercialProperties": [ { "id": "sample string 1", "changedAt": "2025-01-22T17:59:45.9532415+01:00" }, { "id": "sample string 1", "changedAt": "2025-01-22T17:59:45.9532415+01:00" } ], "condominiums": [ { "id": "sample string 1", "changedAt": "2025-01-22T17:59:45.9532415+01:00" }, { "id": "sample string 1", "changedAt": "2025-01-22T17:59:45.9532415+01:00" } ], "foreignProperties": [ { "id": "sample string 1", "changedAt": "2025-01-22T17:59:45.9532415+01:00" }, { "id": "sample string 1", "changedAt": "2025-01-22T17:59:45.9532415+01:00" } ], "premises": [ { "id": "sample string 1", "changedAt": "2025-01-22T17:59:45.9532415+01:00" }, { "id": "sample string 1", "changedAt": "2025-01-22T17:59:45.9532415+01:00" } ], "projects": [ { "id": "sample string 1", "changedAt": "2025-01-22T17:59:45.9532415+01:00" }, { "id": "sample string 1", "changedAt": "2025-01-22T17:59:45.9532415+01:00" } ] }
<PublicAdvertisingEstateList xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models.PublicAdvertisement"> <CommercialProperties> <PublicAdvertisingEstateInList> <ChangedAt>2025-01-22T17:59:45.9532415+01:00</ChangedAt> <Id>sample string 1</Id> </PublicAdvertisingEstateInList> <PublicAdvertisingEstateInList> <ChangedAt>2025-01-22T17:59:45.9532415+01:00</ChangedAt> <Id>sample string 1</Id> </PublicAdvertisingEstateInList> </CommercialProperties> <Condominiums> <PublicAdvertisingEstateInList> <ChangedAt>2025-01-22T17:59:45.9532415+01:00</ChangedAt> <Id>sample string 1</Id> </PublicAdvertisingEstateInList> <PublicAdvertisingEstateInList> <ChangedAt>2025-01-22T17:59:45.9532415+01:00</ChangedAt> <Id>sample string 1</Id> </PublicAdvertisingEstateInList> </Condominiums> <Cottages> <PublicAdvertisingEstateInList> <ChangedAt>2025-01-22T17:59:45.9532415+01:00</ChangedAt> <Id>sample string 1</Id> </PublicAdvertisingEstateInList> <PublicAdvertisingEstateInList> <ChangedAt>2025-01-22T17:59:45.9532415+01:00</ChangedAt> <Id>sample string 1</Id> </PublicAdvertisingEstateInList> </Cottages> <Farms> <PublicAdvertisingEstateInList> <ChangedAt>2025-01-22T17:59:45.9532415+01:00</ChangedAt> <Id>sample string 1</Id> </PublicAdvertisingEstateInList> <PublicAdvertisingEstateInList> <ChangedAt>2025-01-22T17:59:45.9532415+01:00</ChangedAt> <Id>sample string 1</Id> </PublicAdvertisingEstateInList> </Farms> <ForeignProperties> <PublicAdvertisingEstateInList> <ChangedAt>2025-01-22T17:59:45.9532415+01:00</ChangedAt> <Id>sample string 1</Id> </PublicAdvertisingEstateInList> <PublicAdvertisingEstateInList> <ChangedAt>2025-01-22T17:59:45.9532415+01:00</ChangedAt> <Id>sample string 1</Id> </PublicAdvertisingEstateInList> </ForeignProperties> <Houses> <PublicAdvertisingEstateInList> <ChangedAt>2025-01-22T17:59:45.9532415+01:00</ChangedAt> <Id>sample string 1</Id> </PublicAdvertisingEstateInList> <PublicAdvertisingEstateInList> <ChangedAt>2025-01-22T17:59:45.9532415+01:00</ChangedAt> <Id>sample string 1</Id> </PublicAdvertisingEstateInList> </Houses> <HousingCooperatives> <PublicAdvertisingEstateInList> <ChangedAt>2025-01-22T17:59:45.9532415+01:00</ChangedAt> <Id>sample string 1</Id> </PublicAdvertisingEstateInList> <PublicAdvertisingEstateInList> <ChangedAt>2025-01-22T17:59:45.9532415+01:00</ChangedAt> <Id>sample string 1</Id> </PublicAdvertisingEstateInList> </HousingCooperatives> <Plots> <PublicAdvertisingEstateInList> <ChangedAt>2025-01-22T17:59:45.9532415+01:00</ChangedAt> <Id>sample string 1</Id> </PublicAdvertisingEstateInList> <PublicAdvertisingEstateInList> <ChangedAt>2025-01-22T17:59:45.9532415+01:00</ChangedAt> <Id>sample string 1</Id> </PublicAdvertisingEstateInList> </Plots> <Premises> <PublicAdvertisingEstateInList> <ChangedAt>2025-01-22T17:59:45.9532415+01:00</ChangedAt> <Id>sample string 1</Id> </PublicAdvertisingEstateInList> <PublicAdvertisingEstateInList> <ChangedAt>2025-01-22T17:59:45.9532415+01:00</ChangedAt> <Id>sample string 1</Id> </PublicAdvertisingEstateInList> </Premises> <Projects> <PublicAdvertisingEstateInList> <ChangedAt>2025-01-22T17:59:45.9532415+01:00</ChangedAt> <Id>sample string 1</Id> </PublicAdvertisingEstateInList> <PublicAdvertisingEstateInList> <ChangedAt>2025-01-22T17:59:45.9532415+01:00</ChangedAt> <Id>sample string 1</Id> </PublicAdvertisingEstateInList> </Projects> </PublicAdvertisingEstateList>