Skip to content

Bulk Update Deals

Updates multiple deals in a single request by applying property-level changes. This endpoint uses Blooma's update engine to modify deal fields atomically.

Key Details

  • Request body contains itemsToUpdate[] — each item specifies a deal id and an array of updates[] with property (field name) and value (new value).
  • Only include properties that require changes — if no update is needed for a property, omit it from the request entirely.
  • Example: To update the deal state, provide {"property": "State", "value": "Originated"}.
  • The update engine validates each change against business rules and field constraints. If any update fails, the response includes an errors[] array with errorType (IdNotFound, MissingMandatoryField, IllegalValue) and fieldName.
  • Successfully updated deals are returned in the updatedEntities[] array.
  • All updates are processed atomically per deal — either all updates for a given deal succeed, or none are applied.
  • Useful for batch state changes, owner reassignments, or risk rating updates across multiple deals.

Property Value Reference

The value field format depends on the selected property. Each property is listed below with its expected value type and accepted values.

State string(enum)

Available enum values: NewDeal, Originated, Completed, Rejected, Prep

Owner string

Blooma user ID (email address) of the deal owner. Must be an existing Blooma user.

LoanType string(enum)

Available enum values: Unknown, Acquisition, Acquisition_Construction, Refinance, Refinance_Construction, Construction, Stabilization, Bridge, Permanent

Status string

Pre-defined configurable set of available statuses per state

Priority string(enum)

Available enum values: Low, Medium, High

SeedName string

Display name for the deal

Note string

MainImageFileId string

Non-empty ID of the primary image file, must reference an uploaded file under the deal's files

ProjectTotalCost number(double)

GrossLoan number(double)

Current loan amount (unpaid principal balance for portfolio loans, or requested amount for pipeline deals), in USD

IsSyndicatedLoan boolean

ParticipationGrossLoan number(double)

Participation loan amount for syndicated loans, in USD

OriginatedLoanAmount number(double)

Original loan amount at time of origination, in USD

RateSpread number(double)

Percentage value between 0 and 100

LoanPaymentStructure string(enum)

Choosing P_I_Amortization requires a valid index rate, loan term, and amortization term where loan term cannot exceed amortization term.

Available enum values: InterestOnly, P_I_Amortization

IndexRate number(double)

Percentage value between 0 and 100

InterestRateFloor number(double)

Minimum interest rate floor for floating-rate loans. Percentage value between 0 and 100.

LoanTerm number(double)

Loan maturity term, in months

ExtensionTerm number(double)

AmortizationTerm number(double)

Loan amortization period, in months

Description string

LoanId string

Lender's internal loan identifier or tracking number

RateIndex string(enum)

Available enum values: WSJ_Prime, LIBOR_1_M, LIBOR_3_M, LIBOR_6_M, LIBOR_1_Y, LIBOR_5_T, FHLB_3_YR, FHLB_5_YR, FHLB_7_YR, T_WKLY_1_YR, TREAS_2_YR, TREAS_3_YR, TREAS_5_YR, TREAS_7_YR, TREAS_10_YR, SWAP_2_YR, SWAP_5_YR, SWAP_7_YR, SWAP_10_YR, CD_Rate, Fixed, SOFR, M_SOFR_TERM_1, DAY_SOFR_90, DAY_SOFR_180, AMERIBOR_Term_30, AVG_1M_SOFR

OriginationDate string(date)

Format: "2001-02-03"

ClosingDate string(date)

Format: "2001-02-03"

RiskRating string

Internal risk rating assigned to the loan (1-8 scale, lower numbers indicate lower risk)

ProfileName string

Must be one of the pre-defined profiles for deal scoring

UserSelectedLtv string(enum)

Available enum values: None, Alternative, Income, Sales

ClosedDate string(date)

Format: "2001-02-03"

UserDebtService number(double)

DebtServiceMethod string(enum)

Available enum values: Calculated, Manual

RequestedLoanAmount number(double)

CustomField1 string

Relevant only if a custom field 1 configuration is pre-defined

CustomField2 string

Relevant only if a custom field 2 configuration is pre-defined

LoansPackageId string

ID of the loans package this deal belongs to. Must be a valid loan package ID.

Request

Type: application/json

Schema: UpdateDealsRequestDto

itemsToUpdate array [ DealUpdateDto ]
id string

Identifier of the deal to update

updates array [ DealPropertyUpdateDto ]
property string(enum)

The deal field to update. Only include properties that require changes — omit any properties where no update is needed.

Available enum values: State, Owner, LoanType, Status, Priority, SeedName, Note, MainImageFileId, ProjectTotalCost, GrossLoan, IsSyndicatedLoan, ParticipationGrossLoan, OriginatedLoanAmount, RateSpread, LoanPaymentStructure, IndexRate, InterestRateFloor, LoanTerm, ExtensionTerm, AmortizationTerm, Description, LoanId, RateIndex, OriginationDate, ClosingDate, RiskRating, ProfileName, UserSelectedLtv, ClosedDate, UserDebtService, DebtServiceMethod, RequestedLoanAmount, CustomField1, CustomField2, LoansPackageId

value string

The new value for the specified property. The expected format depends on the selected property — refer to Bulk Update Deals for accepted value types per property.

Response

Status: 200

Type: application/json

Schema: UpdateDealsResponseDto

success boolean

Indicates whether the API request completed successfully

error ErrorDto
target string

Field or parameter that caused the error

code string(enum)

Error code (e.g., Duplicated, MissingMandatoryField, InvalidCreateValues, MissingEntity)

Available enum values: Duplicated, MissingMandatoryField, InvalidCreateValues, Existing, ValidationError, MissingEntity

message string

details array [ ErrorDto ]
errors array [ UpdateEngineError ]
id string

Identifier of the entity that failed to update

operation string(enum)

Available enum values: Create, Update, Delete

errorType string(enum)

Type of update error (e.g., IdNotFound, MissingMandatoryField, IllegalValue)

Available enum values: IdNotFound, MissingMandatoryField, IllegalValue

description string

fieldName string

updatedEntities array [ string ]

PATCH
/api/apiGateway/bulkUpdateDeals
Request Body
{
  "itemsToUpdate": [
    {
      "id": "string",
      "updates": [
        {
          "property": "State",
          "value": "string"
        }
      ]
    }
  ]
}
Response
{
  "success": true,
  "error": {
    "target": "string",
    "code": "Duplicated",
    "message": "string",
    "details": [
      {}
    ]
  },
  "errors": [
    {
      "id": "string",
      "operation": "Create",
      "errorType": "IdNotFound",
      "description": "string",
      "fieldName": "string"
    }
  ],
  "updatedEntities": [
    "string"
  ]
}