{ "updatePerson": { "firstName": "sample string 1", "lastName": "sample string 2", "socialSecurityNumber": "sample string 3", "isForeignSocialSecurityNumber": true, "telePhone": "sample string 4", "workPhone": "sample string 5", "cellPhone": "sample string 6", "approval": true, "approvalDate": "2024-11-21T11:23:40.6983026+01:00", "gdprApprovalDate": "2024-11-21T11:23:40.6983026+01:00", "obtainThrough": "Interest", "contactId": "sample string 7", "customerId": "sample string 8", "categoryIds": [ "sample string 1", "sample string 2" ], "address": { "streetAddress": "sample string 1", "zipCode": "sample string 2", "city": "sample string 3", "countryCode": "sample string 4" }, "email": { "emailAddress": "sample string 1", "emailAddress2": "sample string 2" }, "userId": "sample string 9", "otherPhone": "sample string 10", "wishAdvertising": true, "note": "sample string 11", "coordinate": { "longitud": 1.1, "latitud": 2.1 }, "task": { "predefinedTaskId": "sample string 1", "note": "sample string 2", "estateId": "sample string 3", "assignedTo": "sample string 4" }, "customField": { "name": "sample string 1", "value": "sample string 2" }, "leadScore": 1 }, "lookingForAccommodations": [ { "id": "sample string 1", "areaIds": [ "sample string 1", "sample string 2" ], "countys": [ "sample string 1", "sample string 2" ], "countryCode": "sample string 2", "polygon": [ { "longitud": 1.1, "latitud": 2.1 }, { "longitud": 1.1, "latitud": 2.1 } ], "foreignProperty": true, "house": true, "rowHouse": true, "housingCooperative": true, "cottage": true, "premises": true, "plot": true, "farm": true, "tenancy": true, "otherHousing": true, "livingSpace": { "min": 1.1, "max": 1.1 }, "numberOfRooms": { "min": 1.1, "max": 1.1 }, "price": { "min": 1.1, "max": 1.1 }, "plotArea": { "min": 1.1, "max": 1.1 }, "specialRequset": "sample string 13", "increasedRequirementIDs": [ "sample string 1", "sample string 2" ], "active": true }, { "id": "sample string 1", "areaIds": [ "sample string 1", "sample string 2" ], "countys": [ "sample string 1", "sample string 2" ], "countryCode": "sample string 2", "polygon": [ { "longitud": 1.1, "latitud": 2.1 }, { "longitud": 1.1, "latitud": 2.1 } ], "foreignProperty": true, "house": true, "rowHouse": true, "housingCooperative": true, "cottage": true, "premises": true, "plot": true, "farm": true, "tenancy": true, "otherHousing": true, "livingSpace": { "min": 1.1, "max": 1.1 }, "numberOfRooms": { "min": 1.1, "max": 1.1 }, "price": { "min": 1.1, "max": 1.1 }, "plotArea": { "min": 1.1, "max": 1.1 }, "specialRequset": "sample string 13", "increasedRequirementIDs": [ "sample string 1", "sample string 2" ], "active": true } ], "presentAccommodation": { "estateType": "House", "livingSpace": 1.1, "numberOfRooms": 1.1, "price": 1.1, "other": "sample string 1", "coordinate": { "longitud": 1.1, "latitud": 2.1 } }, "notifyUser": true, "watched": "Yes" }
Dokumentation för API-funktioner
POST Interest/SendInterestAndContactOnArea
Skickar in intresseanmälan för ett eller flera områden, tillsammans med kontaktuppgifter. Innan nya personer läggs in i mäklarsystemet, görs alltid en dubblettkontroll.
Request Information
Body Parameters
InterestAndContactOnArea
Response Information
Resource Description
Skickar in intresseanmälan för ett eller flera områden, tillsammans med kontaktuppgifter. Innan nya personer läggs in i mäklarsystemet, görs alltid en dubblettkontroll.
Kodexempel
Testformulär
Text input
Namn | Beskrivning | Typ | Information |
UpdatePerson | Person | UpdatePerson |
Uppgift om personen krävs |
LookingForAccommodations | Sökpreferenser | Collection of LookingForAccommodation |
Minst en sökpreferens måste anges |
PresentAccommodation | Nuvarande boende | PresentAccommodation | |
NotifyUser | Notifiera handläggaren på kontakten att ett intresse för ett område inkommit, kräver UserId för nya kontakter | boolean | |
Watched | Ska matchas/bevakas | MatchingWatched |
Request Formats
<InterestAndContactOnArea xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models.Interest"> <LookingForAccommodations> <LookingForAccommodation> <Active>true</Active> <AreaIds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>sample string 1</d4p1:string> <d4p1:string>sample string 2</d4p1:string> </AreaIds> <Cottage>true</Cottage> <CountryCode>sample string 2</CountryCode> <Countys xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>sample string 1</d4p1:string> <d4p1:string>sample string 2</d4p1:string> </Countys> <Farm>true</Farm> <ForeignProperty>true</ForeignProperty> <House>true</House> <HousingCooperative>true</HousingCooperative> <Id>sample string 1</Id> <IncreasedRequirementIDs xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>sample string 1</d4p1:string> <d4p1:string>sample string 2</d4p1:string> </IncreasedRequirementIDs> <LivingSpace> <Max>1.1</Max> <Min>1.1</Min> </LivingSpace> <NumberOfRooms> <Max>1.1</Max> <Min>1.1</Min> </NumberOfRooms> <OtherHousing>true</OtherHousing> <Plot>true</Plot> <PlotArea> <Max>1.1</Max> <Min>1.1</Min> </PlotArea> <Polygon xmlns:d4p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models"> <d4p1:Coordinate> <d4p1:Latitud>2.1</d4p1:Latitud> <d4p1:Longitud>1.1</d4p1:Longitud> </d4p1:Coordinate> <d4p1:Coordinate> <d4p1:Latitud>2.1</d4p1:Latitud> <d4p1:Longitud>1.1</d4p1:Longitud> </d4p1:Coordinate> </Polygon> <Premises>true</Premises> <Price> <Max>1.1</Max> <Min>1.1</Min> </Price> <RowHouse>true</RowHouse> <SpecialRequset>sample string 13</SpecialRequset> <Tenancy>true</Tenancy> </LookingForAccommodation> <LookingForAccommodation> <Active>true</Active> <AreaIds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>sample string 1</d4p1:string> <d4p1:string>sample string 2</d4p1:string> </AreaIds> <Cottage>true</Cottage> <CountryCode>sample string 2</CountryCode> <Countys xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>sample string 1</d4p1:string> <d4p1:string>sample string 2</d4p1:string> </Countys> <Farm>true</Farm> <ForeignProperty>true</ForeignProperty> <House>true</House> <HousingCooperative>true</HousingCooperative> <Id>sample string 1</Id> <IncreasedRequirementIDs xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>sample string 1</d4p1:string> <d4p1:string>sample string 2</d4p1:string> </IncreasedRequirementIDs> <LivingSpace> <Max>1.1</Max> <Min>1.1</Min> </LivingSpace> <NumberOfRooms> <Max>1.1</Max> <Min>1.1</Min> </NumberOfRooms> <OtherHousing>true</OtherHousing> <Plot>true</Plot> <PlotArea> <Max>1.1</Max> <Min>1.1</Min> </PlotArea> <Polygon xmlns:d4p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models"> <d4p1:Coordinate> <d4p1:Latitud>2.1</d4p1:Latitud> <d4p1:Longitud>1.1</d4p1:Longitud> </d4p1:Coordinate> <d4p1:Coordinate> <d4p1:Latitud>2.1</d4p1:Latitud> <d4p1:Longitud>1.1</d4p1:Longitud> </d4p1:Coordinate> </Polygon> <Premises>true</Premises> <Price> <Max>1.1</Max> <Min>1.1</Min> </Price> <RowHouse>true</RowHouse> <SpecialRequset>sample string 13</SpecialRequset> <Tenancy>true</Tenancy> </LookingForAccommodation> </LookingForAccommodations> <NotifyUser>true</NotifyUser> <PresentAccommodation> <Coordinate xmlns:d3p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models"> <d3p1:Latitud>2.1</d3p1:Latitud> <d3p1:Longitud>1.1</d3p1:Longitud> </Coordinate> <EstateType>House</EstateType> <LivingSpace>1.1</LivingSpace> <NumberOfRooms>1.1</NumberOfRooms> <Other>sample string 1</Other> <Price>1.1</Price> </PresentAccommodation> <UpdatePerson xmlns:d2p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models.Contact.Update"> <d2p1:Address xmlns:d3p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models"> <d3p1:City>sample string 3</d3p1:City> <d3p1:CountryCode>sample string 4</d3p1:CountryCode> <d3p1:StreetAddress>sample string 1</d3p1:StreetAddress> <d3p1:ZipCode>sample string 2</d3p1:ZipCode> </d2p1:Address> <d2p1:CategoryIds xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:string>sample string 1</d3p1:string> <d3p1:string>sample string 2</d3p1:string> </d2p1:CategoryIds> <d2p1:ContactId>sample string 7</d2p1:ContactId> <d2p1:Coordinate xmlns:d3p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models"> <d3p1:Latitud>2.1</d3p1:Latitud> <d3p1:Longitud>1.1</d3p1:Longitud> </d2p1:Coordinate> <d2p1:CustomField xmlns:d3p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models.CustomField"> <d3p1:Name>sample string 1</d3p1:Name> <d3p1:Value>sample string 2</d3p1:Value> </d2p1:CustomField> <d2p1:CustomerId>sample string 8</d2p1:CustomerId> <d2p1:Email xmlns:d3p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models"> <d3p1:EmailAddress>sample string 1</d3p1:EmailAddress> <d3p1:EmailAddress2>sample string 2</d3p1:EmailAddress2> </d2p1:Email> <d2p1:LeadScore>1</d2p1:LeadScore> <d2p1:Note>sample string 11</d2p1:Note> <d2p1:OtherPhone>sample string 10</d2p1:OtherPhone> <d2p1:Task xmlns:d3p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models.Task"> <d3p1:AssignedTo>sample string 4</d3p1:AssignedTo> <d3p1:EstateId>sample string 3</d3p1:EstateId> <d3p1:Note>sample string 2</d3p1:Note> <d3p1:PredefinedTaskId>sample string 1</d3p1:PredefinedTaskId> </d2p1:Task> <d2p1:UserId>sample string 9</d2p1:UserId> <d2p1:WishAdvertising>true</d2p1:WishAdvertising> <d2p1:Approval>true</d2p1:Approval> <d2p1:ApprovalDate>2024-11-21T11:23:40.6983026+01:00</d2p1:ApprovalDate> <d2p1:CellPhone>sample string 6</d2p1:CellPhone> <d2p1:FirstName>sample string 1</d2p1:FirstName> <d2p1:GDPRApprovalDate>2024-11-21T11:23:40.6983026+01:00</d2p1:GDPRApprovalDate> <d2p1:IsForeignSocialSecurityNumber>true</d2p1:IsForeignSocialSecurityNumber> <d2p1:LastName>sample string 2</d2p1:LastName> <d2p1:ObtainThrough>Interest</d2p1:ObtainThrough> <d2p1:SocialSecurityNumber>sample string 3</d2p1:SocialSecurityNumber> <d2p1:TelePhone>sample string 4</d2p1:TelePhone> <d2p1:WorkPhone>sample string 5</d2p1:WorkPhone> </UpdatePerson> <Watched>Yes</Watched> </InterestAndContactOnArea>
curl "https://connect.maklare.vitec.net/Interest/SendInterestAndContactOnArea" -X POST -H "Content-Type: application/json" -H "Authorization: basic {Base64 kodad användarnamn och lösenord}" -d {\"updatePerson\":{\"firstName\":\"StringValue\",\"lastName\":\"StringValue\",\"socialSecurityNumber\":\"StringValue\"},\"lookingForAccommodations\":[{\"id\":\"StringValue\",\"areaIds\":[\"StringValue\"],\"countys\":[\"StringValue\"]}],\"presentAccommodation\":{\"estateType\":0,\"livingSpace\":0.0,\"numberOfRooms\":0.0}}
$URL = "https://connect.maklare.vitec.net/Interest/SendInterestAndContactOnArea"
$data = "{`"updatePerson`":{`"firstName`":`"StringValue`",`"lastName`":`"StringValue`",`"socialSecurityNumber`":`"StringValue`"},`"lookingForAccommodations`":[{`"id`":`"StringValue`",`"areaIds`":[`"StringValue`"],`"countys`":[`"StringValue`"]}],`"presentAccommodation`":{`"estateType`":0,`"livingSpace`":0.0,`"numberOfRooms`":0.0}}"
Invoke-WebRequest -Uri $URL -Method POST -Headers @{"Content-Type" = "application/json"; "authorization" = "basic {Base64 kodad användarnamn och lösenord}"} -Body $data
// 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}")
// }
// }
var json = "{\"updatePerson\":{\"firstName\":\"StringValue\",\"lastName\":\"StringValue\",\"socialSecurityNumber\":\"StringValue\"},\"lookingForAccommodations\":[{\"id\":\"StringValue\",\"areaIds\":[\"StringValue\"],\"countys\":[\"StringValue\"]}],\"presentAccommodation\":{\"estateType\":0,\"livingSpace\":0.0,\"numberOfRooms\":0.0}}";
using (var response = await HttpClientInstance.PostAsync("Interest/SendInterestAndContactOnArea", new StringContent(json, Encoding.UTF8, "application/json"))) {
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
}
}
$URL = "https://connect.maklare.vitec.net/Interest/SendInterestAndContactOnArea";
$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);
$data = "{\"updatePerson\":{\"firstName\":\"StringValue\",\"lastName\":\"StringValue\",\"socialSecurityNumber\":\"StringValue\"},\"lookingForAccommodations\":[{\"id\":\"StringValue\",\"areaIds\":[\"StringValue\"],\"countys\":[\"StringValue\"]}],\"presentAccommodation\":{\"estateType\":0,\"livingSpace\":0.0,\"numberOfRooms\":0.0}}";
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($data)
));
$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
}
Resultat av begäran