POST api/Debt/CalculateDebts

Calculates the debt totals.

Request Information

Parameters

NameDescriptionAdditional information
debts
A list of debts.

Define this parameter in the request body.

Request body formats

application/json, text/json

Sample:
[
  {
    "ID": 1,
    "Entity": 2,
    "CostType": 3,
    "PropertyType": 4,
    "Description": "sample string 5",
    "Value": 6.0,
    "LoanedAmount": 7.0,
    "RepaymentType": 0,
    "YearlyIntrest": 8.0,
    "Years": 9,
    "StartDate": "17/11/2019 08:33"
  },
  {
    "ID": 1,
    "Entity": 2,
    "CostType": 3,
    "PropertyType": 4,
    "Description": "sample string 5",
    "Value": 6.0,
    "LoanedAmount": 7.0,
    "RepaymentType": 0,
    "YearlyIntrest": 8.0,
    "Years": 9,
    "StartDate": "17/11/2019 08:33"
  },
  {
    "ID": 1,
    "Entity": 2,
    "CostType": 3,
    "PropertyType": 4,
    "Description": "sample string 5",
    "Value": 6.0,
    "LoanedAmount": 7.0,
    "RepaymentType": 0,
    "YearlyIntrest": 8.0,
    "Years": 9,
    "StartDate": "17/11/2019 08:33"
  }
]

application/xml, text/xml

Sample:
<ArrayOfDebt xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CapitalPlanner.Data.Models">
  <Debt>
    <CostType>3</CostType>
    <Description>sample string 5</Description>
    <Entity>2</Entity>
    <ID>1</ID>
    <LoanedAmount>7</LoanedAmount>
    <PropertyType>4</PropertyType>
    <RepaymentType>FixedPayment</RepaymentType>
    <StartDate>2019-11-17T08:33:56.88525+01:00</StartDate>
    <Value>6</Value>
    <YearlyIntrest>8</YearlyIntrest>
    <Years>9</Years>
  </Debt>
  <Debt>
    <CostType>3</CostType>
    <Description>sample string 5</Description>
    <Entity>2</Entity>
    <ID>1</ID>
    <LoanedAmount>7</LoanedAmount>
    <PropertyType>4</PropertyType>
    <RepaymentType>FixedPayment</RepaymentType>
    <StartDate>2019-11-17T08:33:56.88525+01:00</StartDate>
    <Value>6</Value>
    <YearlyIntrest>8</YearlyIntrest>
    <Years>9</Years>
  </Debt>
  <Debt>
    <CostType>3</CostType>
    <Description>sample string 5</Description>
    <Entity>2</Entity>
    <ID>1</ID>
    <LoanedAmount>7</LoanedAmount>
    <PropertyType>4</PropertyType>
    <RepaymentType>FixedPayment</RepaymentType>
    <StartDate>2019-11-17T08:33:56.88525+01:00</StartDate>
    <Value>6</Value>
    <YearlyIntrest>8</YearlyIntrest>
    <Years>9</Years>
  </Debt>
</ArrayOfDebt>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'IEnumerable`1'.

Response Information

Response body formats

application/json, text/json

Sample:
[
  {
    "Debt": {
      "ID": 1,
      "Entity": 2,
      "CostType": 3,
      "PropertyType": 4,
      "Description": "sample string 5",
      "Value": 6.0,
      "LoanedAmount": 7.0,
      "RepaymentType": 0,
      "YearlyIntrest": 8.0,
      "Years": 9,
      "StartDate": "17/11/2019 08:33"
    },
    "CurrentDebt": 1.0,
    "EndDate": "17/11/2028 08:33",
    "IntrestTotal": 2.0,
    "DebtTotal": 9.0
  },
  {
    "Debt": {
      "ID": 1,
      "Entity": 2,
      "CostType": 3,
      "PropertyType": 4,
      "Description": "sample string 5",
      "Value": 6.0,
      "LoanedAmount": 7.0,
      "RepaymentType": 0,
      "YearlyIntrest": 8.0,
      "Years": 9,
      "StartDate": "17/11/2019 08:33"
    },
    "CurrentDebt": 1.0,
    "EndDate": "17/11/2028 08:33",
    "IntrestTotal": 2.0,
    "DebtTotal": 9.0
  },
  {
    "Debt": {
      "ID": 1,
      "Entity": 2,
      "CostType": 3,
      "PropertyType": 4,
      "Description": "sample string 5",
      "Value": 6.0,
      "LoanedAmount": 7.0,
      "RepaymentType": 0,
      "YearlyIntrest": 8.0,
      "Years": 9,
      "StartDate": "17/11/2019 08:33"
    },
    "CurrentDebt": 1.0,
    "EndDate": "17/11/2028 08:33",
    "IntrestTotal": 2.0,
    "DebtTotal": 9.0
  }
]

application/xml, text/xml

Sample:
<ArrayOfDebtVM xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CapitalPlanner.API.Models">
  <DebtVM>
    <CurrentDebt>1</CurrentDebt>
    <Debt xmlns:d3p1="http://schemas.datacontract.org/2004/07/CapitalPlanner.Data.Models">
      <d3p1:CostType>3</d3p1:CostType>
      <d3p1:Description>sample string 5</d3p1:Description>
      <d3p1:Entity>2</d3p1:Entity>
      <d3p1:ID>1</d3p1:ID>
      <d3p1:LoanedAmount>7</d3p1:LoanedAmount>
      <d3p1:PropertyType>4</d3p1:PropertyType>
      <d3p1:RepaymentType>FixedPayment</d3p1:RepaymentType>
      <d3p1:StartDate>2019-11-17T08:33:57.057125+01:00</d3p1:StartDate>
      <d3p1:Value>6</d3p1:Value>
      <d3p1:YearlyIntrest>8</d3p1:YearlyIntrest>
      <d3p1:Years>9</d3p1:Years>
    </Debt>
    <IntrestTotal>2</IntrestTotal>
  </DebtVM>
  <DebtVM>
    <CurrentDebt>1</CurrentDebt>
    <Debt xmlns:d3p1="http://schemas.datacontract.org/2004/07/CapitalPlanner.Data.Models">
      <d3p1:CostType>3</d3p1:CostType>
      <d3p1:Description>sample string 5</d3p1:Description>
      <d3p1:Entity>2</d3p1:Entity>
      <d3p1:ID>1</d3p1:ID>
      <d3p1:LoanedAmount>7</d3p1:LoanedAmount>
      <d3p1:PropertyType>4</d3p1:PropertyType>
      <d3p1:RepaymentType>FixedPayment</d3p1:RepaymentType>
      <d3p1:StartDate>2019-11-17T08:33:57.057125+01:00</d3p1:StartDate>
      <d3p1:Value>6</d3p1:Value>
      <d3p1:YearlyIntrest>8</d3p1:YearlyIntrest>
      <d3p1:Years>9</d3p1:Years>
    </Debt>
    <IntrestTotal>2</IntrestTotal>
  </DebtVM>
  <DebtVM>
    <CurrentDebt>1</CurrentDebt>
    <Debt xmlns:d3p1="http://schemas.datacontract.org/2004/07/CapitalPlanner.Data.Models">
      <d3p1:CostType>3</d3p1:CostType>
      <d3p1:Description>sample string 5</d3p1:Description>
      <d3p1:Entity>2</d3p1:Entity>
      <d3p1:ID>1</d3p1:ID>
      <d3p1:LoanedAmount>7</d3p1:LoanedAmount>
      <d3p1:PropertyType>4</d3p1:PropertyType>
      <d3p1:RepaymentType>FixedPayment</d3p1:RepaymentType>
      <d3p1:StartDate>2019-11-17T08:33:57.057125+01:00</d3p1:StartDate>
      <d3p1:Value>6</d3p1:Value>
      <d3p1:YearlyIntrest>8</d3p1:YearlyIntrest>
      <d3p1:Years>9</d3p1:Years>
    </Debt>
    <IntrestTotal>2</IntrestTotal>
  </DebtVM>
</ArrayOfDebtVM>