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 /riskprofiles/calculate/riskneed HTTP/1.1
Host: api.portfoliolink.co.za
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GetRiskNeed xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PortfolioLinkApi.ServiceModel">
<AdditionalGetContributionCashFlowRequests>
<GetContributionCashFlowRequest>
<ApplyContribution>false</ApplyContribution>
<Contribution>0</Contribution>
<ContributionFrequency>0</ContributionFrequency>
<ContributionGrowth>0</ContributionGrowth>
<ContributionGrowthFrequency>0</ContributionGrowthFrequency>
<ContributionLabel>String</ContributionLabel>
<ContributionStartYear>0</ContributionStartYear>
<ContributionToLast>0</ContributionToLast>
<KeyIndex>0</KeyIndex>
</GetContributionCashFlowRequest>
</AdditionalGetContributionCashFlowRequests>
<AdditionalGetIncomeCashFlowRequests>
<GetIncomeCashFlowRequest>
<AdhocCashFlow1>0</AdhocCashFlow1>
<AdhocCashFlow2>0</AdhocCashFlow2>
<AdhocCashFlow3>0</AdhocCashFlow3>
<AdhocCashFlowAge1>0</AdhocCashFlowAge1>
<AdhocCashFlowAge2>0</AdhocCashFlowAge2>
<AdhocCashFlowAge3>0</AdhocCashFlowAge3>
<ApplySmile>false</ApplySmile>
<CurrentAge>0</CurrentAge>
<HasAdhocCashFlow>false</HasAdhocCashFlow>
<Income>0</Income>
<IncomeGrowth>0</IncomeGrowth>
<IncomeGrowthFrequency>0</IncomeGrowthFrequency>
<IncomeIncludeZeroIncomeYears>false</IncomeIncludeZeroIncomeYears>
<IncomeLabel>String</IncomeLabel>
<IncomeToLast>0</IncomeToLast>
<KeyIndex>0</KeyIndex>
<PayoutFrequency>0</PayoutFrequency>
<SmilePercentages xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:KeyValueOfintdecimal>
<d4p1:Key>0</d4p1:Key>
<d4p1:Value>0</d4p1:Value>
</d4p1:KeyValueOfintdecimal>
</SmilePercentages>
<StartYear>0</StartYear>
<TaxRate>0</TaxRate>
</GetIncomeCashFlowRequest>
</AdditionalGetIncomeCashFlowRequests>
<Currency>String</Currency>
<GetContributionCashFlowRequest>
<ApplyContribution>false</ApplyContribution>
<Contribution>0</Contribution>
<ContributionFrequency>0</ContributionFrequency>
<ContributionGrowth>0</ContributionGrowth>
<ContributionGrowthFrequency>0</ContributionGrowthFrequency>
<ContributionLabel>String</ContributionLabel>
<ContributionStartYear>0</ContributionStartYear>
<ContributionToLast>0</ContributionToLast>
<KeyIndex>0</KeyIndex>
</GetContributionCashFlowRequest>
<GetIncomeCashFlowRequest>
<AdhocCashFlow1>0</AdhocCashFlow1>
<AdhocCashFlow2>0</AdhocCashFlow2>
<AdhocCashFlow3>0</AdhocCashFlow3>
<AdhocCashFlowAge1>0</AdhocCashFlowAge1>
<AdhocCashFlowAge2>0</AdhocCashFlowAge2>
<AdhocCashFlowAge3>0</AdhocCashFlowAge3>
<ApplySmile>false</ApplySmile>
<CurrentAge>0</CurrentAge>
<HasAdhocCashFlow>false</HasAdhocCashFlow>
<Income>0</Income>
<IncomeGrowth>0</IncomeGrowth>
<IncomeGrowthFrequency>0</IncomeGrowthFrequency>
<IncomeIncludeZeroIncomeYears>false</IncomeIncludeZeroIncomeYears>
<IncomeLabel>String</IncomeLabel>
<IncomeToLast>0</IncomeToLast>
<KeyIndex>0</KeyIndex>
<PayoutFrequency>0</PayoutFrequency>
<SmilePercentages xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfintdecimal>
<d3p1:Key>0</d3p1:Key>
<d3p1:Value>0</d3p1:Value>
</d3p1:KeyValueOfintdecimal>
</SmilePercentages>
<StartYear>0</StartYear>
<TaxRate>0</TaxRate>
</GetIncomeCashFlowRequest>
<GoalInfo xmlns:d2p1="http://schemas.datacontract.org/2004/07/PortfolioLinkApi.ServiceModel.Types">
<d2p1:Currency>String</d2p1:Currency>
<d2p1:GoalDescription>String</d2p1:GoalDescription>
<d2p1:GoalHasTarget>false</d2p1:GoalHasTarget>
<d2p1:GoalName>String</d2p1:GoalName>
<d2p1:GoalTarget>0</d2p1:GoalTarget>
<d2p1:GoalTargetAge>0</d2p1:GoalTargetAge>
<d2p1:Type>PostRetirement</d2p1:Type>
<d2p1:WrapperType>String</d2p1:WrapperType>
</GoalInfo>
<LumpSum>0</LumpSum>
<Override>false</Override>
<OverrideMessage>String</OverrideMessage>
<OverrideRiskProfileId>0</OverrideRiskProfileId>
</GetRiskNeed>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<GetRiskNeedResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PortfolioLinkApi.ServiceModel">
<Message>String</Message>
<Override>false</Override>
<OverrideMessage>String</OverrideMessage>
<OverrideRiskProfileId>0</OverrideRiskProfileId>
<RequiredRateOfReturn>0</RequiredRateOfReturn>
<RiskProfile>String</RiskProfile>
<RiskProfileId>0</RiskProfileId>
</GetRiskNeedResponse>