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/statsAa HTTP/1.1
Host: api.portfoliolink.co.za
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CalculatePortfolioStatsBasedOnAa xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PortfolioLinkApi.ServiceModel">
<AaType>String</AaType>
<AfricaEuroBondsExSouthAfrica>0</AfricaEuroBondsExSouthAfrica>
<Currency>String</Currency>
<ExpectedInflation>0</ExpectedInflation>
<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>
</CalculatePortfolioStatsBasedOnAa>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<CalculatePortfolioStatsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PortfolioLinkApi.ServiceModel">
<ExpectedReturn>0</ExpectedReturn>
<StandardDeviation>0</StandardDeviation>
</CalculatePortfolioStatsResponse>