curl "https://connect.maklare.vitec.net/BusinessIntelligence/GetSalesReportForEstate?customerId=StringValue&estateId=StringValue&estateNumber=StringValue" -X GET -H "Authorization: basic {Base64 kodad användarnamn och lösenord}"
Dokumentation för API-funktioner
GET BusinessIntelligence/GetSalesReportForEstate
Hämtar försäljningsrapport med provisioner för en bostad med angivet bostadsid eller bostadsnummer.
Request Information
URI Parameters
Response Information
Resource Description
Hämtar försäljningsrapport med provisioner för en bostad med angivet bostadsid eller bostadsnummer.
SalesReportForEstateResponse
Kodexempel
Testformulär
Text input
Response Formats
Namn | Beskrivning | Typ | Information |
customerId | Kund-id. | string |
Krävs |
estateId | Bostadsid. | string | |
estateNumber | Bostadsnummer. | string |
Namn | Beskrivning | Typ | Information |
Estates | Objekten som matchades | Collection of EstateSaleReport |
$URL = "https://connect.maklare.vitec.net/BusinessIntelligence/GetSalesReportForEstate?customerId=StringValue&estateId=StringValue&estateNumber=StringValue"
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/GetSalesReportForEstate?customerId=StringValue&estateId=StringValue&estateNumber=StringValue")) {
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 estates = result.estates.Value ;
// TODO: Gör något med resultatet
}
$URL = "https://connect.maklare.vitec.net/BusinessIntelligence/GetSalesReportForEstate?customerId=StringValue&estateId=StringValue&estateNumber=StringValue";
$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["estates"];
// TODO: Gör något med resultatet
Resultat av begäran
{ "estates": [ { "id": "sample string 1", "estateNumber": "sample string 2", "status": { "id": 1, "text": "sample string 2" }, "type": { "id": 1, "text": "sample string 2" }, "assignment": { "id": 1, "text": "sample string 2" }, "address": { "streetAddress": "sample string 1", "zipCode": "sample string 2", "countryCode": "sample string 3" }, "agents": [ { "id": "sample string 1", "expressId": "sample string 2", "name": "sample string 3", "initials": "sample string 4", "employeeId": "sample string 5", "responsible": true, "primaryOffice": { "customerId": "sample string 1", "name": "sample string 2", "city": "sample string 3" }, "commission": { "value": 1.1, "valueForeign": 1.1, "percentageOfTotal": 1.1 }, "changes": [ { "changedAt": "2024-11-21T09:42:09.2474648+01:00", "commission": 1.1, "commissionForeign": 1.1, "percentageOfTotal": 1.1 }, { "changedAt": "2024-11-21T09:42:09.2474648+01:00", "commission": 1.1, "commissionForeign": 1.1, "percentageOfTotal": 1.1 } ] }, { "id": "sample string 1", "expressId": "sample string 2", "name": "sample string 3", "initials": "sample string 4", "employeeId": "sample string 5", "responsible": true, "primaryOffice": { "customerId": "sample string 1", "name": "sample string 2", "city": "sample string 3" }, "commission": { "value": 1.1, "valueForeign": 1.1, "percentageOfTotal": 1.1 }, "changes": [ { "changedAt": "2024-11-21T09:42:09.2474648+01:00", "commission": 1.1, "commissionForeign": 1.1, "percentageOfTotal": 1.1 }, { "changedAt": "2024-11-21T09:42:09.2474648+01:00", "commission": 1.1, "commissionForeign": 1.1, "percentageOfTotal": 1.1 } ] } ], "contractDay": "2024-11-21T09:42:09.2474648+01:00", "accessDay": "2024-11-21T09:42:09.2474648+01:00", "depositReportedAt": "2024-11-21T09:42:09.2474648+01:00", "commission": 1.1, "commissionForeign": 1.1, "commissionText": "sample string 3", "commissionReceivedAt": "2024-11-21T09:42:09.2474648+01:00", "isNewHome": true, "wgs84Coordinate": { "longitud": 1.1, "latitud": 2.1 }, "intakeSource": { "id": 1, "text": "sample string 2" }, "changedAt": "2024-11-21T09:42:09.2474648+01:00", "changes": [ { "changedAt": "2024-11-21T09:42:09.2474648+01:00", "status": { "id": 1, "text": "sample string 2" }, "commission": 1.1, "commissionForeign": 1.1, "startingPrice": 1, "finalPrice": 1, "startingPriceForeign": 1, "finalPriceForeign": 1, "currencyCode": "sample string 2", "currencyExchangeRate": 1.0 }, { "changedAt": "2024-11-21T09:42:09.2474648+01:00", "status": { "id": 1, "text": "sample string 2" }, "commission": 1.1, "commissionForeign": 1.1, "startingPrice": 1, "finalPrice": 1, "startingPriceForeign": 1, "finalPriceForeign": 1, "currencyCode": "sample string 2", "currencyExchangeRate": 1.0 } ], "startingPrice": 1, "finalPrice": 1, "startingPriceForeign": 1, "finalPriceForeign": 1, "currencyCode": "sample string 5", "currencyExchangeRate": 1.0 }, { "id": "sample string 1", "estateNumber": "sample string 2", "status": { "id": 1, "text": "sample string 2" }, "type": { "id": 1, "text": "sample string 2" }, "assignment": { "id": 1, "text": "sample string 2" }, "address": { "streetAddress": "sample string 1", "zipCode": "sample string 2", "countryCode": "sample string 3" }, "agents": [ { "id": "sample string 1", "expressId": "sample string 2", "name": "sample string 3", "initials": "sample string 4", "employeeId": "sample string 5", "responsible": true, "primaryOffice": { "customerId": "sample string 1", "name": "sample string 2", "city": "sample string 3" }, "commission": { "value": 1.1, "valueForeign": 1.1, "percentageOfTotal": 1.1 }, "changes": [ { "changedAt": "2024-11-21T09:42:09.2474648+01:00", "commission": 1.1, "commissionForeign": 1.1, "percentageOfTotal": 1.1 }, { "changedAt": "2024-11-21T09:42:09.2474648+01:00", "commission": 1.1, "commissionForeign": 1.1, "percentageOfTotal": 1.1 } ] }, { "id": "sample string 1", "expressId": "sample string 2", "name": "sample string 3", "initials": "sample string 4", "employeeId": "sample string 5", "responsible": true, "primaryOffice": { "customerId": "sample string 1", "name": "sample string 2", "city": "sample string 3" }, "commission": { "value": 1.1, "valueForeign": 1.1, "percentageOfTotal": 1.1 }, "changes": [ { "changedAt": "2024-11-21T09:42:09.2474648+01:00", "commission": 1.1, "commissionForeign": 1.1, "percentageOfTotal": 1.1 }, { "changedAt": "2024-11-21T09:42:09.2474648+01:00", "commission": 1.1, "commissionForeign": 1.1, "percentageOfTotal": 1.1 } ] } ], "contractDay": "2024-11-21T09:42:09.2474648+01:00", "accessDay": "2024-11-21T09:42:09.2474648+01:00", "depositReportedAt": "2024-11-21T09:42:09.2474648+01:00", "commission": 1.1, "commissionForeign": 1.1, "commissionText": "sample string 3", "commissionReceivedAt": "2024-11-21T09:42:09.2474648+01:00", "isNewHome": true, "wgs84Coordinate": { "longitud": 1.1, "latitud": 2.1 }, "intakeSource": { "id": 1, "text": "sample string 2" }, "changedAt": "2024-11-21T09:42:09.2474648+01:00", "changes": [ { "changedAt": "2024-11-21T09:42:09.2474648+01:00", "status": { "id": 1, "text": "sample string 2" }, "commission": 1.1, "commissionForeign": 1.1, "startingPrice": 1, "finalPrice": 1, "startingPriceForeign": 1, "finalPriceForeign": 1, "currencyCode": "sample string 2", "currencyExchangeRate": 1.0 }, { "changedAt": "2024-11-21T09:42:09.2474648+01:00", "status": { "id": 1, "text": "sample string 2" }, "commission": 1.1, "commissionForeign": 1.1, "startingPrice": 1, "finalPrice": 1, "startingPriceForeign": 1, "finalPriceForeign": 1, "currencyCode": "sample string 2", "currencyExchangeRate": 1.0 } ], "startingPrice": 1, "finalPrice": 1, "startingPriceForeign": 1, "finalPriceForeign": 1, "currencyCode": "sample string 5", "currencyExchangeRate": 1.0 } ] }
<SalesReportForEstateResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models.BusinessIntelligense"> <Estates> <EstateSaleReport> <AccessDay>2024-11-21T09:42:09.2474648+01:00</AccessDay> <Address> <CountryCode>sample string 3</CountryCode> <StreetAddress>sample string 1</StreetAddress> <ZipCode>sample string 2</ZipCode> </Address> <Agents> <SaleReportEstateAgent> <Changes> <EconomicEstateAgentChangeEntry> <ChangedAt>2024-11-21T09:42:09.2474648+01:00</ChangedAt> <Commission>1.1</Commission> <CommissionForeign>1.1</CommissionForeign> <PercentageOfTotal>1.1</PercentageOfTotal> </EconomicEstateAgentChangeEntry> <EconomicEstateAgentChangeEntry> <ChangedAt>2024-11-21T09:42:09.2474648+01:00</ChangedAt> <Commission>1.1</Commission> <CommissionForeign>1.1</CommissionForeign> <PercentageOfTotal>1.1</PercentageOfTotal> </EconomicEstateAgentChangeEntry> </Changes> <Commission> <PercentageOfTotal>1.1</PercentageOfTotal> <Value>1.1</Value> <ValueForeign>1.1</ValueForeign> </Commission> <EmployeeId>sample string 5</EmployeeId> <ExpressId>sample string 2</ExpressId> <Id>sample string 1</Id> <Initials>sample string 4</Initials> <Name>sample string 3</Name> <PrimaryOffice> <City>sample string 3</City> <CustomerId>sample string 1</CustomerId> <Name>sample string 2</Name> </PrimaryOffice> <Responsible>true</Responsible> </SaleReportEstateAgent> <SaleReportEstateAgent> <Changes> <EconomicEstateAgentChangeEntry> <ChangedAt>2024-11-21T09:42:09.2474648+01:00</ChangedAt> <Commission>1.1</Commission> <CommissionForeign>1.1</CommissionForeign> <PercentageOfTotal>1.1</PercentageOfTotal> </EconomicEstateAgentChangeEntry> <EconomicEstateAgentChangeEntry> <ChangedAt>2024-11-21T09:42:09.2474648+01:00</ChangedAt> <Commission>1.1</Commission> <CommissionForeign>1.1</CommissionForeign> <PercentageOfTotal>1.1</PercentageOfTotal> </EconomicEstateAgentChangeEntry> </Changes> <Commission> <PercentageOfTotal>1.1</PercentageOfTotal> <Value>1.1</Value> <ValueForeign>1.1</ValueForeign> </Commission> <EmployeeId>sample string 5</EmployeeId> <ExpressId>sample string 2</ExpressId> <Id>sample string 1</Id> <Initials>sample string 4</Initials> <Name>sample string 3</Name> <PrimaryOffice> <City>sample string 3</City> <CustomerId>sample string 1</CustomerId> <Name>sample string 2</Name> </PrimaryOffice> <Responsible>true</Responsible> </SaleReportEstateAgent> </Agents> <Assignment xmlns:d4p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models"> <d4p1:Id>1</d4p1:Id> <d4p1:Text>sample string 2</d4p1:Text> </Assignment> <ChangedAt>2024-11-21T09:42:09.2474648+01:00</ChangedAt> <Changes> <EconomicEstateChangeEntry> <ChangedAt>2024-11-21T09:42:09.2474648+01:00</ChangedAt> <Commission>1.1</Commission> <CommissionForeign>1.1</CommissionForeign> <CurrencyCode>sample string 2</CurrencyCode> <CurrencyExchangeRate>1</CurrencyExchangeRate> <FinalPrice>1</FinalPrice> <FinalPriceForeign>1</FinalPriceForeign> <StartingPrice>1</StartingPrice> <StartingPriceForeign>1</StartingPriceForeign> <Status xmlns:d6p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models"> <d6p1:Id>1</d6p1:Id> <d6p1:Text>sample string 2</d6p1:Text> </Status> </EconomicEstateChangeEntry> <EconomicEstateChangeEntry> <ChangedAt>2024-11-21T09:42:09.2474648+01:00</ChangedAt> <Commission>1.1</Commission> <CommissionForeign>1.1</CommissionForeign> <CurrencyCode>sample string 2</CurrencyCode> <CurrencyExchangeRate>1</CurrencyExchangeRate> <FinalPrice>1</FinalPrice> <FinalPriceForeign>1</FinalPriceForeign> <StartingPrice>1</StartingPrice> <StartingPriceForeign>1</StartingPriceForeign> <Status xmlns:d6p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models"> <d6p1:Id>1</d6p1:Id> <d6p1:Text>sample string 2</d6p1:Text> </Status> </EconomicEstateChangeEntry> </Changes> <Commission>1.1</Commission> <CommissionForeign>1.1</CommissionForeign> <CommissionReceivedAt>2024-11-21T09:42:09.2474648+01:00</CommissionReceivedAt> <CommissionText>sample string 3</CommissionText> <ContractDay>2024-11-21T09:42:09.2474648+01:00</ContractDay> <CurrencyCode>sample string 5</CurrencyCode> <CurrencyExchangeRate>1</CurrencyExchangeRate> <DepositReportedAt>2024-11-21T09:42:09.2474648+01:00</DepositReportedAt> <EstateNumber>sample string 2</EstateNumber> <FinalPrice>1</FinalPrice> <FinalPriceForeign>1</FinalPriceForeign> <Id>sample string 1</Id> <IntakeSource xmlns:d4p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models"> <d4p1:Id>1</d4p1:Id> <d4p1:Text>sample string 2</d4p1:Text> </IntakeSource> <IsNewHome>true</IsNewHome> <StartingPrice>1</StartingPrice> <StartingPriceForeign>1</StartingPriceForeign> <Status xmlns:d4p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models"> <d4p1:Id>1</d4p1:Id> <d4p1:Text>sample string 2</d4p1:Text> </Status> <Type xmlns:d4p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models"> <d4p1:Id>1</d4p1:Id> <d4p1:Text>sample string 2</d4p1:Text> </Type> <Wgs84Coordinate xmlns:d4p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models"> <d4p1:Latitud>2.1</d4p1:Latitud> <d4p1:Longitud>1.1</d4p1:Longitud> </Wgs84Coordinate> </EstateSaleReport> <EstateSaleReport> <AccessDay>2024-11-21T09:42:09.2474648+01:00</AccessDay> <Address> <CountryCode>sample string 3</CountryCode> <StreetAddress>sample string 1</StreetAddress> <ZipCode>sample string 2</ZipCode> </Address> <Agents> <SaleReportEstateAgent> <Changes> <EconomicEstateAgentChangeEntry> <ChangedAt>2024-11-21T09:42:09.2474648+01:00</ChangedAt> <Commission>1.1</Commission> <CommissionForeign>1.1</CommissionForeign> <PercentageOfTotal>1.1</PercentageOfTotal> </EconomicEstateAgentChangeEntry> <EconomicEstateAgentChangeEntry> <ChangedAt>2024-11-21T09:42:09.2474648+01:00</ChangedAt> <Commission>1.1</Commission> <CommissionForeign>1.1</CommissionForeign> <PercentageOfTotal>1.1</PercentageOfTotal> </EconomicEstateAgentChangeEntry> </Changes> <Commission> <PercentageOfTotal>1.1</PercentageOfTotal> <Value>1.1</Value> <ValueForeign>1.1</ValueForeign> </Commission> <EmployeeId>sample string 5</EmployeeId> <ExpressId>sample string 2</ExpressId> <Id>sample string 1</Id> <Initials>sample string 4</Initials> <Name>sample string 3</Name> <PrimaryOffice> <City>sample string 3</City> <CustomerId>sample string 1</CustomerId> <Name>sample string 2</Name> </PrimaryOffice> <Responsible>true</Responsible> </SaleReportEstateAgent> <SaleReportEstateAgent> <Changes> <EconomicEstateAgentChangeEntry> <ChangedAt>2024-11-21T09:42:09.2474648+01:00</ChangedAt> <Commission>1.1</Commission> <CommissionForeign>1.1</CommissionForeign> <PercentageOfTotal>1.1</PercentageOfTotal> </EconomicEstateAgentChangeEntry> <EconomicEstateAgentChangeEntry> <ChangedAt>2024-11-21T09:42:09.2474648+01:00</ChangedAt> <Commission>1.1</Commission> <CommissionForeign>1.1</CommissionForeign> <PercentageOfTotal>1.1</PercentageOfTotal> </EconomicEstateAgentChangeEntry> </Changes> <Commission> <PercentageOfTotal>1.1</PercentageOfTotal> <Value>1.1</Value> <ValueForeign>1.1</ValueForeign> </Commission> <EmployeeId>sample string 5</EmployeeId> <ExpressId>sample string 2</ExpressId> <Id>sample string 1</Id> <Initials>sample string 4</Initials> <Name>sample string 3</Name> <PrimaryOffice> <City>sample string 3</City> <CustomerId>sample string 1</CustomerId> <Name>sample string 2</Name> </PrimaryOffice> <Responsible>true</Responsible> </SaleReportEstateAgent> </Agents> <Assignment xmlns:d4p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models"> <d4p1:Id>1</d4p1:Id> <d4p1:Text>sample string 2</d4p1:Text> </Assignment> <ChangedAt>2024-11-21T09:42:09.2474648+01:00</ChangedAt> <Changes> <EconomicEstateChangeEntry> <ChangedAt>2024-11-21T09:42:09.2474648+01:00</ChangedAt> <Commission>1.1</Commission> <CommissionForeign>1.1</CommissionForeign> <CurrencyCode>sample string 2</CurrencyCode> <CurrencyExchangeRate>1</CurrencyExchangeRate> <FinalPrice>1</FinalPrice> <FinalPriceForeign>1</FinalPriceForeign> <StartingPrice>1</StartingPrice> <StartingPriceForeign>1</StartingPriceForeign> <Status xmlns:d6p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models"> <d6p1:Id>1</d6p1:Id> <d6p1:Text>sample string 2</d6p1:Text> </Status> </EconomicEstateChangeEntry> <EconomicEstateChangeEntry> <ChangedAt>2024-11-21T09:42:09.2474648+01:00</ChangedAt> <Commission>1.1</Commission> <CommissionForeign>1.1</CommissionForeign> <CurrencyCode>sample string 2</CurrencyCode> <CurrencyExchangeRate>1</CurrencyExchangeRate> <FinalPrice>1</FinalPrice> <FinalPriceForeign>1</FinalPriceForeign> <StartingPrice>1</StartingPrice> <StartingPriceForeign>1</StartingPriceForeign> <Status xmlns:d6p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models"> <d6p1:Id>1</d6p1:Id> <d6p1:Text>sample string 2</d6p1:Text> </Status> </EconomicEstateChangeEntry> </Changes> <Commission>1.1</Commission> <CommissionForeign>1.1</CommissionForeign> <CommissionReceivedAt>2024-11-21T09:42:09.2474648+01:00</CommissionReceivedAt> <CommissionText>sample string 3</CommissionText> <ContractDay>2024-11-21T09:42:09.2474648+01:00</ContractDay> <CurrencyCode>sample string 5</CurrencyCode> <CurrencyExchangeRate>1</CurrencyExchangeRate> <DepositReportedAt>2024-11-21T09:42:09.2474648+01:00</DepositReportedAt> <EstateNumber>sample string 2</EstateNumber> <FinalPrice>1</FinalPrice> <FinalPriceForeign>1</FinalPriceForeign> <Id>sample string 1</Id> <IntakeSource xmlns:d4p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models"> <d4p1:Id>1</d4p1:Id> <d4p1:Text>sample string 2</d4p1:Text> </IntakeSource> <IsNewHome>true</IsNewHome> <StartingPrice>1</StartingPrice> <StartingPriceForeign>1</StartingPriceForeign> <Status xmlns:d4p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models"> <d4p1:Id>1</d4p1:Id> <d4p1:Text>sample string 2</d4p1:Text> </Status> <Type xmlns:d4p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models"> <d4p1:Id>1</d4p1:Id> <d4p1:Text>sample string 2</d4p1:Text> </Type> <Wgs84Coordinate xmlns:d4p1="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models"> <d4p1:Latitud>2.1</d4p1:Latitud> <d4p1:Longitud>1.1</d4p1:Longitud> </Wgs84Coordinate> </EstateSaleReport> </Estates> </SalesReportForEstateResponse>