To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
HTTP + XML
The following are sample HTTP requests and responses.
The placeholders shown need to be replaced with actual values.
POST /xml/reply/SinglePropertySaleSearch HTTP/1.1
Host: api-dev.1881.no
Content-Type: application/xml
Content-Length: length
<SinglePropertySaleSearch xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/O1881.SearchAdapter.ServiceModel">
<Facets xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</Facets>
<Fields xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</Fields>
<Filters xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</Filters>
<Offset>0</Offset>
<Profile>String</Profile>
<QueryString>String</QueryString>
<ReturnAllContactPoints>false</ReturnAllContactPoints>
<Rows>0</Rows>
<SortBy xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</SortBy>
</SinglePropertySaleSearch>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<SinglePropertySaleSearchResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/O1881.SearchAdapter.ServiceModel">
<Facets>
<Facet>
<Type>String</Type>
<Values>
<FacetValue>
<Count>0</Count>
<FilterValue>String</FilterValue>
<Value>String</Value>
</FacetValue>
</Values>
</Facet>
</Facets>
<NumberOfHits>0</NumberOfHits>
<Profile>String</Profile>
<QueryTimeMilliSeconds>0</QueryTimeMilliSeconds>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
</d2p1:ResponseError>
</d2p1:Errors>
</ResponseStatus>
<Version>String</Version>
<Hits>
<SinglePropertySaleHit>
<Property>
<BuildingId>String</BuildingId>
<BuildingType>String</BuildingType>
<ConfigVersion>String</ConfigVersion>
<Contexts>
<ArrayOfKeyValue>
<KeyValue>
<Key>String</Key>
<Type>String</Type>
<Value>String</Value>
</KeyValue>
</ArrayOfKeyValue>
</Contexts>
<Coordinate>
<Latitude>0</Latitude>
<Longitude>0</Longitude>
</Coordinate>
<DataSource xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:int>0</d5p1:int>
</DataSource>
<DisplayValues>
<KeyValue>
<Key>String</Key>
<Type>String</Type>
<Value>String</Value>
</KeyValue>
</DisplayValues>
<FullReservation xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:string>String</d5p1:string>
</FullReservation>
<Id>String</Id>
<LastUpdated>0001-01-01T00:00:00</LastUpdated>
<Sale>
<Buyers>
<PropertySaleParticipant>
<Id>String</Id>
<IsCompany>false</IsCompany>
<Name>String</Name>
<Percentage>0</Percentage>
<Values>
<KeyValue>
<Key>String</Key>
<Type>String</Type>
<Value>String</Value>
</KeyValue>
</Values>
</PropertySaleParticipant>
</Buyers>
<DocumentNumber>0</DocumentNumber>
<GroupSaleId>String</GroupSaleId>
<Id>0</Id>
<IncludesBuilding>false</IncludesBuilding>
<InfoText>String</InfoText>
<IsHousingCooperative>false</IsHousingCooperative>
<LineId>0</LineId>
<NewsletterFormatText>String</NewsletterFormatText>
<Price>0</Price>
<Sellers>
<PropertySaleParticipant>
<Id>String</Id>
<IsCompany>false</IsCompany>
<Name>String</Name>
<Percentage>0</Percentage>
<Values>
<KeyValue>
<Key>String</Key>
<Type>String</Type>
<Value>String</Value>
</KeyValue>
</Values>
</PropertySaleParticipant>
</Sellers>
<SoldDate>0001-01-01T00:00:00</SoldDate>
<Type>String</Type>
<Values>
<KeyValue>
<Key>String</Key>
<Type>String</Type>
<Value>String</Value>
</KeyValue>
</Values>
</Sale>
<SearchTerms>
<KeyValue>
<Key>String</Key>
<Type>String</Type>
<Value>String</Value>
</KeyValue>
</SearchTerms>
<StreetAddress>
<AddressText>String</AddressText>
<CityArea>String</CityArea>
<CitySector>String</CitySector>
<Coordinate>
<Latitude>0</Latitude>
<Longitude>0</Longitude>
</Coordinate>
<Country>String</Country>
<County>String</County>
<HouseLetter>String</HouseLetter>
<HouseNumber>String</HouseNumber>
<Municipality>String</Municipality>
<MunicipalityCode>String</MunicipalityCode>
<PostalArea>String</PostalArea>
<PostalCode>String</PostalCode>
<Region>String</Region>
<StreetName>String</StreetName>
<TradeArea>String</TradeArea>
<TradeAreaId>0</TradeAreaId>
<Values>
<KeyValue>
<Key>String</Key>
<Type>String</Type>
<Value>String</Value>
</KeyValue>
</Values>
</StreetAddress>
<Type>String</Type>
<Values>
<KeyValue>
<Key>String</Key>
<Type>String</Type>
<Value>String</Value>
</KeyValue>
</Values>
<Whatever>String</Whatever>
</Property>
<Score>0</Score>
</SinglePropertySaleHit>
</Hits>
</SinglePropertySaleSearchResponse>