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 /tax HTTP/1.1
Host: api.portfoliolink.co.za
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GetTaxInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PortfolioLinkApi.ServiceModel">
<Age>0</Age>
<Donations>0</Donations>
<ForeignDividends>0</ForeignDividends>
<ForeignInterest>0</ForeignInterest>
<Income>0</Income>
<IsDisabled>false</IsDisabled>
<LocalDividends>0</LocalDividends>
<LocalInterest>0</LocalInterest>
<LocalReitDividends>0</LocalReitDividends>
<MedicalAidContribution>0</MedicalAidContribution>
<NrDependants>0</NrDependants>
<PensionFundContributions>0</PensionFundContributions>
<TaxableCapitalGain>0</TaxableCapitalGain>
</GetTaxInfo>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<GetTaxInfoResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PortfolioLinkApi.ServiceModel">
<AdditionalMedicalTaxCredits>0</AdditionalMedicalTaxCredits>
<Donations>0</Donations>
<EffectiveTaxRate>0</EffectiveTaxRate>
<Income>0</Income>
<LocalInterestAfterExemption>0</LocalInterestAfterExemption>
<MedicalTaxCredits>0</MedicalTaxCredits>
<NetIncome>0</NetIncome>
<PensionFundContributions>0</PensionFundContributions>
<PostTaxIncome>0</PostTaxIncome>
<Rebate>0</Rebate>
<TaxBracket xmlns:d2p1="http://schemas.datacontract.org/2004/07/SharedTypes">
<d2p1:Lower>0</d2p1:Lower>
<d2p1:Rate>0</d2p1:Rate>
<d2p1:Upper>0</d2p1:Upper>
</TaxBracket>
<TaxBrackets xmlns:d2p1="http://schemas.datacontract.org/2004/07/SharedTypes">
<d2p1:TaxBracket>
<d2p1:Lower>0</d2p1:Lower>
<d2p1:Rate>0</d2p1:Rate>
<d2p1:Upper>0</d2p1:Upper>
</d2p1:TaxBracket>
</TaxBrackets>
<TaxExemption>0</TaxExemption>
<TaxPayable>0</TaxPayable>
<TaxPayableOnIncome>0</TaxPayableOnIncome>
<TaxPayablePriorToRebates>0</TaxPayablePriorToRebates>
<TaxThreshold>0</TaxThreshold>
<TaxableCapitalGain>0</TaxableCapitalGain>
<TaxableIncome>0</TaxableIncome>
<WithholdingsTaxPayable>0</WithholdingsTaxPayable>
</GetTaxInfoResponse>