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 /goals/retirement/{Id} HTTP/1.1
Host: api.portfoliolink.co.za
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GetRetirementGoal xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PortfolioLinkApi.ServiceModel">
<Id>0</Id>
</GetRetirementGoal>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<RetirementGoalResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PortfolioLinkApi.ServiceModel">
<Results xmlns:d2p1="http://schemas.datacontract.org/2004/07/PortfolioLinkApi.ServiceModel.Types">
<d2p1:AdditionalSaProperty>0</d2p1:AdditionalSaProperty>
<d2p1:AnnualIncome>0</d2p1:AnnualIncome>
<d2p1:CashReserve>0</d2p1:CashReserve>
<d2p1:ClientGoalId>0</d2p1:ClientGoalId>
<d2p1:ClientId>0</d2p1:ClientId>
<d2p1:CreatedAsAt>0001-01-01T00:00:00</d2p1:CreatedAsAt>
<d2p1:CurrentBalance>0</d2p1:CurrentBalance>
<d2p1:Date>0</d2p1:Date>
<d2p1:DocumentExternalId>String</d2p1:DocumentExternalId>
<d2p1:DocumentExternalType>String</d2p1:DocumentExternalType>
<d2p1:DocumentStatus>String</d2p1:DocumentStatus>
<d2p1:EndBalance>0</d2p1:EndBalance>
<d2p1:EndDate>0</d2p1:EndDate>
<d2p1:GoalTypeId>0</d2p1:GoalTypeId>
<d2p1:Id>0</d2p1:Id>
<d2p1:LifeExpectancyAge>0</d2p1:LifeExpectancyAge>
<d2p1:Message>String</d2p1:Message>
<d2p1:PortfolioId>0</d2p1:PortfolioId>
<d2p1:Results />
<d2p1:Results2>String</d2p1:Results2>
<d2p1:ResultsType>String</d2p1:ResultsType>
<d2p1:Status>String</d2p1:Status>
<d2p1:SuggestedIncome>0</d2p1:SuggestedIncome>
<d2p1:TaxableAnnualIncome>0</d2p1:TaxableAnnualIncome>
<d2p1:UpdatedAsAt>0001-01-01T00:00:00</d2p1:UpdatedAsAt>
</Results>
</RetirementGoalResponse>