Dokumentation för API-funktioner
GET Service/MyPages/{customerId}/document Dokument för mina sidor. Request Information URI Parameters
NamnBeskrivningTypInformation
customerId Kundid för det kontor man vill ha dokument för string Krävs
Response Information Resource Description Dokument för mina sidor. Collection of MyPagesDocument
NamnBeskrivningTypInformation
Id Id på dokumentet string

Name Namn på dokumentet string

Extension Filtyp string

DataDateChanged Ändringsdatum date

StatusId Status id. Dokumentet skall bara vara synligt om bostaden har denna status string

EstateTypes Dokumnetet skall vara synligt för dessa bostadstyper Collection of EstateType

VisibleFor Dokumnetet skall vara synligt för dessa kontakter Collection of PdfSharedWith

Kodexempel

curl "https://connect.maklare.vitec.net/Service/MyPages/StringValue/document" -X GET -H "Authorization: basic {Base64 kodad användarnamn och lösenord}" 
            

$URL = "https://connect.maklare.vitec.net/Service/MyPages/StringValue/document"
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("Service/MyPages/StringValue/document")) {
    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/Service/MyPages/StringValue/document";

$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
}

$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",
    "name": "sample string 2",
    "extension": "sample string 3",
    "dataDateChanged": "2025-12-17T09:04:30.2760264+01:00",
    "statusId": "sample string 4",
    "estateTypes": [
      "House",
      "House"
    ],
    "visibleFor": [
      "Seller",
      "Seller"
    ]
  },
  {
    "id": "sample string 1",
    "name": "sample string 2",
    "extension": "sample string 3",
    "dataDateChanged": "2025-12-17T09:04:30.2760264+01:00",
    "statusId": "sample string 4",
    "estateTypes": [
      "House",
      "House"
    ],
    "visibleFor": [
      "Seller",
      "Seller"
    ]
  }
]
<ArrayOfMyPagesDocument xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Express.Connect.Api.Models.PartnerService">
  <MyPagesDocument>
    <DataDateChanged>2025-12-17T09:04:30.2760264+01:00</DataDateChanged>
    <EstateTypes xmlns:d3p1="http://schemas.datacontract.org/2004/07/Express.Api">
      <d3p1:EstateType>House</d3p1:EstateType>
      <d3p1:EstateType>House</d3p1:EstateType>
    </EstateTypes>
    <Extension>sample string 3</Extension>
    <Id>sample string 1</Id>
    <Name>sample string 2</Name>
    <StatusId>sample string 4</StatusId>
    <VisibleFor xmlns:d3p1="http://schemas.datacontract.org/2004/07/Express.Api">
      <d3p1:PdfSharedWith>Seller</d3p1:PdfSharedWith>
      <d3p1:PdfSharedWith>Seller</d3p1:PdfSharedWith>
    </VisibleFor>
  </MyPagesDocument>
  <MyPagesDocument>
    <DataDateChanged>2025-12-17T09:04:30.2760264+01:00</DataDateChanged>
    <EstateTypes xmlns:d3p1="http://schemas.datacontract.org/2004/07/Express.Api">
      <d3p1:EstateType>House</d3p1:EstateType>
      <d3p1:EstateType>House</d3p1:EstateType>
    </EstateTypes>
    <Extension>sample string 3</Extension>
    <Id>sample string 1</Id>
    <Name>sample string 2</Name>
    <StatusId>sample string 4</StatusId>
    <VisibleFor xmlns:d3p1="http://schemas.datacontract.org/2004/07/Express.Api">
      <d3p1:PdfSharedWith>Seller</d3p1:PdfSharedWith>
      <d3p1:PdfSharedWith>Seller</d3p1:PdfSharedWith>
    </VisibleFor>
  </MyPagesDocument>
</ArrayOfMyPagesDocument>