POST api/CalculatorDocuments

Generates a loan comparison PDF document from the provided calculator response model. Returns either a document ID (if saved) or the PDF file for download.

Request Information

URI Parameters

None.

Body Parameters

The calculator response model containing loan comparison data.

CalculatorDocumentRequest
NameDescriptionTypeAdditional information
LicenceKey

string

None.

LoanAmountBase

decimal number

None.

TermBase

integer

None.

TermUnitBase

string

None.

PaymentMethod

string

None.

ProductId

string

None.

ProductName

string

None.

ProductRate

string

None.

LoanRange

string

None.

TermRange

string

None.

PrintSave

PrintSave

None.

CompanyId

string

None.

SiteId

string

None.

BrandingDetails

BrandingDetails

None.

ClientDetails

CalculatorClientDetails

None.

AdviserName

string

None.

LenderName

string

None.

LenderProductReference

string

None.

IsValid

boolean

None.

MessageDetails

string

None.

PaymentDetailsVariances

Collection of PaymentDetailsVariances

None.

MultiTermPayments

MultiTermPayment

None.

MultiLoanPayments

MultiLoanPayment

None.

TermLoanAnalysis

Collection of MultiAnalysis

None.

Request Formats

application/json, text/json

Sample:
{
  "LicenceKey": "sample string 1",
  "LoanAmountBase": 2.0,
  "TermBase": 3,
  "TermUnitBase": "sample string 4",
  "PaymentMethod": "sample string 5",
  "ProductId": "sample string 6",
  "ProductName": "sample string 7",
  "ProductRate": "sample string 8",
  "LoanRange": "sample string 9",
  "TermRange": "sample string 10",
  "PrintSave": 0,
  "CompanyId": "sample string 11",
  "SiteId": "sample string 12",
  "BrandingDetails": {
    "HeaderImageBase64": "sample string 1",
    "HeaderImageType": 0
  },
  "ClientDetails": {
    "Applicant1Title": "sample string 1",
    "Applicant1TitleExtension": "sample string 2",
    "Applicant1Name": "sample string 3",
    "Applicant1FirstName": "sample string 4",
    "Applicant1LastName": "sample string 5",
    "Applicant1DateOfBirth": "sample string 6",
    "Applicant1Type": "sample string 7",
    "Applicant1EmploymentStatus": "sample string 8",
    "Applicant1BasicIncome": "sample string 9",
    "Applicant2Title": "sample string 10",
    "Applicant2TitleExtension": "sample string 11",
    "Applicant2Name": "sample string 12",
    "Applicant2FirstName": "sample string 13",
    "Applicant2LastName": "sample string 14",
    "Applicant2DateOfBirth": "sample string 15",
    "Applicant2Type": "sample string 16",
    "Applicant2EmploymentStatus": "sample string 17",
    "Applicant2BasicIncome": "sample string 18"
  },
  "AdviserName": "sample string 13",
  "LenderName": "sample string 14",
  "LenderProductReference": "sample string 15",
  "IsValid": true,
  "MessageDetails": "sample string 17",
  "PaymentDetailsVariances": [
    {
      "PaymentDetailsType": 0,
      "LoanTerm": 1,
      "LoanAmount": 2.0,
      "PaymentSchedule": [
        {
          "PaymentNumber": 1,
          "Date": "sample string 2",
          "Amount": 3.0,
          "InterestOnlyAmount": 4.0,
          "Interest": 5.0,
          "Repayment": 6.0,
          "Principal": 7.0,
          "TotalInterest": 8.0,
          "TotalRepayment": 9.0,
          "TotalCost": 10.0,
          "MonthlyRate": 11.0,
          "RateClass": 0
        },
        {
          "PaymentNumber": 1,
          "Date": "sample string 2",
          "Amount": 3.0,
          "InterestOnlyAmount": 4.0,
          "Interest": 5.0,
          "Repayment": 6.0,
          "Principal": 7.0,
          "TotalInterest": 8.0,
          "TotalRepayment": 9.0,
          "TotalCost": 10.0,
          "MonthlyRate": 11.0,
          "RateClass": 0
        }
      ],
      "InitialMonthlyPayment": 3.0,
      "TrueCost": 4.0,
      "TotalInterestPayable": 5.0,
      "RevertMonthlyPayment": 6.0
    },
    {
      "PaymentDetailsType": 0,
      "LoanTerm": 1,
      "LoanAmount": 2.0,
      "PaymentSchedule": [
        {
          "PaymentNumber": 1,
          "Date": "sample string 2",
          "Amount": 3.0,
          "InterestOnlyAmount": 4.0,
          "Interest": 5.0,
          "Repayment": 6.0,
          "Principal": 7.0,
          "TotalInterest": 8.0,
          "TotalRepayment": 9.0,
          "TotalCost": 10.0,
          "MonthlyRate": 11.0,
          "RateClass": 0
        },
        {
          "PaymentNumber": 1,
          "Date": "sample string 2",
          "Amount": 3.0,
          "InterestOnlyAmount": 4.0,
          "Interest": 5.0,
          "Repayment": 6.0,
          "Principal": 7.0,
          "TotalInterest": 8.0,
          "TotalRepayment": 9.0,
          "TotalCost": 10.0,
          "MonthlyRate": 11.0,
          "RateClass": 0
        }
      ],
      "InitialMonthlyPayment": 3.0,
      "TrueCost": 4.0,
      "TotalInterestPayable": 5.0,
      "RevertMonthlyPayment": 6.0
    }
  ],
  "MultiTermPayments": {
    "TermPayments": [
      {
        "Term": 1,
        "MonthlyPayment": 2.0,
        "MonthlyPaymentDifference": 3.0,
        "InterestDifference": 4.0,
        "TrueCost": 5.0
      },
      {
        "Term": 1,
        "MonthlyPayment": 2.0,
        "MonthlyPaymentDifference": 3.0,
        "InterestDifference": 4.0,
        "TrueCost": 5.0
      }
    ]
  },
  "MultiLoanPayments": {
    "LoanPayments": [
      {
        "LoanAmount": 1.0,
        "MonthlyPayment": 2.0,
        "MonthlyPaymentDifference": 3.0,
        "InterestDifference": 4.0,
        "TrueCost": 5.0
      },
      {
        "LoanAmount": 1.0,
        "MonthlyPayment": 2.0,
        "MonthlyPaymentDifference": 3.0,
        "InterestDifference": 4.0,
        "TrueCost": 5.0
      }
    ]
  },
  "TermLoanAnalysis": [
    {
      "Term": 1,
      "MultiAnalysisDetails": [
        {
          "LoanAmount": 1.0,
          "MonthlyPayment": 2.0,
          "TrueCost": 3.0
        },
        {
          "LoanAmount": 1.0,
          "MonthlyPayment": 2.0,
          "TrueCost": 3.0
        }
      ]
    },
    {
      "Term": 1,
      "MultiAnalysisDetails": [
        {
          "LoanAmount": 1.0,
          "MonthlyPayment": 2.0,
          "TrueCost": 3.0
        },
        {
          "LoanAmount": 1.0,
          "MonthlyPayment": 2.0,
          "TrueCost": 3.0
        }
      ]
    }
  ]
}

application/xml, text/xml

Sample:
<CalculatorDocumentRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Twenty7Tec.Common.Models.Calculator.Request">
  <IsValid xmlns="http://schemas.datacontract.org/2004/07/Twenty7Tec.Common.Models.Calculator.Response">true</IsValid>
  <MessageDetails xmlns="http://schemas.datacontract.org/2004/07/Twenty7Tec.Common.Models.Calculator.Response">sample string 17</MessageDetails>
  <MultiLoanPayments xmlns="http://schemas.datacontract.org/2004/07/Twenty7Tec.Common.Models.Calculator.Response">
    <LoanPayments>
      <LoanPayment>
        <InterestDifference>4</InterestDifference>
        <LoanAmount>1</LoanAmount>
        <MonthlyPayment>2</MonthlyPayment>
        <MonthlyPaymentDifference>3</MonthlyPaymentDifference>
        <TrueCost>5</TrueCost>
      </LoanPayment>
      <LoanPayment>
        <InterestDifference>4</InterestDifference>
        <LoanAmount>1</LoanAmount>
        <MonthlyPayment>2</MonthlyPayment>
        <MonthlyPaymentDifference>3</MonthlyPaymentDifference>
        <TrueCost>5</TrueCost>
      </LoanPayment>
    </LoanPayments>
  </MultiLoanPayments>
  <MultiTermPayments xmlns="http://schemas.datacontract.org/2004/07/Twenty7Tec.Common.Models.Calculator.Response">
    <TermPayments>
      <TermPayment>
        <InterestDifference>4</InterestDifference>
        <MonthlyPayment>2</MonthlyPayment>
        <MonthlyPaymentDifference>3</MonthlyPaymentDifference>
        <Term>1</Term>
        <TrueCost>5</TrueCost>
      </TermPayment>
      <TermPayment>
        <InterestDifference>4</InterestDifference>
        <MonthlyPayment>2</MonthlyPayment>
        <MonthlyPaymentDifference>3</MonthlyPaymentDifference>
        <Term>1</Term>
        <TrueCost>5</TrueCost>
      </TermPayment>
    </TermPayments>
  </MultiTermPayments>
  <PaymentDetailsVariances xmlns="http://schemas.datacontract.org/2004/07/Twenty7Tec.Common.Models.Calculator.Response">
    <PaymentDetailsVariances>
      <InitialMonthlyPayment>3</InitialMonthlyPayment>
      <PaymentSchedule>
        <MonthlyPayment>
          <Amount>3</Amount>
          <Date>sample string 2</Date>
          <Interest>5</Interest>
          <InterestOnlyAmount>4</InterestOnlyAmount>
          <MonthlyRate>11</MonthlyRate>
          <PaymentNumber>1</PaymentNumber>
          <Principal>7</Principal>
          <RateClass>Fixed</RateClass>
          <Repayment>6</Repayment>
          <TotalCost>10</TotalCost>
          <TotalInterest>8</TotalInterest>
          <TotalRepayment>9</TotalRepayment>
        </MonthlyPayment>
        <MonthlyPayment>
          <Amount>3</Amount>
          <Date>sample string 2</Date>
          <Interest>5</Interest>
          <InterestOnlyAmount>4</InterestOnlyAmount>
          <MonthlyRate>11</MonthlyRate>
          <PaymentNumber>1</PaymentNumber>
          <Principal>7</Principal>
          <RateClass>Fixed</RateClass>
          <Repayment>6</Repayment>
          <TotalCost>10</TotalCost>
          <TotalInterest>8</TotalInterest>
          <TotalRepayment>9</TotalRepayment>
        </MonthlyPayment>
      </PaymentSchedule>
      <RevertMonthlyPayment>6</RevertMonthlyPayment>
      <TotalInterestPayable>5</TotalInterestPayable>
      <TrueCost>4</TrueCost>
      <LoanAmount>2</LoanAmount>
      <LoanTerm>1</LoanTerm>
      <PaymentDetailsType>Standard</PaymentDetailsType>
    </PaymentDetailsVariances>
    <PaymentDetailsVariances>
      <InitialMonthlyPayment>3</InitialMonthlyPayment>
      <PaymentSchedule>
        <MonthlyPayment>
          <Amount>3</Amount>
          <Date>sample string 2</Date>
          <Interest>5</Interest>
          <InterestOnlyAmount>4</InterestOnlyAmount>
          <MonthlyRate>11</MonthlyRate>
          <PaymentNumber>1</PaymentNumber>
          <Principal>7</Principal>
          <RateClass>Fixed</RateClass>
          <Repayment>6</Repayment>
          <TotalCost>10</TotalCost>
          <TotalInterest>8</TotalInterest>
          <TotalRepayment>9</TotalRepayment>
        </MonthlyPayment>
        <MonthlyPayment>
          <Amount>3</Amount>
          <Date>sample string 2</Date>
          <Interest>5</Interest>
          <InterestOnlyAmount>4</InterestOnlyAmount>
          <MonthlyRate>11</MonthlyRate>
          <PaymentNumber>1</PaymentNumber>
          <Principal>7</Principal>
          <RateClass>Fixed</RateClass>
          <Repayment>6</Repayment>
          <TotalCost>10</TotalCost>
          <TotalInterest>8</TotalInterest>
          <TotalRepayment>9</TotalRepayment>
        </MonthlyPayment>
      </PaymentSchedule>
      <RevertMonthlyPayment>6</RevertMonthlyPayment>
      <TotalInterestPayable>5</TotalInterestPayable>
      <TrueCost>4</TrueCost>
      <LoanAmount>2</LoanAmount>
      <LoanTerm>1</LoanTerm>
      <PaymentDetailsType>Standard</PaymentDetailsType>
    </PaymentDetailsVariances>
  </PaymentDetailsVariances>
  <TermLoanAnalysis xmlns="http://schemas.datacontract.org/2004/07/Twenty7Tec.Common.Models.Calculator.Response">
    <MultiAnalysis>
      <MultiAnalysisDetails>
        <MultiAnalysisDetail>
          <LoanAmount>1</LoanAmount>
          <MonthlyPayment>2</MonthlyPayment>
          <TrueCost>3</TrueCost>
        </MultiAnalysisDetail>
        <MultiAnalysisDetail>
          <LoanAmount>1</LoanAmount>
          <MonthlyPayment>2</MonthlyPayment>
          <TrueCost>3</TrueCost>
        </MultiAnalysisDetail>
      </MultiAnalysisDetails>
      <Term>1</Term>
    </MultiAnalysis>
    <MultiAnalysis>
      <MultiAnalysisDetails>
        <MultiAnalysisDetail>
          <LoanAmount>1</LoanAmount>
          <MonthlyPayment>2</MonthlyPayment>
          <TrueCost>3</TrueCost>
        </MultiAnalysisDetail>
        <MultiAnalysisDetail>
          <LoanAmount>1</LoanAmount>
          <MonthlyPayment>2</MonthlyPayment>
          <TrueCost>3</TrueCost>
        </MultiAnalysisDetail>
      </MultiAnalysisDetails>
      <Term>1</Term>
    </MultiAnalysis>
  </TermLoanAnalysis>
  <AdviserName>sample string 13</AdviserName>
  <BrandingDetails>
    <HeaderImageBase64>sample string 1</HeaderImageBase64>
    <HeaderImageType>Jpeg</HeaderImageType>
  </BrandingDetails>
  <ClientDetails>
    <Applicant1BasicIncome>sample string 9</Applicant1BasicIncome>
    <Applicant1DateOfBirth>sample string 6</Applicant1DateOfBirth>
    <Applicant1EmploymentStatus>sample string 8</Applicant1EmploymentStatus>
    <Applicant1FirstName>sample string 4</Applicant1FirstName>
    <Applicant1LastName>sample string 5</Applicant1LastName>
    <Applicant1Name>sample string 3</Applicant1Name>
    <Applicant1Title>sample string 1</Applicant1Title>
    <Applicant1TitleExtension>sample string 2</Applicant1TitleExtension>
    <Applicant1Type>sample string 7</Applicant1Type>
    <Applicant2BasicIncome>sample string 18</Applicant2BasicIncome>
    <Applicant2DateOfBirth>sample string 15</Applicant2DateOfBirth>
    <Applicant2EmploymentStatus>sample string 17</Applicant2EmploymentStatus>
    <Applicant2FirstName>sample string 13</Applicant2FirstName>
    <Applicant2LastName>sample string 14</Applicant2LastName>
    <Applicant2Name>sample string 12</Applicant2Name>
    <Applicant2Title>sample string 10</Applicant2Title>
    <Applicant2TitleExtension>sample string 11</Applicant2TitleExtension>
    <Applicant2Type>sample string 16</Applicant2Type>
  </ClientDetails>
  <CompanyId>sample string 11</CompanyId>
  <LenderName>sample string 14</LenderName>
  <LenderProductReference>sample string 15</LenderProductReference>
  <LicenceKey>sample string 1</LicenceKey>
  <LoanAmountBase>2</LoanAmountBase>
  <LoanRange>sample string 9</LoanRange>
  <PaymentMethod>sample string 5</PaymentMethod>
  <PrintSave>Print</PrintSave>
  <ProductId>sample string 6</ProductId>
  <ProductName>sample string 7</ProductName>
  <ProductRate>sample string 8</ProductRate>
  <SiteId>sample string 12</SiteId>
  <TermBase>3</TermBase>
  <TermRange>sample string 10</TermRange>
  <TermUnitBase>sample string 4</TermUnitBase>
</CalculatorDocumentRequest>

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 'CalculatorDocumentRequest'.

Response Information

Resource Description

- 200 OK with a document ID or PDF file. - 400 BadRequest if the document generation fails. - 500 InternalServerError for general exceptions. - 501 NotImplemented if the model state is invalid.

HttpResponseMessage
NameDescriptionTypeAdditional information
Version

Version

None.

Content

HttpContent

None.

StatusCode

HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.