Skip to content

Update a loan

Request

Change the fields in the body and no other: a field you leave out is not written, not read back and not recalculated. Money is in whole cents and rates in basis points. The payment schedule, the SBA guarantee fee and the fee lines are recalculated only when a field they depend on is in the body.

stageId moves the loan to another stage of its product, by the rules of the banker portal. It needs actingBankerId. The move to Declined needs declineDetails and the move to Withdrawn needs withdrawDetails: both write the notice the bank sends. The request checks the move before it writes anything. If the fields in the same request are written and the move then fails, the fields stay written and the response is the error of the move.

Security
ApiKeyAuth
Path
idstringrequired
Headers
Idempotency-Keystring, <= 255 characters

Optional opaque key (e.g. a UUID) to make this write safely retryable. A replay with the same key returns the original response instead of repeating the side effect.

Bodyapplication/json
loanNumberstring or null
typestring
Enum:"business""personal"
productIdstring, non-empty

A product of the bank. A change of product applies the terms of the new product that the request does not send, and moves the loan to the matching stage of the new product.

purposestring or null
purposeNarrativestring or null
crmRecordNumberstring or null
documentRetentionRecordNumberstring or null
centsAmountinteger or null, [ 0 .. 9007199254740991 ]
centsDepositinteger or null, [ 0 .. 9007199254740991 ]
depositDispositionstring
Enum:"refunded""applied"
closingCostsModestring
Enum:"estimate""actual"
centsEstimatedClosingCostsinteger or null, [ 0 .. 9007199254740991 ]
monthsTerminteger or null, ( 0 .. 9007199254740991 ]
monthsInterestOnlyinteger or null, [ 0 .. 9007199254740991 ]
monthsReamortizationTerminteger or null, ( 0 .. 9007199254740991 ]
paymentFrequencystring or null
Enum:"weekly""biweekly""monthly""quarterly""semi-annual""annual""lump sum""irregular payments"
paymentTypestring or null
Enum:"ACH""Wire"
prepaymentPenaltyArray of objects

Replaces the tiers of the loan. An empty list means no penalty.

rateTypestring or null
Enum:"fixed""variable"
bpsFixedRateinteger or null, [ 0 .. 9007199254740991 ]
bpsSpreadRateinteger or null, [ 0 .. 9007199254740991 ]
bpsPrimeRateinteger or null, [ 0 .. 9007199254740991 ]

The prime rate of the loan. When you send rateBenchmarkId without it, the loan takes the current rate of that benchmark, as it does in the banker portal.

rateBenchmarkIdstring or null

An active benchmark from GET /rate-benchmarks.

rateDiscountIdstring or null

An active percentage discount from GET /rate-discounts.

applicationDatestring or null^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[...
closeDatestring or null^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[...
firstPaymentDatestring or null^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[...
maturityDatestring or null^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[...
initialDisbursementDatestring or null^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[...
firstRateChangeDatestring or null^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[...
branchIdstring or null

A branch from GET /branches.

purposeCodeIdstring or null

An active code from GET /reporting-codes.

classCodeIdstring or null

An active code from GET /reporting-codes.

productCodeIdstring or null

An active code from GET /reporting-codes.

concentrationCodeIdstring or null

An active code from GET /reporting-codes.

collateralCodeIdstring or null

An active code from GET /reporting-codes.

ecoaCodeIdstring or null

An active code from GET /reporting-codes.

brokerIdstring or null

The referring broker, from GET /brokers. Null: the bank originated the loan.

centsReferralFeeOverrideinteger or null, [ 0 .. 9007199254740991 ]
bpsReferralFeeOverrideinteger or null, [ 0 .. 10000 ]

A rate wins over an amount: sending one clears the other.

referralFeePaidBystring or null
Enum:"bank""customer"
centsPackagingFeeOverrideinteger or null, [ 0 .. 9007199254740991 ]
bpsPackagingFeeOverrideinteger or null, [ 0 .. 10000 ]

A rate wins over an amount: sending one clears the other.

packagingFeePaidBystring or null
Enum:"bank""customer"
sbaDetailsobject
stageIdstring, non-empty

Move the loan to this stage (a substage of GET /products/{id}), by the same rules as the banker portal. Needs actingBankerId. The stage named Declined needs declineDetails, and Withdrawn needs withdrawDetails. status follows the stage. Do not send it with productId.

advancementReasonstring, non-empty

Why the loan moves forward. Required when the move takes the loan out of Prequalify and no decision or approval recorded a reason.

declineDetailsobject
withdrawDetailsobject
actingBankerIdstring, non-empty

The banker who moves the loan: an id from GET /bankers. The banker decides what the move may do (an admin can reopen a declined loan), and the history names the banker.

curl -i -X PATCH \
  'https://api.pioneerft.com/api/public/v1/loans/{id}' \
  -H 'Authorization: Bearer <YOUR_API Key_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: string' \
  -d '{
    "loanNumber": "string",
    "type": "business",
    "productId": "string",
    "purpose": "string",
    "purposeNarrative": "string",
    "crmRecordNumber": "string",
    "documentRetentionRecordNumber": "string",
    "centsAmount": 0,
    "centsDeposit": 0,
    "depositDisposition": "refunded",
    "closingCostsMode": "estimate",
    "centsEstimatedClosingCosts": 0,
    "monthsTerm": 1,
    "monthsInterestOnly": 0,
    "monthsReamortizationTerm": 1,
    "paymentFrequency": "weekly",
    "paymentType": "ACH",
    "prepaymentPenalty": [
      {
        "year": -9007199254740991,
        "bpsRate": -9007199254740991
      }
    ],
    "rateType": "fixed",
    "bpsFixedRate": 0,
    "bpsSpreadRate": 0,
    "bpsPrimeRate": 0,
    "rateBenchmarkId": "string",
    "rateDiscountId": "string",
    "applicationDate": "string",
    "closeDate": "string",
    "firstPaymentDate": "string",
    "maturityDate": "string",
    "initialDisbursementDate": "string",
    "firstRateChangeDate": "string",
    "branchId": "string",
    "purposeCodeId": "string",
    "classCodeId": "string",
    "productCodeId": "string",
    "concentrationCodeId": "string",
    "collateralCodeId": "string",
    "ecoaCodeId": "string",
    "brokerId": "string",
    "centsReferralFeeOverride": 0,
    "bpsReferralFeeOverride": 0,
    "referralFeePaidBy": "bank",
    "centsPackagingFeeOverride": 0,
    "bpsPackagingFeeOverride": 0,
    "packagingFeePaidBy": "bank",
    "sbaDetails": {
      "processingMethod": "PLP",
      "approvalNumber": "string",
      "submittedToSbaDate": "string",
      "sbaApprovalDate": "string",
      "centsGuaranteeFeeOverride": 0,
      "guaranteeFeeOverrideReason": "string",
      "guaranteeFeeFinanced": true,
      "secondaryMarketSold": true
    },
    "stageId": "string",
    "advancementReason": "string",
    "declineDetails": {
      "reasonCode": "string",
      "reasonCodes": [
        "string"
      ],
      "internalTrackingCode": "string",
      "additionalDetails": ""
    },
    "withdrawDetails": {
      "reasonCode": "string",
      "additionalDetails": ""
    },
    "actingBankerId": "string"
  }'

Responses

The loan after the write, as GET /loans/{id} returns it

Bodyapplication/json
dataobject(PublicLoan)
Response
{ "data": { "id": "string", "loanNumber": "string", "status": "draft", "type": "business", "centsAmount": -9007199254740991, "centsMonthlyPayment": -9007199254740991, "monthsTerm": -9007199254740991, "monthsInterestOnly": -9007199254740991, "paymentFrequency": "weekly", "rateType": "fixed", "bpsRate": -9007199254740991, "bpsFixedRate": -9007199254740991, "bpsPrimeRate": -9007199254740991, "bpsSpreadRate": -9007199254740991, "rateDiscount": { "id": "string", "name": "string", "bpsRate": -9007199254740991 }, "borrowerName": "string", "purpose": "string", "purposeNarrative": "string", "applicationDate": "string", "closeDate": "string", "maturityDate": "string", "firstPaymentDate": "string", "product": { "id": "string", "name": "string" }, "stage": { "id": "string", "name": "string", "parent": { "id": "string", "name": "string" } }, "createdAt": "string", "updatedAt": "string", "centsDeposit": -9007199254740991, "depositDisposition": "refunded", "closingCostsMode": "estimate", "centsEstimatedClosingCosts": -9007199254740991, "monthsReamortizationTerm": -9007199254740991, "paymentType": "ACH", "prepaymentPenalty": [ { "year": -9007199254740991, "bpsRate": -9007199254740991 } ], "rateBenchmarkId": "string", "effectiveRateBenchmark": { "id": "string", "code": "string", "name": "string", "coreCode": "string", "bpsRate": -9007199254740991, "isActive": true }, "initialDisbursementDate": "string", "firstRateChangeDate": "string", "crmRecordNumber": "string", "documentRetentionRecordNumber": "string", "centsReferralFeeOverride": -9007199254740991, "bpsReferralFeeOverride": -9007199254740991, "referralFeePaidBy": "bank", "centsPackagingFeeOverride": -9007199254740991, "bpsPackagingFeeOverride": -9007199254740991, "packagingFeePaidBy": "bank", "centsInterestOnlyPayment": -9007199254740991, "centsAmortizingPayment": -9007199254740991, "interestMethod": "30/360", "yearBase": "Actual/365 Payments P&I", "ratePeriods": [ { "phaseName": "string", "monthsLength": -9007199254740991, "rateKind": "fixed", "rateBenchmarkId": "string", "monthsAdjustment": -9007199254740991 } ], "paymentSchedule": [ { "segmentType": "Interest Only", "numberOfPayments": -9007199254740991, "firstPaymentDate": "string", "centsPayment": -9007199254740991 } ], "metrics": { "hasOpenTasks": true, "hasMessages": true, "bpsGrossLtv": 0, "bpsNetLtv": 0 }, "loanTeam": [ { "role": { "id": "string", "name": "string", "label": "string" }, "banker": { "id": "string", "name": "string", "lastName": "string", "email": "string" } } ], "sbaDetails": { "program": "SBA_7A", "programLabel": "string", "processingMethod": "PLP", "processingMethodIsDefault": true, "approvalNumber": "string", "submittedToSbaDate": "string", "sbaApprovalDate": "string", "bpsGuarantee": -9007199254740991, "centsGuaranteeAmount": -9007199254740991, "centsGuaranteeFee": -9007199254740991, "centsGuaranteeFeeOverride": -9007199254740991, "guaranteeFeeOverrideReason": "string", "centsEffectiveGuaranteeFee": -9007199254740991, "bpsGuaranteeFeeRate": -9007199254740991, "waiverReason": "string", "feeScheduleFiscalYear": -9007199254740991, "feeNoticeReference": "string", "appliedRuleNames": [ "string" ], "guaranteeFeeFinanced": true, "secondaryMarketSold": true }, "referralSource": { "company": { "id": "string", "name": "string" }, "broker": { "id": "string", "name": "string", "lastName": "string", "email": "string", "phone": "string" }, "feesFrozen": true, "referralFee": { "centsAmount": -9007199254740991, "feeType": "flat", "bpsRate": -9007199254740991, "paidBy": "bank", "isOverridden": true }, "packagingFee": { "centsAmount": -9007199254740991, "feeType": "flat", "bpsRate": -9007199254740991, "paidBy": "bank", "isOverridden": true } }, "reporting": { "branch": { "id": "string", "name": "string" }, "codes": [ { "type": "ecoa", "id": "string", "code": "string", "label": "string", "active": true } ], "flexFieldCode": "string" }, "useOfProceeds": { "centsProjectCost": -9007199254740991, "centsRoundingPlug": -9007199254740991, "lineItems": [ { "name": "string", "label": "string", "centsProjectCost": -9007199254740991, "centsLoanAmount": -9007199254740991, "nonLoanFunding": [ { "source": "equity_injection", "centsAmount": -9007199254740991 } ], "isRefinance": true, "isGuaranteeFee": true, "isClosingCosts": true, "disbursementClass": "BORROWER", "source": "manual", "displayOrder": -9007199254740991, "notes": "string" } ] }, "credit": { "guarantors": [ { "person": { "id": "string", "firstName": "string", "lastName": "string" }, "hardPulls": [ { "id": "string", "pullType": "hard", "score": -9007199254740991, "bureauScores": [ {} ], "errors": [null], "notEntitled": true, "frozenBureaus": [null], "timeRun": "string", "fileId": "string" } ], "softPulls": [ { "id": "string", "pullType": "hard", "score": -9007199254740991, "bureauScores": [ {} ], "errors": [null], "notEntitled": true, "frozenBureaus": [null], "timeRun": "string", "fileId": "string" } ] } ], "authorization": { "date": "string", "recordedBy": { "type": "customer", "name": "string" }, "authorizedVia": [ "prequalify" ] } }, "dueDiligence": { "entities": [ { "type": "business", "id": "string", "name": "string", "roles": [ "string" ], "items": [ { "serviceId": "string", "name": "string", "integration": "docusign", "result": "string", "timeRun": "string", "fileId": "string" } ] } ] }, "uccFiling": { "configured": true, "filings": [ { "id": "string", "status": "string", "debtorName": "string", "filingState": "string", "collateralDescription": "string", "date": "string" } ] }, "amortization": { "summary": { "totalPayments": -9007199254740991, "centsTotalScheduled": -9007199254740991, "centsTotalInterest": -9007199254740991, "centsTotalPrincipal": -9007199254740991 }, "centsBalloonPayment": -9007199254740991, "calculatedAt": "string", "schedule": [ { "period": -9007199254740991, "date": "string", "centsPayment": -9007199254740991, "centsPrincipal": -9007199254740991, "centsInterest": -9007199254740991, "centsBalance": -9007199254740991 } ] } } }