Dokumentation för API-funktioner
POST Meeting/GetMeetings Hämtar bokade möten. Request Information Body Parameters Urval MeetingCreateria
NamnBeskrivningTypInformation
CustomerId Kund id string Kund id måste anges
DateFrom Datum från date Datum från måste anges
DateTo Datum till date Datum till måste anges
Search Typ av mötesfiltrering. True resulterar i att filtrering blir på bokningsdatum. False resulterar i en filtrering på mötesdatum. boolean

Type Typ av möten. Om inget anges så hämtas endast intagsmöten (Assignment). MeetingTypeCriteria

Request Formats

{
  "customerId": "sample string 1",
  "dateFrom": "2024-12-03T17:48:12.2680259+01:00",
  "dateTo": "2024-12-03T17:48:12.2680259+01:00",
  "search": true,
  "type": "Assignment"
}
<MeetingCreateria xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models.Meeting">
  <CustomerId>sample string 1</CustomerId>
  <DateFrom>2024-12-03T17:48:12.2680259+01:00</DateFrom>
  <DateTo>2024-12-03T17:48:12.2680259+01:00</DateTo>
  <Search>true</Search>
  <Type>Assignment</Type>
</MeetingCreateria>
Response Information Resource Description Hämtar bokade möten. Collection of Meeting
NamnBeskrivningTypInformation
Id Mötesid string

ContactId Kontakt id string

ContactName Kontaktnamn string

Address Adress Address

TelePhone Telefonnummer bostad string

CellPhone Telefonnummer string

MeetingDate Mötesdatum date

Type Mötestyp MeetingType

BrokerId Mäklarens id string

BrokerName Mäklarens namn string

BookedById Bokarens id string

BookedByName Bokarens name string

BookedDate Bokningsdatum date

SignatureDate Uppdragsdatum date

EstateStatus Objektets status Status

CommissionWithoutTaxes Provision ex.moms decimal number

CommissionSource Intagskälla (Kontakttyp) Ska inte användas längre. Använd AssignmentSource istället string

AssignmentSource Intagskälla (Kontakttyp) AssignmentSource

CancelledBy Avbokad av (Mäklare, Kund) string

AgreementDate Försäljning = Kontraktsdatum, Värdering = Värderingsdag, Skrivning = Datum för skrivuppdrag date

CommissionType Uppdragstyp CommissionType

AccessDate Tillträdesdatum date

EstateId Objektets id string

Kodexempel

curl "https://connect.maklare.vitec.net/Meeting/GetMeetings" -X POST -H "Content-Type: application/json" -H "Authorization: basic {Base64 kodad användarnamn och lösenord}" -d {\"customerId\":\"StringValue\",\"dateFrom\":\"2015-01-01T12:00:00\",\"dateTo\":\"2015-01-01T12:00:00\"}
            

$URL = "https://connect.maklare.vitec.net/Meeting/GetMeetings"
$data = "{`"customerId`":`"StringValue`",`"dateFrom`":`"2015-01-01T12:00:00`",`"dateTo`":`"2015-01-01T12:00:00`"}"
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 = "{\"customerId\":\"StringValue\",\"dateFrom\":\"2015-01-01T12:00:00\",\"dateTo\":\"2015-01-01T12:00:00\"}";
using (var response = await HttpClientInstance.PostAsync("Meeting/GetMeetings", 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
    }
    
    var json = await response.Content.ReadAsStringAsync();
    // JsonConvert finns i biblioteket Newtonsoft.Json
    var result = JsonConvert.DeserializeObject<dynamic>(json);
    
    var firstInArray = result[0];
    var id = firstInArray.id.Value;
    // TODO: Gör något med resultatet
}

$URL = "https://connect.maklare.vitec.net/Meeting/GetMeetings";

$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 = "{\"customerId\":\"StringValue\",\"dateFrom\":\"2015-01-01T12:00:00\",\"dateTo\":\"2015-01-01T12:00:00\"}";
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
}

$first = $result[0];
$field_on_result = $first["id"];
// TODO: Gör något med resultatet
Testformulär Text input
Response Formats
[
  {
    "id": "sample string 1",
    "contactId": "sample string 2",
    "contactName": "sample string 3",
    "address": {
      "streetAddress": "sample string 1",
      "zipCode": "sample string 2",
      "city": "sample string 3",
      "countryCode": "sample string 4"
    },
    "telePhone": "sample string 4",
    "cellPhone": "sample string 5",
    "meetingDate": "2024-12-03T17:48:12.2680259+01:00",
    "type": "Assignment",
    "brokerId": "sample string 7",
    "brokerName": "sample string 8",
    "bookedById": "sample string 9",
    "bookedByName": "sample string 10",
    "bookedDate": "2024-12-03T17:48:12.2680259+01:00",
    "signatureDate": "2024-12-03T17:48:12.2680259+01:00",
    "estateStatus": {
      "id": "sample string 1",
      "name": "sample string 2"
    },
    "commissionWithoutTaxes": 12.0,
    "commissionSource": "sample string 13",
    "assignmentSource": {
      "id": 1,
      "name": "sample string 2"
    },
    "cancelledBy": "sample string 14",
    "agreementDate": "2024-12-03T17:48:12.2680259+01:00",
    "commissionType": "Sale",
    "accessDate": "2024-12-03T17:48:12.2680259+01:00",
    "estateId": "sample string 15"
  },
  {
    "id": "sample string 1",
    "contactId": "sample string 2",
    "contactName": "sample string 3",
    "address": {
      "streetAddress": "sample string 1",
      "zipCode": "sample string 2",
      "city": "sample string 3",
      "countryCode": "sample string 4"
    },
    "telePhone": "sample string 4",
    "cellPhone": "sample string 5",
    "meetingDate": "2024-12-03T17:48:12.2680259+01:00",
    "type": "Assignment",
    "brokerId": "sample string 7",
    "brokerName": "sample string 8",
    "bookedById": "sample string 9",
    "bookedByName": "sample string 10",
    "bookedDate": "2024-12-03T17:48:12.2680259+01:00",
    "signatureDate": "2024-12-03T17:48:12.2680259+01:00",
    "estateStatus": {
      "id": "sample string 1",
      "name": "sample string 2"
    },
    "commissionWithoutTaxes": 12.0,
    "commissionSource": "sample string 13",
    "assignmentSource": {
      "id": 1,
      "name": "sample string 2"
    },
    "cancelledBy": "sample string 14",
    "agreementDate": "2024-12-03T17:48:12.2680259+01:00",
    "commissionType": "Sale",
    "accessDate": "2024-12-03T17:48:12.2680259+01:00",
    "estateId": "sample string 15"
  }
]
<ArrayOfMeeting xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models.Meeting">
  <Meeting>
    <AccessDate>2024-12-03T17:48:12.2680259+01:00</AccessDate>
    <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>
    </Address>
    <AgreementDate>2024-12-03T17:48:12.2680259+01:00</AgreementDate>
    <AssignmentSource>
      <Id>1</Id>
      <Name>sample string 2</Name>
    </AssignmentSource>
    <BookedById>sample string 9</BookedById>
    <BookedByName>sample string 10</BookedByName>
    <BookedDate>2024-12-03T17:48:12.2680259+01:00</BookedDate>
    <BrokerId>sample string 7</BrokerId>
    <BrokerName>sample string 8</BrokerName>
    <CancelledBy>sample string 14</CancelledBy>
    <CellPhone>sample string 5</CellPhone>
    <CommissionSource>sample string 13</CommissionSource>
    <CommissionType>Sale</CommissionType>
    <CommissionWithoutTaxes>12</CommissionWithoutTaxes>
    <ContactId>sample string 2</ContactId>
    <ContactName>sample string 3</ContactName>
    <EstateId>sample string 15</EstateId>
    <EstateStatus xmlns:d3p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models.Estate.Common">
      <d3p1:Id>sample string 1</d3p1:Id>
      <d3p1:Name>sample string 2</d3p1:Name>
    </EstateStatus>
    <Id>sample string 1</Id>
    <MeetingDate>2024-12-03T17:48:12.2680259+01:00</MeetingDate>
    <SignatureDate>2024-12-03T17:48:12.2680259+01:00</SignatureDate>
    <TelePhone>sample string 4</TelePhone>
    <Type>Assignment</Type>
  </Meeting>
  <Meeting>
    <AccessDate>2024-12-03T17:48:12.2680259+01:00</AccessDate>
    <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>
    </Address>
    <AgreementDate>2024-12-03T17:48:12.2680259+01:00</AgreementDate>
    <AssignmentSource>
      <Id>1</Id>
      <Name>sample string 2</Name>
    </AssignmentSource>
    <BookedById>sample string 9</BookedById>
    <BookedByName>sample string 10</BookedByName>
    <BookedDate>2024-12-03T17:48:12.2680259+01:00</BookedDate>
    <BrokerId>sample string 7</BrokerId>
    <BrokerName>sample string 8</BrokerName>
    <CancelledBy>sample string 14</CancelledBy>
    <CellPhone>sample string 5</CellPhone>
    <CommissionSource>sample string 13</CommissionSource>
    <CommissionType>Sale</CommissionType>
    <CommissionWithoutTaxes>12</CommissionWithoutTaxes>
    <ContactId>sample string 2</ContactId>
    <ContactName>sample string 3</ContactName>
    <EstateId>sample string 15</EstateId>
    <EstateStatus xmlns:d3p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models.Estate.Common">
      <d3p1:Id>sample string 1</d3p1:Id>
      <d3p1:Name>sample string 2</d3p1:Name>
    </EstateStatus>
    <Id>sample string 1</Id>
    <MeetingDate>2024-12-03T17:48:12.2680259+01:00</MeetingDate>
    <SignatureDate>2024-12-03T17:48:12.2680259+01:00</SignatureDate>
    <TelePhone>sample string 4</TelePhone>
    <Type>Assignment</Type>
  </Meeting>
</ArrayOfMeeting>