curl "https://connect.maklare.vitec.net/CRM/Lead/StringValue/Estate/StringValue" -X GET -H "Authorization: basic {Base64 kodad användarnamn och lösenord}"
Dokumentation för API-funktioner
GET CRM/Lead/{customerId}/Estate/{id}
Hämtar övergripande uppgifter om en bostad/fastighet kopplad till ett lead
Request Information
URI Parameters
Response Information
Resource Description
Hämtar övergripande uppgifter om en bostad/fastighet kopplad till ett lead
LeadEstate
Kodexempel
Testformulär
Text input
Response Formats
| Namn | Beskrivning | Typ | Information |
| customerId | Kundid | string |
Krävs |
| id | Id för bostaden/fastigheten | string |
Krävs |
| Namn | Beskrivning | Typ | Information |
| EstateType | Typ av bostad/fastighet | EstateType | |
| Address | Adress för bostaden/fastigheten | Address | |
| AssignmentType | Uppdragstyp | AssignmentType | |
| AssignmentDate | Uppdragsdatum | date | |
| PrimaryAgentId | Id för handläggaren som fått uppdraget. | string | |
| CustomerId | Kund-id för kontoret som fått uppdraget. | string | |
| Status | Anger status för försäljningsuppdrag. För värderingsuppdrag och skrivuppdrag är fältet tomt. | EstateSaleStatus | |
| AgreementSignedAt | Kontraktsdatum | date | |
| PossessionAt | Datum och tid för tillträde. | date | |
| Price | Prisuppgifter för bostaden/fastigheten. | Price | |
| Commission | Provision exklusive moms efter tillägg och avdrag för affären. | MoneyValue |
$URL = "https://connect.maklare.vitec.net/CRM/Lead/StringValue/Estate/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("CRM/Lead/StringValue/Estate/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 estateType = result.estateType.Value ;
// TODO: Gör något med resultatet
}
$URL = "https://connect.maklare.vitec.net/CRM/Lead/StringValue/Estate/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["estateType"];
// TODO: Gör något med resultatet
Resultat av begäran
{
"estateType": "House",
"address": {
"streetAddress": "sample string 1",
"zipCode": "sample string 2",
"city": "sample string 3",
"countryCode": "sample string 4"
},
"assignmentType": "Sale",
"assignmentDate": "2025-10-31T15:56:49.3805103+01:00",
"primaryAgentId": "sample string 1",
"customerId": "sample string 2",
"status": "AssignmentAttempt",
"agreementSignedAt": "2025-10-31T15:56:49.3805103+01:00",
"possessionAt": "2025-10-31T15:56:49.3805103+01:00",
"price": {
"startingPrice": {
"value": 1.1,
"currency": "sample string 2"
},
"finalPrice": {
"value": 1.1,
"currency": "sample string 2"
}
},
"commission": {
"value": 1.1,
"currency": "sample string 2"
}
}
<LeadEstate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Express.Connect.Api.Models.Lead.Estate">
<Address xmlns:d2p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models">
<d2p1:City>sample string 3</d2p1:City>
<d2p1:CountryCode>sample string 4</d2p1:CountryCode>
<d2p1:StreetAddress>sample string 1</d2p1:StreetAddress>
<d2p1:ZipCode>sample string 2</d2p1:ZipCode>
</Address>
<AgreementSignedAt>2025-10-31T15:56:49.3805103+01:00</AgreementSignedAt>
<AssignmentDate>2025-10-31T15:56:49.3805103+01:00</AssignmentDate>
<AssignmentType>Sale</AssignmentType>
<Commission xmlns:d2p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models">
<d2p1:Currency>sample string 2</d2p1:Currency>
<d2p1:Value>1.1</d2p1:Value>
</Commission>
<CustomerId>sample string 2</CustomerId>
<EstateType>House</EstateType>
<PossessionAt>2025-10-31T15:56:49.3805103+01:00</PossessionAt>
<Price>
<FinalPrice xmlns:d3p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models">
<d3p1:Currency>sample string 2</d3p1:Currency>
<d3p1:Value>1.1</d3p1:Value>
</FinalPrice>
<StartingPrice xmlns:d3p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models">
<d3p1:Currency>sample string 2</d3p1:Currency>
<d3p1:Value>1.1</d3p1:Value>
</StartingPrice>
</Price>
<PrimaryAgentId>sample string 1</PrimaryAgentId>
<Status>AssignmentAttempt</Status>
</LeadEstate>