Dokumentation för API-funktioner
POST Advertising/Estate/{customerId}/{estateId}/interest Skickar in en ny intresseanmälan för en kontakt till en bostad. Innan nya personer läggs in i mäklarsystemet, görs alltid en dubblettkontroll. Request Information URI Parameters
NamnBeskrivningTypInformation
customerId Kund-id string Krävs
estateId Id för aktuell bostad string Krävs
Body Parameters Uppgifter för intresseanmälan AdvertisingInterestApplication
NamnBeskrivningTypInformation
LeadSourceId Leadskälla - Det lead som skapas i samband med intresseanmälan kommer att kopplas till aktuell leadskälla. Om fältet inte anges, kommer leadet att kopplas till en förvald leadskälla som används för intresseanmälningar. string

AssignmentSourceId Intagskälla för den bostad som personen eventuellt lämnar. Skall bara anges om angiven leadskälla används för att koppla leadet till en bostad som kontaktpersonen eventuellt skall sälja. string

FirstName Förnamn string Förnamn krävs
Förnamn måste vara mellan 1 och 30 tecken
LastName Efternamn string Efternamn krävs
Efternamn måste vara mellan 1 och 30 tecken
SocialSecurityNumber Personnummer string Personnummer måste vara mellan 0 och 15 tecken
Address Adress ContactAddress

Telephone Telefonnummer PersonTelephoneNumbers Epostadress, telefonnummer (bostad eller arbete) eller mobilnummer måste anges.
Email Email Email Epostadress, telefonnummer (bostad eller arbete) eller mobilnummer måste anges.
GDPRApprovalDate GDPR informerad den date

PresentAccommodation Uppgifter om nuvarande boende ContactPresentAccommodation

ContactMessage Meddelande från kontaktpersonen string

Status Status Status

Request Formats

{
  "leadSourceId": "sample string 1",
  "assignmentSourceId": "sample string 2",
  "firstName": "sample string 3",
  "lastName": "sample string 4",
  "socialSecurityNumber": "sample string 5",
  "address": {
    "streetAddress": "sample string 1",
    "zipCode": "sample string 2",
    "city": "sample string 3"
  },
  "telephone": {
    "home": "sample string 1",
    "work": "sample string 2",
    "cell": "sample string 3",
    "other": "sample string 4"
  },
  "email": {
    "emailAddress": "sample string 1",
    "emailAddress2": "sample string 2"
  },
  "gdprApprovalDate": "2024-03-28T11:49:44.3160616+01:00",
  "presentAccommodation": {
    "estateType": "House",
    "livingSpace": 1.1,
    "numberOfRooms": 1.1,
    "price": 1.1,
    "other": "sample string 1",
    "coordinate": {
      "longitud": 1.1,
      "latitud": 2.1
    }
  },
  "contactMessage": "sample string 6",
  "status": "Interested"
}
<AdvertisingInterestApplication xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Express.Connect.Api.Models.Advertising">
  <Address xmlns="http://schemas.datacontract.org/2004/07/Express.Connect.Api.Models.InterestApplication">
    <City>sample string 3</City>
    <StreetAddress>sample string 1</StreetAddress>
    <ZipCode>sample string 2</ZipCode>
  </Address>
  <ContactMessage xmlns="http://schemas.datacontract.org/2004/07/Express.Connect.Api.Models.InterestApplication">sample string 6</ContactMessage>
  <Email xmlns:d2p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models" xmlns="http://schemas.datacontract.org/2004/07/Express.Connect.Api.Models.InterestApplication">
    <d2p1:EmailAddress>sample string 1</d2p1:EmailAddress>
    <d2p1:EmailAddress2>sample string 2</d2p1:EmailAddress2>
  </Email>
  <FirstName xmlns="http://schemas.datacontract.org/2004/07/Express.Connect.Api.Models.InterestApplication">sample string 3</FirstName>
  <GDPRApprovalDate xmlns="http://schemas.datacontract.org/2004/07/Express.Connect.Api.Models.InterestApplication">2024-03-28T11:49:44.3160616+01:00</GDPRApprovalDate>
  <LastName xmlns="http://schemas.datacontract.org/2004/07/Express.Connect.Api.Models.InterestApplication">sample string 4</LastName>
  <PresentAccommodation xmlns="http://schemas.datacontract.org/2004/07/Express.Connect.Api.Models.InterestApplication">
    <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>
  <SocialSecurityNumber xmlns="http://schemas.datacontract.org/2004/07/Express.Connect.Api.Models.InterestApplication">sample string 5</SocialSecurityNumber>
  <Status xmlns="http://schemas.datacontract.org/2004/07/Express.Connect.Api.Models.InterestApplication">Interested</Status>
  <Telephone xmlns:d2p1="http://schemas.datacontract.org/2004/07/Express.Connect.Api.Models" xmlns="http://schemas.datacontract.org/2004/07/Express.Connect.Api.Models.InterestApplication">
    <d2p1:Other>sample string 4</d2p1:Other>
    <d2p1:Cell>sample string 3</d2p1:Cell>
    <d2p1:Home>sample string 1</d2p1:Home>
    <d2p1:Work>sample string 2</d2p1:Work>
  </Telephone>
  <AssignmentSourceId>sample string 2</AssignmentSourceId>
  <LeadSourceId>sample string 1</LeadSourceId>
</AdvertisingInterestApplication>
Response Information Resource Description Skickar in en ny intresseanmälan för en kontakt till en bostad. Innan nya personer läggs in i mäklarsystemet, görs alltid en dubblettkontroll.

Kodexempel

curl "https://connect.maklare.vitec.net/Advertising/Estate/StringValue/StringValue/interest" -X POST -H "Content-Type: application/json" -H "Authorization: basic {Base64 kodad användarnamn och lösenord}" -d {\"leadSourceId\":\"StringValue\",\"assignmentSourceId\":\"StringValue\",\"firstName\":\"StringValue\"}
            

$URL = "https://connect.maklare.vitec.net/Advertising/Estate/StringValue/StringValue/interest"
$data = "{`"leadSourceId`":`"StringValue`",`"assignmentSourceId`":`"StringValue`",`"firstName`":`"StringValue`"}"
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 = "{\"leadSourceId\":\"StringValue\",\"assignmentSourceId\":\"StringValue\",\"firstName\":\"StringValue\"}";
using (var response = await HttpClientInstance.PostAsync("Advertising/Estate/StringValue/StringValue/interest", 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/Advertising/Estate/StringValue/StringValue/interest";

$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 = "{\"leadSourceId\":\"StringValue\",\"assignmentSourceId\":\"StringValue\",\"firstName\":\"StringValue\"}";
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
}

Testformulär Text input