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 /calculator/aa HTTP/1.1
Host: api.portfoliolink.co.za
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CalculatePortfolioAa xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PortfolioLinkApi.ServiceModel">
<AdditionalSaProperty>0</AdditionalSaProperty>
<CashReserve>0</CashReserve>
<PortfolioId>0</PortfolioId>
</CalculatePortfolioAa>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<CalculatePortfolioAaResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PortfolioLinkApi.ServiceModel">
<AfricaEuroBondsExSouthAfrica>0</AfricaEuroBondsExSouthAfrica>
<AssetAllocationPoints xmlns:d2p1="http://schemas.datacontract.org/2004/07/SharedTypes">
<d2p1:AssetAllocationPoints>
<d2p1:Name>String</d2p1:Name>
<d2p1:Value>0</d2p1:Value>
</d2p1:AssetAllocationPoints>
</AssetAllocationPoints>
<ForeignBonds>0</ForeignBonds>
<ForeignCash>0</ForeignCash>
<ForeignEquity>0</ForeignEquity>
<ForeignProperty>0</ForeignProperty>
<GlobalBonds>0</GlobalBonds>
<GlobalCash>0</GlobalCash>
<GlobalEmergingMarketBonds>0</GlobalEmergingMarketBonds>
<GlobalEmergingMarketEquity>0</GlobalEmergingMarketEquity>
<GlobalEquity>0</GlobalEquity>
<GlobalEquitySmallCapStocks>0</GlobalEquitySmallCapStocks>
<GlobalHedgeFunds>0</GlobalHedgeFunds>
<GlobalHighYield>0</GlobalHighYield>
<GlobalIncomeOpportunities>0</GlobalIncomeOpportunities>
<GlobalInvestmentGrade>0</GlobalInvestmentGrade>
<GlobalProperty>0</GlobalProperty>
<ListedInfrastructure>0</ListedInfrastructure>
<ListedPrivateEquity>0</ListedPrivateEquity>
<LocalBonds>0</LocalBonds>
<LocalCash>0</LocalCash>
<LocalCredit>0</LocalCredit>
<LocalEquity>0</LocalEquity>
<LocalInfrastructure>0</LocalInfrastructure>
<LocalProperty>0</LocalProperty>
</CalculatePortfolioAaResponse>