curl "https://connect.maklare.vitec.net/BusinessIntelligence/LiveData/CommissionReport?customerId=StringValue&dateFrom=2015-01-01T12:00:00&dateTo=2015-01-01T12:00:00" -X GET -H "Authorization: basic {Base64 kodad användarnamn och lösenord}"
Dokumentation för API-funktioner
GET BusinessIntelligence/LiveData/CommissionReport
Hämtar provisioner för användare, datumintervallet får inte överstiga två månader
Endast provisioner för de senaste 3 månaderna beräknas, viss fördröjning kan förekomma.
Request Information
URI Parameters
Response Information
Resource Description
Hämtar provisioner för användare, datumintervallet får inte överstiga två månader
Endast provisioner för de senaste 3 månaderna beräknas, viss fördröjning kan förekomma.
LiveDataCommissionReport
Kodexempel
Testformulär
Text input
Response Formats
Namn | Beskrivning | Typ | Information |
customerId | Kund-id | string |
Krävs |
dateFrom | Från | date |
Krävs |
dateTo | Till | date |
Krävs |
Namn | Beskrivning | Typ | Information |
Reports | Collection of LiveDataCommissionUserOfficeReport |
$URL = "https://connect.maklare.vitec.net/BusinessIntelligence/LiveData/CommissionReport?customerId=StringValue&dateFrom=2015-01-01T12:00:00&dateTo=2015-01-01T12:00:00"
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("BusinessIntelligence/LiveData/CommissionReport?customerId=StringValue&dateFrom=2015-01-01T12:00:00&dateTo=2015-01-01T12:00:00")) {
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 reports = result.reports.Value ;
// TODO: Gör något med resultatet
}
$URL = "https://connect.maklare.vitec.net/BusinessIntelligence/LiveData/CommissionReport?customerId=StringValue&dateFrom=2015-01-01T12:00:00&dateTo=2015-01-01T12:00:00";
$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["reports"];
// TODO: Gör något med resultatet
Resultat av begäran
{ "reports": [ { "customerId": "sample string 1", "userId": "sample string 2", "days": [ { "day": "2025-04-04", "countryCode": "sample string 2", "currencyCode": "sample string 3", "soldEstateParts": 1.1, "writingParts": 1.1, "valuationParts": 1.1, "commercialParts": 1.1, "newConstructionParts": 1.1, "commission": 1.1, "commissionIncVat": 1.1, "valuationCommission": 1.1, "valuationCommissionIncVat": 1.1, "writingCommission": 1.1, "writingCommissionIncVat": 1.1, "commercialCommission": 1.1, "commercialCommissionIncVat": 1.1, "newConstructionCommission": 1.1, "newConstructionCommissionIncVat": 1.1 }, { "day": "2025-04-04", "countryCode": "sample string 2", "currencyCode": "sample string 3", "soldEstateParts": 1.1, "writingParts": 1.1, "valuationParts": 1.1, "commercialParts": 1.1, "newConstructionParts": 1.1, "commission": 1.1, "commissionIncVat": 1.1, "valuationCommission": 1.1, "valuationCommissionIncVat": 1.1, "writingCommission": 1.1, "writingCommissionIncVat": 1.1, "commercialCommission": 1.1, "commercialCommissionIncVat": 1.1, "newConstructionCommission": 1.1, "newConstructionCommissionIncVat": 1.1 } ] }, { "customerId": "sample string 1", "userId": "sample string 2", "days": [ { "day": "2025-04-04", "countryCode": "sample string 2", "currencyCode": "sample string 3", "soldEstateParts": 1.1, "writingParts": 1.1, "valuationParts": 1.1, "commercialParts": 1.1, "newConstructionParts": 1.1, "commission": 1.1, "commissionIncVat": 1.1, "valuationCommission": 1.1, "valuationCommissionIncVat": 1.1, "writingCommission": 1.1, "writingCommissionIncVat": 1.1, "commercialCommission": 1.1, "commercialCommissionIncVat": 1.1, "newConstructionCommission": 1.1, "newConstructionCommissionIncVat": 1.1 }, { "day": "2025-04-04", "countryCode": "sample string 2", "currencyCode": "sample string 3", "soldEstateParts": 1.1, "writingParts": 1.1, "valuationParts": 1.1, "commercialParts": 1.1, "newConstructionParts": 1.1, "commission": 1.1, "commissionIncVat": 1.1, "valuationCommission": 1.1, "valuationCommissionIncVat": 1.1, "writingCommission": 1.1, "writingCommissionIncVat": 1.1, "commercialCommission": 1.1, "commercialCommissionIncVat": 1.1, "newConstructionCommission": 1.1, "newConstructionCommissionIncVat": 1.1 } ] } ] }
<LiveDataCommissionReport xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models.BusinessIntelligense"> <Reports> <LiveDataCommissionUserOfficeReport> <CustomerId>sample string 1</CustomerId> <Days> <LiveDataCommission> <CommercialCommission>1.1</CommercialCommission> <CommercialCommissionIncVat>1.1</CommercialCommissionIncVat> <CommercialParts>1.1</CommercialParts> <Commission>1.1</Commission> <CommissionIncVat>1.1</CommissionIncVat> <CountryCode>sample string 2</CountryCode> <CurrencyCode>sample string 3</CurrencyCode> <Day>2025-04-04T06:34:02.7698981+02:00</Day> <NewConstructionCommission>1.1</NewConstructionCommission> <NewConstructionCommissionIncVat>1.1</NewConstructionCommissionIncVat> <NewConstructionParts>1.1</NewConstructionParts> <SoldEstateParts>1.1</SoldEstateParts> <ValuationCommission>1.1</ValuationCommission> <ValuationCommissionIncVat>1.1</ValuationCommissionIncVat> <ValuationParts>1.1</ValuationParts> <WritingCommission>1.1</WritingCommission> <WritingCommissionIncVat>1.1</WritingCommissionIncVat> <WritingParts>1.1</WritingParts> </LiveDataCommission> <LiveDataCommission> <CommercialCommission>1.1</CommercialCommission> <CommercialCommissionIncVat>1.1</CommercialCommissionIncVat> <CommercialParts>1.1</CommercialParts> <Commission>1.1</Commission> <CommissionIncVat>1.1</CommissionIncVat> <CountryCode>sample string 2</CountryCode> <CurrencyCode>sample string 3</CurrencyCode> <Day>2025-04-04T06:34:02.7698981+02:00</Day> <NewConstructionCommission>1.1</NewConstructionCommission> <NewConstructionCommissionIncVat>1.1</NewConstructionCommissionIncVat> <NewConstructionParts>1.1</NewConstructionParts> <SoldEstateParts>1.1</SoldEstateParts> <ValuationCommission>1.1</ValuationCommission> <ValuationCommissionIncVat>1.1</ValuationCommissionIncVat> <ValuationParts>1.1</ValuationParts> <WritingCommission>1.1</WritingCommission> <WritingCommissionIncVat>1.1</WritingCommissionIncVat> <WritingParts>1.1</WritingParts> </LiveDataCommission> </Days> <UserId>sample string 2</UserId> </LiveDataCommissionUserOfficeReport> <LiveDataCommissionUserOfficeReport> <CustomerId>sample string 1</CustomerId> <Days> <LiveDataCommission> <CommercialCommission>1.1</CommercialCommission> <CommercialCommissionIncVat>1.1</CommercialCommissionIncVat> <CommercialParts>1.1</CommercialParts> <Commission>1.1</Commission> <CommissionIncVat>1.1</CommissionIncVat> <CountryCode>sample string 2</CountryCode> <CurrencyCode>sample string 3</CurrencyCode> <Day>2025-04-04T06:34:02.7698981+02:00</Day> <NewConstructionCommission>1.1</NewConstructionCommission> <NewConstructionCommissionIncVat>1.1</NewConstructionCommissionIncVat> <NewConstructionParts>1.1</NewConstructionParts> <SoldEstateParts>1.1</SoldEstateParts> <ValuationCommission>1.1</ValuationCommission> <ValuationCommissionIncVat>1.1</ValuationCommissionIncVat> <ValuationParts>1.1</ValuationParts> <WritingCommission>1.1</WritingCommission> <WritingCommissionIncVat>1.1</WritingCommissionIncVat> <WritingParts>1.1</WritingParts> </LiveDataCommission> <LiveDataCommission> <CommercialCommission>1.1</CommercialCommission> <CommercialCommissionIncVat>1.1</CommercialCommissionIncVat> <CommercialParts>1.1</CommercialParts> <Commission>1.1</Commission> <CommissionIncVat>1.1</CommissionIncVat> <CountryCode>sample string 2</CountryCode> <CurrencyCode>sample string 3</CurrencyCode> <Day>2025-04-04T06:34:02.7698981+02:00</Day> <NewConstructionCommission>1.1</NewConstructionCommission> <NewConstructionCommissionIncVat>1.1</NewConstructionCommissionIncVat> <NewConstructionParts>1.1</NewConstructionParts> <SoldEstateParts>1.1</SoldEstateParts> <ValuationCommission>1.1</ValuationCommission> <ValuationCommissionIncVat>1.1</ValuationCommissionIncVat> <ValuationParts>1.1</ValuationParts> <WritingCommission>1.1</WritingCommission> <WritingCommissionIncVat>1.1</WritingCommissionIncVat> <WritingParts>1.1</WritingParts> </LiveDataCommission> </Days> <UserId>sample string 2</UserId> </LiveDataCommissionUserOfficeReport> </Reports> </LiveDataCommissionReport>