> For the complete documentation index, see [llms.txt](https://api-docs.hengelending.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-docs.hengelending.com/api/api-reference/conditions.md). Agents can also search and read this documentation through its [MCP server](https://api-docs.hengelending.com/~gitbook/mcp).

# Conditions

A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.

`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.

**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`

## Lists the conditions of a loan application, each with the requests under it.

> \*\*Required scope:\*\* \`read:loan-applications\`\
> \
> Replaces GET {id}/tasks. Hidden conditions are listed for admin applications only, internal notes are> \
> never returned, and a document kept internal is withheld.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"GetLoanAppConditionsResponse":{"type":"object","properties":{"loanApplicationId":{"type":"string","description":"The loan application id (GUID).","format":"uuid"},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/LoanApplicationConditionItem"},"description":"The loan's conditions, each with the requests under it.","nullable":true},"sourceLoanApplicationId":{"type":"string","description":"Set only for a sandbox loan, which has no conditions of its own: the loan to read them on.","format":"uuid","nullable":true}},"additionalProperties":false},"LoanApplicationConditionItem":{"type":"object","properties":{"conditionDocType":{"type":"string","description":"The document type the condition asks for, by name; null when it has none.","nullable":true},"conditionDocFolder":{"type":"string","description":"The LOS folder of that document type, for example BORROWER.","nullable":true},"suggestedTaskTypeId":{"type":"string","description":"The task type a new task under this condition most likely has: the default type of the task\r\nitems whose default loan document type is `conditionDocType`. Null when the doc\r\ntype is missing, unknown in its folder, maps to no task item that can be created manually, or maps to\r\nitems of different types. The create-task form prefills Type from it.","format":"uuid","nullable":true},"internalNotes":{"type":"string","description":"The underwriters' and processors' running note on the condition, as written. Never shown to a borrower, and null unless the caller may read internal notes.","nullable":true},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/LoanApplicationTaskItem"},"description":"The requests under the condition, each with its status and documents.","nullable":true},"id":{"type":"string","description":"Id of the task or condition (GUID).","format":"uuid","nullable":true},"taskStatusTimestamp":{"type":"string","description":"When the task's status last changed (ISO 8601 date and time, UTC).","format":"date-time","nullable":true},"updatedTimestamp":{"type":"string","description":"When the task was last changed (ISO 8601 date and time, UTC).","format":"date-time"},"createdTimestamp":{"type":"string","description":"When the task was created (ISO 8601 date and time, UTC).","format":"date-time"},"item":{"$ref":"#/components/schemas/Item"},"assignedToBorrowerId":{"type":"string","description":"Id (GUID) of the borrower the task is assigned to. Null for a user task or a task for the loan's borrowers generally.","format":"uuid","nullable":true},"status":{"$ref":"#/components/schemas/TaskStatus"},"document":{"$ref":"#/components/schemas/Document"},"rejectionReasonNote":{"type":"string","description":"The reviewer's free-text note when the task's document was rejected.","nullable":true},"rejectionReason":{"$ref":"#/components/schemas/TaskRejectionReason"},"creditReportType":{"$ref":"#/components/schemas/PosCreditReportType"},"isForPrimaryBorrower":{"type":"boolean","description":"True when the task is for the primary borrower, false when it is for the co-borrower. Null when it is for neither in particular.","nullable":true},"isRequired":{"type":"boolean","description":"Whether the task must be completed before the file can move forward."},"isAccountMainTask":{"type":"boolean","description":"True for the main task of an asset account, the one that requests the account's statements."},"questionType":{"$ref":"#/components/schemas/TaskQuestionType"},"yesNoResponse":{"type":"boolean","description":"The borrower's answer to a yes/no question task. Null until answered.","nullable":true},"shortAnswer":{"type":"string","description":"The borrower's answer to a short-answer question task. Null until answered.","nullable":true},"assignedToUser":{"$ref":"#/components/schemas/LoanAppUser"},"name":{"type":"string","description":"Display name of the task or condition.","nullable":true},"description":{"type":"string","description":"Description of the task. For a condition, the condition text: the reworded text when staff edited it in Henge, otherwise the LOS text.","nullable":true},"displayOrder":{"type":"integer","description":"Position of the task among its siblings, lowest first.","format":"int32","nullable":true},"type":{"$ref":"#/components/schemas/TaskType"},"code":{"type":"string","description":"Short code of the task.","nullable":true},"conditionNo":{"type":"integer","description":"Condition number in the LOS. Conditions only.","format":"int32","nullable":true},"conditionCategory":{"type":"string","description":"Category of the condition in the LOS. Conditions only.","nullable":true},"conditionDueDate":{"type":"string","description":"Due date of the condition (ISO 8601 date). Conditions only.","format":"date","nullable":true},"conditionAssignedUserFullName":{"type":"string","description":"Full name of the user the condition is assigned to in the LOS. Conditions only.","nullable":true},"conditionBorrowerFullName":{"type":"string","description":"Full name of the borrower the condition is for. Conditions only.","nullable":true},"conditionIsHidden":{"type":"boolean","description":"True when the condition is hidden from the borrower. Staff roles still see it; a caller that receives a hidden condition is entitled to it.","nullable":true},"conditionSourceText":{"type":"string","description":"The LOS's original condition text. Set only when staff reworded the condition in Henge, in which case description carries the rewording; null otherwise.","nullable":true},"isConditionTextEdited":{"type":"boolean","description":"True when staff reworded this condition in Henge. The rewording is never sent to the LOS."},"notes":{"type":"string","description":"Notes on the task or condition.","nullable":true},"taskAssignmentType":{"$ref":"#/components/schemas/TaskAssignmentType"},"isSubscribed":{"type":"boolean","description":"Whether the calling user is subscribed to status-change notifications for this task. Null when not computed.","nullable":true},"conditionTaskId":{"type":"string","description":"Id (GUID) of the condition this task belongs to. Null on conditions and on standalone tasks. Read on create; ignored on update.","format":"uuid","nullable":true},"assetAccountId":{"type":"string","description":"Id (GUID) of the asset account the task belongs to, if any. Needed on create only for a Transaction History task; ignored on update.","format":"uuid","nullable":true},"assetAccountName":{"type":"string","description":"Name of the asset account the task belongs to. Response only, and filled only where the response includes accounts.","nullable":true},"creditReportNumber":{"type":"string","description":"For credit report tasks, the credit agency's report number.","nullable":true},"requestTaskId":{"type":"string","description":"Id of the first task of the document request this task is a copy of (one task per document). Null on the first task itself. On create, naming any task of a request makes the new task a copy that joins that request.","format":"uuid","nullable":true},"requestedStartDate":{"type":"string","description":"Transaction History tasks only: the first day of the period the account activity must cover (ISO 8601 date).","format":"date","nullable":true},"requestedEndDate":{"type":"string","description":"Transaction History tasks only: the last day of the period the account activity must cover (ISO 8601 date).","format":"date","nullable":true},"ownerPairId":{"type":"string","description":"Id (GUID) of the borrower pair staff made the owner of this task or condition. Empty when the owner is worked out on read.","format":"uuid","nullable":true},"appliesToAllPairs":{"type":"boolean","description":"True for a whole-loan task or condition that every borrower pair sees."}},"additionalProperties":false,"description":"A condition on the loan, with the requests (tasks) under it. Conditions are kept in step with the LOS."},"LoanApplicationTaskItem":{"type":"object","properties":{"id":{"type":"string","description":"Id of the task or condition (GUID).","format":"uuid","nullable":true},"taskStatusTimestamp":{"type":"string","description":"When the task's status last changed (ISO 8601 date and time, UTC).","format":"date-time","nullable":true},"updatedTimestamp":{"type":"string","description":"When the task was last changed (ISO 8601 date and time, UTC).","format":"date-time"},"createdTimestamp":{"type":"string","description":"When the task was created (ISO 8601 date and time, UTC).","format":"date-time"},"item":{"$ref":"#/components/schemas/Item"},"assignedToBorrowerId":{"type":"string","description":"Id (GUID) of the borrower the task is assigned to. Null for a user task or a task for the loan's borrowers generally.","format":"uuid","nullable":true},"status":{"$ref":"#/components/schemas/TaskStatus"},"document":{"$ref":"#/components/schemas/Document"},"rejectionReasonNote":{"type":"string","description":"The reviewer's free-text note when the task's document was rejected.","nullable":true},"rejectionReason":{"$ref":"#/components/schemas/TaskRejectionReason"},"creditReportType":{"$ref":"#/components/schemas/PosCreditReportType"},"isForPrimaryBorrower":{"type":"boolean","description":"True when the task is for the primary borrower, false when it is for the co-borrower. Null when it is for neither in particular.","nullable":true},"isRequired":{"type":"boolean","description":"Whether the task must be completed before the file can move forward."},"isAccountMainTask":{"type":"boolean","description":"True for the main task of an asset account, the one that requests the account's statements."},"questionType":{"$ref":"#/components/schemas/TaskQuestionType"},"yesNoResponse":{"type":"boolean","description":"The borrower's answer to a yes/no question task. Null until answered.","nullable":true},"shortAnswer":{"type":"string","description":"The borrower's answer to a short-answer question task. Null until answered.","nullable":true},"assignedToUser":{"$ref":"#/components/schemas/LoanAppUser"},"name":{"type":"string","description":"Display name of the task or condition.","nullable":true},"description":{"type":"string","description":"Description of the task. For a condition, the condition text: the reworded text when staff edited it in Henge, otherwise the LOS text.","nullable":true},"displayOrder":{"type":"integer","description":"Position of the task among its siblings, lowest first.","format":"int32","nullable":true},"type":{"$ref":"#/components/schemas/TaskType"},"code":{"type":"string","description":"Short code of the task.","nullable":true},"conditionNo":{"type":"integer","description":"Condition number in the LOS. Conditions only.","format":"int32","nullable":true},"conditionCategory":{"type":"string","description":"Category of the condition in the LOS. Conditions only.","nullable":true},"conditionDueDate":{"type":"string","description":"Due date of the condition (ISO 8601 date). Conditions only.","format":"date","nullable":true},"conditionAssignedUserFullName":{"type":"string","description":"Full name of the user the condition is assigned to in the LOS. Conditions only.","nullable":true},"conditionBorrowerFullName":{"type":"string","description":"Full name of the borrower the condition is for. Conditions only.","nullable":true},"conditionIsHidden":{"type":"boolean","description":"True when the condition is hidden from the borrower. Staff roles still see it; a caller that receives a hidden condition is entitled to it.","nullable":true},"conditionSourceText":{"type":"string","description":"The LOS's original condition text. Set only when staff reworded the condition in Henge, in which case description carries the rewording; null otherwise.","nullable":true},"isConditionTextEdited":{"type":"boolean","description":"True when staff reworded this condition in Henge. The rewording is never sent to the LOS."},"notes":{"type":"string","description":"Notes on the task or condition.","nullable":true},"taskAssignmentType":{"$ref":"#/components/schemas/TaskAssignmentType"},"isSubscribed":{"type":"boolean","description":"Whether the calling user is subscribed to status-change notifications for this task. Null when not computed.","nullable":true},"conditionTaskId":{"type":"string","description":"Id (GUID) of the condition this task belongs to. Null on conditions and on standalone tasks. Read on create; ignored on update.","format":"uuid","nullable":true},"assetAccountId":{"type":"string","description":"Id (GUID) of the asset account the task belongs to, if any. Needed on create only for a Transaction History task; ignored on update.","format":"uuid","nullable":true},"assetAccountName":{"type":"string","description":"Name of the asset account the task belongs to. Response only, and filled only where the response includes accounts.","nullable":true},"creditReportNumber":{"type":"string","description":"For credit report tasks, the credit agency's report number.","nullable":true},"requestTaskId":{"type":"string","description":"Id of the first task of the document request this task is a copy of (one task per document). Null on the first task itself. On create, naming any task of a request makes the new task a copy that joins that request.","format":"uuid","nullable":true},"requestedStartDate":{"type":"string","description":"Transaction History tasks only: the first day of the period the account activity must cover (ISO 8601 date).","format":"date","nullable":true},"requestedEndDate":{"type":"string","description":"Transaction History tasks only: the last day of the period the account activity must cover (ISO 8601 date).","format":"date","nullable":true},"ownerPairId":{"type":"string","description":"Id (GUID) of the borrower pair staff made the owner of this task or condition. Empty when the owner is worked out on read.","format":"uuid","nullable":true},"appliesToAllPairs":{"type":"boolean","description":"True for a whole-loan task or condition that every borrower pair sees."}},"additionalProperties":false,"description":"A task or condition on a loan: a document request, a question, a user task or a condition from the LOS."},"Item":{"type":"object","properties":{"id":{"type":"string","description":"Id of the item (GUID).","format":"uuid"},"code":{"type":"string","description":"Stable code of the item; send it as the item code when you create a task.","nullable":true},"name":{"type":"string","description":"Display name of the item.","nullable":true},"groupCode":{"type":"string","description":"Code of the condition group the item's tasks are shown under. Null means Other.","nullable":true},"canCreateManually":{"type":"boolean","description":"True when staff can create a task for this item by hand."},"canUploadDocument":{"type":"boolean","description":"True when a document can be uploaded against this item."}},"additionalProperties":false,"description":"A kind of request a task can ask for, such as a specific document."},"TaskStatus":{"type":"object","properties":{"id":{"type":"string","description":"Id of the status (GUID).","format":"uuid"},"code":{"type":"string","description":"Stable code of the status.","nullable":true},"name":{"type":"string","description":"Display name of the status.","nullable":true}},"additionalProperties":false,"description":"The status of a task, for example Requested, Uploaded, Submitted or Accepted."},"Document":{"type":"object","properties":{"id":{"type":"string","description":"Id (GUID) of the document.","format":"uuid"},"name":{"type":"string","description":"The document's file name.","nullable":true},"externalId":{"type":"string","description":"The document's id in the Loan Origination System; empty until it has been sent there.","nullable":true},"isPdfConversionComplete":{"type":"boolean","description":"True once an uploaded file has been converted to PDF and can be opened; false while conversion is still running."},"loanApplicationId":{"type":"string","description":"Id (GUID) of the loan the document belongs to.","format":"uuid","nullable":true},"loanApplicationTaskId":{"type":"string","description":"Id of the task or condition the document is attached to; null for a document uploaded straight to the loan.","format":"uuid","nullable":true},"blobName":{"type":"string","description":"The name the file is stored under. An internal storage key: download through the document routes rather than using it.","nullable":true},"createdTimestamp":{"type":"string","description":"When the document was created, in UTC (ISO 8601).","format":"date-time"},"updatedTimestamp":{"type":"string","description":"When the document was last changed, in UTC (ISO 8601).","format":"date-time"},"updatedBy":{"type":"string","description":"Id of the user who last changed the document; null when the change was automatic or unknown.","format":"uuid","nullable":true},"documentTypeId":{"type":"string","description":"Id of the platform's broad document category (such as a vault or task document). Not the loan document type, which is loanDocumentTypeId.","format":"uuid","nullable":true},"isVault":{"type":"boolean","description":"True when the document was uploaded straight to the loan's vault, false when it hangs off a\r\ntask, a condition or an asset account. Callers use it to decide what a user may do with the\r\ndocument: only a vault document can be deleted. Any document can be given a document type."},"loanDocumentTypeId":{"type":"string","description":"Id of the loan document type the document is filed under (from the loan document types list); null when it has none.","format":"uuid","nullable":true},"loanDocumentTypeName":{"type":"string","description":"Name of the loan document type; null when the document has none.","nullable":true},"loanDocumentTypeExternalId":{"type":"string","description":"The loan document type's id in the Loan Origination System.","nullable":true},"loanDocumentTypeFolderName":{"type":"string","description":"Name of the folder the loan document type belongs to; null when the document has no type.","nullable":true},"description":{"type":"string","description":"A free-text description of the document; may be empty.","nullable":true},"isDeleted":{"type":"boolean","description":"True when the document has been deleted. Deleted documents are normally left out of lists."},"isInternal":{"type":"boolean","description":"True for a staff-only document that is hidden from borrowers and partner applications."},"isObsolete":{"type":"boolean","description":"The LOS no longer considers this document active. It stays visible so users can still see\r\nit, but it is not current and is never pushed back to the LOS."},"isProtected":{"type":"boolean","description":"The LOS holds the document as Protected, locked there against edits and deletion. Set and\r\ncleared by Admin and Processor through the document status endpoints, or in the LOS itself."},"losStatus":{"$ref":"#/components/schemas/LoanDocumentLosStatus"},"title":{"type":"string","description":"The title shown for the document; may be empty, in which case the file name is shown.","nullable":true},"splitFromDocumentId":{"type":"string","description":"On a part of a split combined PDF: the id of the original document it was cut from. Null on every other document.","format":"uuid","nullable":true},"splitStartPage":{"type":"integer","description":"On a part of a split combined PDF: the first page of the original it holds. Null on every other document.","format":"int32","nullable":true},"splitEndPage":{"type":"integer","description":"On a part of a split combined PDF: the last page of the original it holds. Null on every other document.","format":"int32","nullable":true},"isUnsorted":{"type":"boolean","description":"True while the document was bulk-uploaded to the loan with no task and no type and nobody has\r\nsorted it. It is held out of the LOS until it is put on a task or given a type."},"hasNoFile":{"type":"boolean","description":"True for a staff-only entry the Loan Origination System holds with no file here (a non-PDF assigned to a condition): there is nothing to open, download or move."},"intakeStatus":{"type":"string","description":"NeedsPassword or Duplicate for a bulk-uploaded document that is held for that reason; null\r\notherwise. See DocumentIntakeStatuses.","nullable":true},"duplicateOfDocumentId":{"type":"string","description":"The existing document this one repeats, when IntakeStatus is Duplicate.","format":"uuid","nullable":true},"indexStatus":{"type":"string","description":"Whether the document's text is searchable: Indexed, Pending, Failed or NotSubmitted. Set by\r\nthe document lists for staff callers; null when it was not looked up, or the lookup failed.","nullable":true},"analysis":{"$ref":"#/components/schemas/DocumentAnalysisSummary"},"internalNotes":{"type":"string","description":"Staff-only internal notes on the document, verbatim from the Loan Origination System. Returned only to callers who may see internal notes; null for everyone else.","nullable":true}},"additionalProperties":false,"description":"A document on a loan: the file, the task or condition it is attached to, its type and its status."},"LoanDocumentLosStatus":{"enum":["Active","Protected","Obsolete","Rejected","Screened"],"type":"string","description":"A loan document's status, one value per document, set here or in the LOS and kept in step both ways. The names are the LOS's own; the app shows Active as Pending, Screened as Accepted and Obsolete as Deleted."},"DocumentAnalysisSummary":{"type":"object","properties":{"status":{"type":"string","description":"Pending, Completed, Failed or Skipped. Failed reads \"Not analysed\".","nullable":true},"verdict":{"type":"string","description":"Whether the document is what was asked for: Matches, Mismatch, Unreadable or Unknown.","nullable":true},"reasonCode":{"type":"string","description":"On a Mismatch, why: WrongDocument, WrongPeriod, WrongAccount, WrongBorrower, MissingPages or Expired. On an Unreadable verdict from the page quality check, UnreadablePages.","nullable":true},"reason":{"type":"string","description":"One line in plain language explaining the verdict, written for the borrower.","nullable":true},"suggestedRejectionReasonCode":{"type":"string","description":"The seeded TaskRejectionReason code the panel pre-selects for a Mismatch.","nullable":true},"suggestedTaskId":{"type":"string","description":"Id of the task or condition the document appears to belong to; null when none matched.","format":"uuid","nullable":true},"suggestedTaskName":{"type":"string","description":"Name of the suggested task or condition.","nullable":true},"isOnSuggestedTask":{"type":"boolean","description":"False when the document sits on a different task than the best match: shown for confirmation."},"matchConfidence":{"type":"number","description":"How sure the analysis is of the suggested task, from 0 to 1.","format":"double","nullable":true},"suggestedLoanDocumentTypeId":{"type":"string","description":"Id of the loan document type the document looks like; null when not determined.","format":"uuid","nullable":true},"suggestedLoanDocumentTypeName":{"type":"string","description":"Name of the suggested loan document type.","nullable":true},"suggestedTitle":{"type":"string","description":"The title the analysis suggests for the document, built from what it read (for example the account and statement period).","nullable":true},"titleAppliedAutomatically":{"type":"boolean","description":"True when the document's current title was set by the analysis rather than by a person."},"previousTitle":{"type":"string","description":"The title the document had before the analysis renamed it; null when it was not renamed.","nullable":true},"autoNameDisabled":{"type":"boolean","description":"True when a person undid an automatic name; the analysis never renames this document again."},"filedByType":{"type":"boolean","description":"Filed under the suggested LOS type and folder by the analysis, for a person to confirm or correct."},"duplicateOfDocumentId":{"type":"string","description":"Id of an earlier document on the loan with the same content, when this one repeats it; otherwise null.","format":"uuid","nullable":true},"supersedesDocumentId":{"type":"string","description":"Id of an earlier document this one replaces (a newer version of the same document); otherwise null.","format":"uuid","nullable":true},"supersededByDocumentId":{"type":"string","description":"Id of a newer document that replaces this one; otherwise null.","format":"uuid","nullable":true},"outcome":{"type":"string","description":"What a person did with the suggestion: Confirmed, Corrected, Rejected or Ignored; null while no one has acted.","nullable":true},"outcomeAt":{"type":"string","description":"When the person acted on the suggestion, in UTC (ISO 8601); null while no one has.","format":"date-time","nullable":true},"coveredPeriods":{"type":"array","items":{"type":"string"},"description":"For a request that needs a span of statements, the months the uploaded documents cover, each formatted yyyy-MM.","nullable":true},"missingPeriods":{"type":"array","items":{"type":"string"},"description":"The requested months no uploaded document covers yet, each formatted yyyy-MM.","nullable":true},"monthsMissing":{"type":"integer","description":"How many months of the request are still missing.","format":"int32","nullable":true},"analyzedAt":{"type":"string","description":"When the analysis was done, in UTC (ISO 8601).","format":"date-time"},"splitSuggestion":{"$ref":"#/components/schemas/SplitSuggestion"},"pageIssues":{"type":"array","items":{"$ref":"#/components/schemas/PageIssue"},"description":"The pages the quality check flagged, which the Unreadable-page request names.","nullable":true}},"additionalProperties":false,"description":"What the document review shows for a document: the suggested task, type and title, the verdict and whether the title was applied automatically. The evidence and page text the analysis read are not included."},"SplitSuggestion":{"type":"object","properties":{"pageCount":{"type":"integer","description":"Number of pages in the PDF that was analysed.","format":"int32"},"parts":{"type":"array","items":{"$ref":"#/components/schemas/SplitPartRange"},"description":"The suggested page ranges, one per document found.","nullable":true},"reason":{"type":"string","description":"The segmenter's account of why, e.g. \"3 document(s) across 12 page(s)\".","nullable":true}},"additionalProperties":false,"description":"The split suggested for a PDF that holds several documents and was not split on upload. Nothing changes until a person accepts it."},"SplitPartRange":{"type":"object","properties":{"startPage":{"type":"integer","description":"First page of the run, counting from 1.","format":"int32"},"endPage":{"type":"integer","description":"Last page of the run, inclusive.","format":"int32"},"loanDocumentTypeId":{"type":"string","description":"What the segmenter took the run to be, for the suggestion only. Never trusted when splitting.","format":"uuid","nullable":true},"loanDocumentTypeName":{"type":"string","description":"Name of the document type the run was taken to be, for the suggestion only.","nullable":true}},"additionalProperties":false,"description":"One run of pages of a combined PDF that is one document. 1-based, inclusive."},"PageIssue":{"type":"object","properties":{"page":{"type":"integer","description":"The page the issue is on, starting at 1.","format":"int32"},"kind":{"type":"string","description":"The problem found: Blank (no text), LowConfidence (scan quality too low to read reliably) or CutOff (text stops mid-sentence).","nullable":true}},"additionalProperties":false,"description":"A page the quality check flagged. 1-based, in the document the analysis read."},"TaskRejectionReason":{"type":"object","properties":{"id":{"type":"string","description":"Id of the rejection reason (GUID).","format":"uuid"},"name":{"type":"string","description":"Display name of the rejection reason.","nullable":true},"code":{"type":"string","description":"Stable code of the rejection reason.","nullable":true},"displayOrder":{"type":"integer","description":"Position of the reason in lists, lowest first.","format":"int32","nullable":true}},"additionalProperties":false,"description":"A reason a reviewer gives for rejecting a task's document."},"PosCreditReportType":{"type":"object","properties":{"id":{"type":"string","description":"Id of the report type (GUID).","format":"uuid","nullable":true},"code":{"type":"string","description":"Stable code of the report type.","nullable":true},"name":{"type":"string","description":"Display name of the report type.","nullable":true}},"additionalProperties":false,"description":"The type of credit report a credit report task asks for."},"TaskQuestionType":{"type":"object","properties":{"id":{"type":"string","description":"Id of the question type (GUID).","format":"uuid"},"name":{"type":"string","description":"Display name of the question type.","nullable":true},"code":{"type":"string","description":"Stable code of the question type.","nullable":true},"displayOrder":{"type":"integer","description":"Position of the question type in lists, lowest first.","format":"int32","nullable":true}},"additionalProperties":false,"description":"For a question task, the kind of answer it asks for, such as yes/no or a short answer."},"LoanAppUser":{"type":"object","properties":{"id":{"type":"string","description":"Id of the user (GUID).","format":"uuid"},"firstName":{"type":"string","description":"The user's first name.","nullable":true},"lastName":{"type":"string","description":"The user's last name.","nullable":true}},"additionalProperties":false,"description":"A user, such as the staff member a task is assigned to."},"TaskType":{"type":"object","properties":{"id":{"type":"string","description":"Id of the task type (GUID).","format":"uuid"},"code":{"type":"string","description":"Stable code of the task type.","nullable":true},"name":{"type":"string","description":"Display name of the task type.","nullable":true}},"additionalProperties":false,"description":"The kind of task."},"TaskAssignmentType":{"type":"object","properties":{"id":{"type":"string","description":"Id of the assignment type (GUID).","format":"uuid"},"code":{"type":"string","description":"Stable code of the assignment type.","nullable":true},"name":{"type":"string","description":"Display name of the assignment type.","nullable":true}},"additionalProperties":false,"description":"Who a task is assigned to: a borrower or a user."},"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/conditions":{"get":{"tags":["Conditions"],"summary":"Lists the conditions of a loan application, each with the requests under it.","description":"**Required scope:** `read:loan-applications`\n\nReplaces GET {id}/tasks. Hidden conditions are listed for admin applications only, internal notes are\r\nnever returned, and a document kept internal is withheld.","operationId":"LoanApplicationConditions_GetLoanApplicationConditions","parameters":[{"name":"id","in":"path","description":"The unique identifier of the loan application.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Loan application conditions retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLoanAppConditionsResponse"}}}},"400":{"description":"Invalid identifier","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Missing, invalid or expired access token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The client application is not authorized to access this resource","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan application not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Creates a request under a condition on the specified loan application.

> \*\*Required scope:\*\* \`create:loan-applications\`\
> \
> Replaces POST {id}/tasks. The response names the condition the request sits under, which is the same id> \
> before and after the loan is submitted; a request that sits under no condition (a form) answers its own id,> \
> as type LoanApplicationTask.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CreateLoanApplicationTaskRequest":{"required":["item","name","type"],"type":"object","properties":{"conditionTaskId":{"type":"string","description":"Optional. The condition on this loan application that the new task belongs to.","format":"uuid","nullable":true},"assetAccountId":{"type":"string","description":"Required for a Transaction History task (item code TransactionHistory), ignored otherwise:\r\nthe asset account on this loan application whose activity is requested.","format":"uuid","nullable":true},"requestedStartDate":{"type":"string","description":"Required for a Transaction History task, ignored otherwise: the first day of the requested\r\nperiod. On or before requestedEndDate.","format":"date","nullable":true},"requestedEndDate":{"type":"string","description":"Required for a Transaction History task, ignored otherwise: the last day of the requested\r\nperiod. Not in the future.","format":"date","nullable":true},"name":{"type":"string","description":"Display name of the task."},"description":{"type":"string","description":"Description of the task, shown to whoever it is assigned to.","nullable":true},"item":{"$ref":"#/components/schemas/ItemRequest"},"type":{"$ref":"#/components/schemas/TaskTypeRequest"},"creditReportType":{"$ref":"#/components/schemas/CreditReportTypeRequest"}},"additionalProperties":false,"description":"A task to add to a loan application: a document request, a user task or a question. For a Transaction History item also send assetAccountId, requestedStartDate and requestedEndDate."},"ItemRequest":{"required":["id"],"type":"object","properties":{"id":{"type":"string","description":"Unique identifier (GUID) of the item.","format":"uuid"},"name":{"type":"string","description":"Display name of the item.","nullable":true}},"additionalProperties":false,"description":"A reference to an item a task is about, by id."},"TaskTypeRequest":{"required":["id"],"type":"object","properties":{"id":{"type":"string","description":"Id (GUID) of the task type, from the task types lookup.","format":"uuid"},"name":{"type":"string","description":"The task type's name.","nullable":true}},"additionalProperties":false,"description":"The type (task set) a task belongs to, chosen from the task types lookup."},"CreditReportTypeRequest":{"type":"object","properties":{"id":{"type":"string","description":"Id (GUID) of the credit report type, from the credit report types lookup.","format":"uuid"},"name":{"type":"string","description":"The credit report type's name.","nullable":true}},"additionalProperties":false,"description":"A credit report type (such as soft pull or hard pull), as listed by the credit report types lookup."},"Modified":{"required":["id"],"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the entity that was modified."},"type":{"type":"string","description":"A string indicating the type or category of the modified entity (e.g., “Webhook”, “LoanApplicationTask”).","nullable":true},"createdTimestamp":{"type":"string","description":"The timestamp when the entity was first created.","format":"date-time","nullable":true},"updatedTimestamp":{"type":"string","description":"The timestamp when the entity was last updated.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Represents an audit record for an entity that has been created or updated."},"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/conditions":{"post":{"tags":["Conditions"],"summary":"Creates a request under a condition on the specified loan application.","description":"**Required scope:** `create:loan-applications`\n\nReplaces POST {id}/tasks. The response names the condition the request sits under, which is the same id\r\nbefore and after the loan is submitted; a request that sits under no condition (a form) answers its own id,\r\nas type LoanApplicationTask.","operationId":"LoanApplicationConditions_CreateLoanApplicationCondition","parameters":[{"name":"id","in":"path","description":"The unique identifier of the loan application.","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"The request to create, as for POST {id}/tasks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLoanApplicationTaskRequest"}}}},"responses":{"200":{"description":"Loan application condition created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Modified"}}}},"400":{"description":"Invalid identifier or request payload","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Missing, invalid or expired access token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The client application is not authorized to perform this action","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan application not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Retrieves one condition of a loan application, with the requests under it.

> \*\*Required scope:\*\* \`read:loan-applications\`

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"LoanApplicationConditionItem":{"type":"object","properties":{"conditionDocType":{"type":"string","description":"The document type the condition asks for, by name; null when it has none.","nullable":true},"conditionDocFolder":{"type":"string","description":"The LOS folder of that document type, for example BORROWER.","nullable":true},"suggestedTaskTypeId":{"type":"string","description":"The task type a new task under this condition most likely has: the default type of the task\r\nitems whose default loan document type is `conditionDocType`. Null when the doc\r\ntype is missing, unknown in its folder, maps to no task item that can be created manually, or maps to\r\nitems of different types. The create-task form prefills Type from it.","format":"uuid","nullable":true},"internalNotes":{"type":"string","description":"The underwriters' and processors' running note on the condition, as written. Never shown to a borrower, and null unless the caller may read internal notes.","nullable":true},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/LoanApplicationTaskItem"},"description":"The requests under the condition, each with its status and documents.","nullable":true},"id":{"type":"string","description":"Id of the task or condition (GUID).","format":"uuid","nullable":true},"taskStatusTimestamp":{"type":"string","description":"When the task's status last changed (ISO 8601 date and time, UTC).","format":"date-time","nullable":true},"updatedTimestamp":{"type":"string","description":"When the task was last changed (ISO 8601 date and time, UTC).","format":"date-time"},"createdTimestamp":{"type":"string","description":"When the task was created (ISO 8601 date and time, UTC).","format":"date-time"},"item":{"$ref":"#/components/schemas/Item"},"assignedToBorrowerId":{"type":"string","description":"Id (GUID) of the borrower the task is assigned to. Null for a user task or a task for the loan's borrowers generally.","format":"uuid","nullable":true},"status":{"$ref":"#/components/schemas/TaskStatus"},"document":{"$ref":"#/components/schemas/Document"},"rejectionReasonNote":{"type":"string","description":"The reviewer's free-text note when the task's document was rejected.","nullable":true},"rejectionReason":{"$ref":"#/components/schemas/TaskRejectionReason"},"creditReportType":{"$ref":"#/components/schemas/PosCreditReportType"},"isForPrimaryBorrower":{"type":"boolean","description":"True when the task is for the primary borrower, false when it is for the co-borrower. Null when it is for neither in particular.","nullable":true},"isRequired":{"type":"boolean","description":"Whether the task must be completed before the file can move forward."},"isAccountMainTask":{"type":"boolean","description":"True for the main task of an asset account, the one that requests the account's statements."},"questionType":{"$ref":"#/components/schemas/TaskQuestionType"},"yesNoResponse":{"type":"boolean","description":"The borrower's answer to a yes/no question task. Null until answered.","nullable":true},"shortAnswer":{"type":"string","description":"The borrower's answer to a short-answer question task. Null until answered.","nullable":true},"assignedToUser":{"$ref":"#/components/schemas/LoanAppUser"},"name":{"type":"string","description":"Display name of the task or condition.","nullable":true},"description":{"type":"string","description":"Description of the task. For a condition, the condition text: the reworded text when staff edited it in Henge, otherwise the LOS text.","nullable":true},"displayOrder":{"type":"integer","description":"Position of the task among its siblings, lowest first.","format":"int32","nullable":true},"type":{"$ref":"#/components/schemas/TaskType"},"code":{"type":"string","description":"Short code of the task.","nullable":true},"conditionNo":{"type":"integer","description":"Condition number in the LOS. Conditions only.","format":"int32","nullable":true},"conditionCategory":{"type":"string","description":"Category of the condition in the LOS. Conditions only.","nullable":true},"conditionDueDate":{"type":"string","description":"Due date of the condition (ISO 8601 date). Conditions only.","format":"date","nullable":true},"conditionAssignedUserFullName":{"type":"string","description":"Full name of the user the condition is assigned to in the LOS. Conditions only.","nullable":true},"conditionBorrowerFullName":{"type":"string","description":"Full name of the borrower the condition is for. Conditions only.","nullable":true},"conditionIsHidden":{"type":"boolean","description":"True when the condition is hidden from the borrower. Staff roles still see it; a caller that receives a hidden condition is entitled to it.","nullable":true},"conditionSourceText":{"type":"string","description":"The LOS's original condition text. Set only when staff reworded the condition in Henge, in which case description carries the rewording; null otherwise.","nullable":true},"isConditionTextEdited":{"type":"boolean","description":"True when staff reworded this condition in Henge. The rewording is never sent to the LOS."},"notes":{"type":"string","description":"Notes on the task or condition.","nullable":true},"taskAssignmentType":{"$ref":"#/components/schemas/TaskAssignmentType"},"isSubscribed":{"type":"boolean","description":"Whether the calling user is subscribed to status-change notifications for this task. Null when not computed.","nullable":true},"conditionTaskId":{"type":"string","description":"Id (GUID) of the condition this task belongs to. Null on conditions and on standalone tasks. Read on create; ignored on update.","format":"uuid","nullable":true},"assetAccountId":{"type":"string","description":"Id (GUID) of the asset account the task belongs to, if any. Needed on create only for a Transaction History task; ignored on update.","format":"uuid","nullable":true},"assetAccountName":{"type":"string","description":"Name of the asset account the task belongs to. Response only, and filled only where the response includes accounts.","nullable":true},"creditReportNumber":{"type":"string","description":"For credit report tasks, the credit agency's report number.","nullable":true},"requestTaskId":{"type":"string","description":"Id of the first task of the document request this task is a copy of (one task per document). Null on the first task itself. On create, naming any task of a request makes the new task a copy that joins that request.","format":"uuid","nullable":true},"requestedStartDate":{"type":"string","description":"Transaction History tasks only: the first day of the period the account activity must cover (ISO 8601 date).","format":"date","nullable":true},"requestedEndDate":{"type":"string","description":"Transaction History tasks only: the last day of the period the account activity must cover (ISO 8601 date).","format":"date","nullable":true},"ownerPairId":{"type":"string","description":"Id (GUID) of the borrower pair staff made the owner of this task or condition. Empty when the owner is worked out on read.","format":"uuid","nullable":true},"appliesToAllPairs":{"type":"boolean","description":"True for a whole-loan task or condition that every borrower pair sees."}},"additionalProperties":false,"description":"A condition on the loan, with the requests (tasks) under it. Conditions are kept in step with the LOS."},"LoanApplicationTaskItem":{"type":"object","properties":{"id":{"type":"string","description":"Id of the task or condition (GUID).","format":"uuid","nullable":true},"taskStatusTimestamp":{"type":"string","description":"When the task's status last changed (ISO 8601 date and time, UTC).","format":"date-time","nullable":true},"updatedTimestamp":{"type":"string","description":"When the task was last changed (ISO 8601 date and time, UTC).","format":"date-time"},"createdTimestamp":{"type":"string","description":"When the task was created (ISO 8601 date and time, UTC).","format":"date-time"},"item":{"$ref":"#/components/schemas/Item"},"assignedToBorrowerId":{"type":"string","description":"Id (GUID) of the borrower the task is assigned to. Null for a user task or a task for the loan's borrowers generally.","format":"uuid","nullable":true},"status":{"$ref":"#/components/schemas/TaskStatus"},"document":{"$ref":"#/components/schemas/Document"},"rejectionReasonNote":{"type":"string","description":"The reviewer's free-text note when the task's document was rejected.","nullable":true},"rejectionReason":{"$ref":"#/components/schemas/TaskRejectionReason"},"creditReportType":{"$ref":"#/components/schemas/PosCreditReportType"},"isForPrimaryBorrower":{"type":"boolean","description":"True when the task is for the primary borrower, false when it is for the co-borrower. Null when it is for neither in particular.","nullable":true},"isRequired":{"type":"boolean","description":"Whether the task must be completed before the file can move forward."},"isAccountMainTask":{"type":"boolean","description":"True for the main task of an asset account, the one that requests the account's statements."},"questionType":{"$ref":"#/components/schemas/TaskQuestionType"},"yesNoResponse":{"type":"boolean","description":"The borrower's answer to a yes/no question task. Null until answered.","nullable":true},"shortAnswer":{"type":"string","description":"The borrower's answer to a short-answer question task. Null until answered.","nullable":true},"assignedToUser":{"$ref":"#/components/schemas/LoanAppUser"},"name":{"type":"string","description":"Display name of the task or condition.","nullable":true},"description":{"type":"string","description":"Description of the task. For a condition, the condition text: the reworded text when staff edited it in Henge, otherwise the LOS text.","nullable":true},"displayOrder":{"type":"integer","description":"Position of the task among its siblings, lowest first.","format":"int32","nullable":true},"type":{"$ref":"#/components/schemas/TaskType"},"code":{"type":"string","description":"Short code of the task.","nullable":true},"conditionNo":{"type":"integer","description":"Condition number in the LOS. Conditions only.","format":"int32","nullable":true},"conditionCategory":{"type":"string","description":"Category of the condition in the LOS. Conditions only.","nullable":true},"conditionDueDate":{"type":"string","description":"Due date of the condition (ISO 8601 date). Conditions only.","format":"date","nullable":true},"conditionAssignedUserFullName":{"type":"string","description":"Full name of the user the condition is assigned to in the LOS. Conditions only.","nullable":true},"conditionBorrowerFullName":{"type":"string","description":"Full name of the borrower the condition is for. Conditions only.","nullable":true},"conditionIsHidden":{"type":"boolean","description":"True when the condition is hidden from the borrower. Staff roles still see it; a caller that receives a hidden condition is entitled to it.","nullable":true},"conditionSourceText":{"type":"string","description":"The LOS's original condition text. Set only when staff reworded the condition in Henge, in which case description carries the rewording; null otherwise.","nullable":true},"isConditionTextEdited":{"type":"boolean","description":"True when staff reworded this condition in Henge. The rewording is never sent to the LOS."},"notes":{"type":"string","description":"Notes on the task or condition.","nullable":true},"taskAssignmentType":{"$ref":"#/components/schemas/TaskAssignmentType"},"isSubscribed":{"type":"boolean","description":"Whether the calling user is subscribed to status-change notifications for this task. Null when not computed.","nullable":true},"conditionTaskId":{"type":"string","description":"Id (GUID) of the condition this task belongs to. Null on conditions and on standalone tasks. Read on create; ignored on update.","format":"uuid","nullable":true},"assetAccountId":{"type":"string","description":"Id (GUID) of the asset account the task belongs to, if any. Needed on create only for a Transaction History task; ignored on update.","format":"uuid","nullable":true},"assetAccountName":{"type":"string","description":"Name of the asset account the task belongs to. Response only, and filled only where the response includes accounts.","nullable":true},"creditReportNumber":{"type":"string","description":"For credit report tasks, the credit agency's report number.","nullable":true},"requestTaskId":{"type":"string","description":"Id of the first task of the document request this task is a copy of (one task per document). Null on the first task itself. On create, naming any task of a request makes the new task a copy that joins that request.","format":"uuid","nullable":true},"requestedStartDate":{"type":"string","description":"Transaction History tasks only: the first day of the period the account activity must cover (ISO 8601 date).","format":"date","nullable":true},"requestedEndDate":{"type":"string","description":"Transaction History tasks only: the last day of the period the account activity must cover (ISO 8601 date).","format":"date","nullable":true},"ownerPairId":{"type":"string","description":"Id (GUID) of the borrower pair staff made the owner of this task or condition. Empty when the owner is worked out on read.","format":"uuid","nullable":true},"appliesToAllPairs":{"type":"boolean","description":"True for a whole-loan task or condition that every borrower pair sees."}},"additionalProperties":false,"description":"A task or condition on a loan: a document request, a question, a user task or a condition from the LOS."},"Item":{"type":"object","properties":{"id":{"type":"string","description":"Id of the item (GUID).","format":"uuid"},"code":{"type":"string","description":"Stable code of the item; send it as the item code when you create a task.","nullable":true},"name":{"type":"string","description":"Display name of the item.","nullable":true},"groupCode":{"type":"string","description":"Code of the condition group the item's tasks are shown under. Null means Other.","nullable":true},"canCreateManually":{"type":"boolean","description":"True when staff can create a task for this item by hand."},"canUploadDocument":{"type":"boolean","description":"True when a document can be uploaded against this item."}},"additionalProperties":false,"description":"A kind of request a task can ask for, such as a specific document."},"TaskStatus":{"type":"object","properties":{"id":{"type":"string","description":"Id of the status (GUID).","format":"uuid"},"code":{"type":"string","description":"Stable code of the status.","nullable":true},"name":{"type":"string","description":"Display name of the status.","nullable":true}},"additionalProperties":false,"description":"The status of a task, for example Requested, Uploaded, Submitted or Accepted."},"Document":{"type":"object","properties":{"id":{"type":"string","description":"Id (GUID) of the document.","format":"uuid"},"name":{"type":"string","description":"The document's file name.","nullable":true},"externalId":{"type":"string","description":"The document's id in the Loan Origination System; empty until it has been sent there.","nullable":true},"isPdfConversionComplete":{"type":"boolean","description":"True once an uploaded file has been converted to PDF and can be opened; false while conversion is still running."},"loanApplicationId":{"type":"string","description":"Id (GUID) of the loan the document belongs to.","format":"uuid","nullable":true},"loanApplicationTaskId":{"type":"string","description":"Id of the task or condition the document is attached to; null for a document uploaded straight to the loan.","format":"uuid","nullable":true},"blobName":{"type":"string","description":"The name the file is stored under. An internal storage key: download through the document routes rather than using it.","nullable":true},"createdTimestamp":{"type":"string","description":"When the document was created, in UTC (ISO 8601).","format":"date-time"},"updatedTimestamp":{"type":"string","description":"When the document was last changed, in UTC (ISO 8601).","format":"date-time"},"updatedBy":{"type":"string","description":"Id of the user who last changed the document; null when the change was automatic or unknown.","format":"uuid","nullable":true},"documentTypeId":{"type":"string","description":"Id of the platform's broad document category (such as a vault or task document). Not the loan document type, which is loanDocumentTypeId.","format":"uuid","nullable":true},"isVault":{"type":"boolean","description":"True when the document was uploaded straight to the loan's vault, false when it hangs off a\r\ntask, a condition or an asset account. Callers use it to decide what a user may do with the\r\ndocument: only a vault document can be deleted. Any document can be given a document type."},"loanDocumentTypeId":{"type":"string","description":"Id of the loan document type the document is filed under (from the loan document types list); null when it has none.","format":"uuid","nullable":true},"loanDocumentTypeName":{"type":"string","description":"Name of the loan document type; null when the document has none.","nullable":true},"loanDocumentTypeExternalId":{"type":"string","description":"The loan document type's id in the Loan Origination System.","nullable":true},"loanDocumentTypeFolderName":{"type":"string","description":"Name of the folder the loan document type belongs to; null when the document has no type.","nullable":true},"description":{"type":"string","description":"A free-text description of the document; may be empty.","nullable":true},"isDeleted":{"type":"boolean","description":"True when the document has been deleted. Deleted documents are normally left out of lists."},"isInternal":{"type":"boolean","description":"True for a staff-only document that is hidden from borrowers and partner applications."},"isObsolete":{"type":"boolean","description":"The LOS no longer considers this document active. It stays visible so users can still see\r\nit, but it is not current and is never pushed back to the LOS."},"isProtected":{"type":"boolean","description":"The LOS holds the document as Protected, locked there against edits and deletion. Set and\r\ncleared by Admin and Processor through the document status endpoints, or in the LOS itself."},"losStatus":{"$ref":"#/components/schemas/LoanDocumentLosStatus"},"title":{"type":"string","description":"The title shown for the document; may be empty, in which case the file name is shown.","nullable":true},"splitFromDocumentId":{"type":"string","description":"On a part of a split combined PDF: the id of the original document it was cut from. Null on every other document.","format":"uuid","nullable":true},"splitStartPage":{"type":"integer","description":"On a part of a split combined PDF: the first page of the original it holds. Null on every other document.","format":"int32","nullable":true},"splitEndPage":{"type":"integer","description":"On a part of a split combined PDF: the last page of the original it holds. Null on every other document.","format":"int32","nullable":true},"isUnsorted":{"type":"boolean","description":"True while the document was bulk-uploaded to the loan with no task and no type and nobody has\r\nsorted it. It is held out of the LOS until it is put on a task or given a type."},"hasNoFile":{"type":"boolean","description":"True for a staff-only entry the Loan Origination System holds with no file here (a non-PDF assigned to a condition): there is nothing to open, download or move."},"intakeStatus":{"type":"string","description":"NeedsPassword or Duplicate for a bulk-uploaded document that is held for that reason; null\r\notherwise. See DocumentIntakeStatuses.","nullable":true},"duplicateOfDocumentId":{"type":"string","description":"The existing document this one repeats, when IntakeStatus is Duplicate.","format":"uuid","nullable":true},"indexStatus":{"type":"string","description":"Whether the document's text is searchable: Indexed, Pending, Failed or NotSubmitted. Set by\r\nthe document lists for staff callers; null when it was not looked up, or the lookup failed.","nullable":true},"analysis":{"$ref":"#/components/schemas/DocumentAnalysisSummary"},"internalNotes":{"type":"string","description":"Staff-only internal notes on the document, verbatim from the Loan Origination System. Returned only to callers who may see internal notes; null for everyone else.","nullable":true}},"additionalProperties":false,"description":"A document on a loan: the file, the task or condition it is attached to, its type and its status."},"LoanDocumentLosStatus":{"enum":["Active","Protected","Obsolete","Rejected","Screened"],"type":"string","description":"A loan document's status, one value per document, set here or in the LOS and kept in step both ways. The names are the LOS's own; the app shows Active as Pending, Screened as Accepted and Obsolete as Deleted."},"DocumentAnalysisSummary":{"type":"object","properties":{"status":{"type":"string","description":"Pending, Completed, Failed or Skipped. Failed reads \"Not analysed\".","nullable":true},"verdict":{"type":"string","description":"Whether the document is what was asked for: Matches, Mismatch, Unreadable or Unknown.","nullable":true},"reasonCode":{"type":"string","description":"On a Mismatch, why: WrongDocument, WrongPeriod, WrongAccount, WrongBorrower, MissingPages or Expired. On an Unreadable verdict from the page quality check, UnreadablePages.","nullable":true},"reason":{"type":"string","description":"One line in plain language explaining the verdict, written for the borrower.","nullable":true},"suggestedRejectionReasonCode":{"type":"string","description":"The seeded TaskRejectionReason code the panel pre-selects for a Mismatch.","nullable":true},"suggestedTaskId":{"type":"string","description":"Id of the task or condition the document appears to belong to; null when none matched.","format":"uuid","nullable":true},"suggestedTaskName":{"type":"string","description":"Name of the suggested task or condition.","nullable":true},"isOnSuggestedTask":{"type":"boolean","description":"False when the document sits on a different task than the best match: shown for confirmation."},"matchConfidence":{"type":"number","description":"How sure the analysis is of the suggested task, from 0 to 1.","format":"double","nullable":true},"suggestedLoanDocumentTypeId":{"type":"string","description":"Id of the loan document type the document looks like; null when not determined.","format":"uuid","nullable":true},"suggestedLoanDocumentTypeName":{"type":"string","description":"Name of the suggested loan document type.","nullable":true},"suggestedTitle":{"type":"string","description":"The title the analysis suggests for the document, built from what it read (for example the account and statement period).","nullable":true},"titleAppliedAutomatically":{"type":"boolean","description":"True when the document's current title was set by the analysis rather than by a person."},"previousTitle":{"type":"string","description":"The title the document had before the analysis renamed it; null when it was not renamed.","nullable":true},"autoNameDisabled":{"type":"boolean","description":"True when a person undid an automatic name; the analysis never renames this document again."},"filedByType":{"type":"boolean","description":"Filed under the suggested LOS type and folder by the analysis, for a person to confirm or correct."},"duplicateOfDocumentId":{"type":"string","description":"Id of an earlier document on the loan with the same content, when this one repeats it; otherwise null.","format":"uuid","nullable":true},"supersedesDocumentId":{"type":"string","description":"Id of an earlier document this one replaces (a newer version of the same document); otherwise null.","format":"uuid","nullable":true},"supersededByDocumentId":{"type":"string","description":"Id of a newer document that replaces this one; otherwise null.","format":"uuid","nullable":true},"outcome":{"type":"string","description":"What a person did with the suggestion: Confirmed, Corrected, Rejected or Ignored; null while no one has acted.","nullable":true},"outcomeAt":{"type":"string","description":"When the person acted on the suggestion, in UTC (ISO 8601); null while no one has.","format":"date-time","nullable":true},"coveredPeriods":{"type":"array","items":{"type":"string"},"description":"For a request that needs a span of statements, the months the uploaded documents cover, each formatted yyyy-MM.","nullable":true},"missingPeriods":{"type":"array","items":{"type":"string"},"description":"The requested months no uploaded document covers yet, each formatted yyyy-MM.","nullable":true},"monthsMissing":{"type":"integer","description":"How many months of the request are still missing.","format":"int32","nullable":true},"analyzedAt":{"type":"string","description":"When the analysis was done, in UTC (ISO 8601).","format":"date-time"},"splitSuggestion":{"$ref":"#/components/schemas/SplitSuggestion"},"pageIssues":{"type":"array","items":{"$ref":"#/components/schemas/PageIssue"},"description":"The pages the quality check flagged, which the Unreadable-page request names.","nullable":true}},"additionalProperties":false,"description":"What the document review shows for a document: the suggested task, type and title, the verdict and whether the title was applied automatically. The evidence and page text the analysis read are not included."},"SplitSuggestion":{"type":"object","properties":{"pageCount":{"type":"integer","description":"Number of pages in the PDF that was analysed.","format":"int32"},"parts":{"type":"array","items":{"$ref":"#/components/schemas/SplitPartRange"},"description":"The suggested page ranges, one per document found.","nullable":true},"reason":{"type":"string","description":"The segmenter's account of why, e.g. \"3 document(s) across 12 page(s)\".","nullable":true}},"additionalProperties":false,"description":"The split suggested for a PDF that holds several documents and was not split on upload. Nothing changes until a person accepts it."},"SplitPartRange":{"type":"object","properties":{"startPage":{"type":"integer","description":"First page of the run, counting from 1.","format":"int32"},"endPage":{"type":"integer","description":"Last page of the run, inclusive.","format":"int32"},"loanDocumentTypeId":{"type":"string","description":"What the segmenter took the run to be, for the suggestion only. Never trusted when splitting.","format":"uuid","nullable":true},"loanDocumentTypeName":{"type":"string","description":"Name of the document type the run was taken to be, for the suggestion only.","nullable":true}},"additionalProperties":false,"description":"One run of pages of a combined PDF that is one document. 1-based, inclusive."},"PageIssue":{"type":"object","properties":{"page":{"type":"integer","description":"The page the issue is on, starting at 1.","format":"int32"},"kind":{"type":"string","description":"The problem found: Blank (no text), LowConfidence (scan quality too low to read reliably) or CutOff (text stops mid-sentence).","nullable":true}},"additionalProperties":false,"description":"A page the quality check flagged. 1-based, in the document the analysis read."},"TaskRejectionReason":{"type":"object","properties":{"id":{"type":"string","description":"Id of the rejection reason (GUID).","format":"uuid"},"name":{"type":"string","description":"Display name of the rejection reason.","nullable":true},"code":{"type":"string","description":"Stable code of the rejection reason.","nullable":true},"displayOrder":{"type":"integer","description":"Position of the reason in lists, lowest first.","format":"int32","nullable":true}},"additionalProperties":false,"description":"A reason a reviewer gives for rejecting a task's document."},"PosCreditReportType":{"type":"object","properties":{"id":{"type":"string","description":"Id of the report type (GUID).","format":"uuid","nullable":true},"code":{"type":"string","description":"Stable code of the report type.","nullable":true},"name":{"type":"string","description":"Display name of the report type.","nullable":true}},"additionalProperties":false,"description":"The type of credit report a credit report task asks for."},"TaskQuestionType":{"type":"object","properties":{"id":{"type":"string","description":"Id of the question type (GUID).","format":"uuid"},"name":{"type":"string","description":"Display name of the question type.","nullable":true},"code":{"type":"string","description":"Stable code of the question type.","nullable":true},"displayOrder":{"type":"integer","description":"Position of the question type in lists, lowest first.","format":"int32","nullable":true}},"additionalProperties":false,"description":"For a question task, the kind of answer it asks for, such as yes/no or a short answer."},"LoanAppUser":{"type":"object","properties":{"id":{"type":"string","description":"Id of the user (GUID).","format":"uuid"},"firstName":{"type":"string","description":"The user's first name.","nullable":true},"lastName":{"type":"string","description":"The user's last name.","nullable":true}},"additionalProperties":false,"description":"A user, such as the staff member a task is assigned to."},"TaskType":{"type":"object","properties":{"id":{"type":"string","description":"Id of the task type (GUID).","format":"uuid"},"code":{"type":"string","description":"Stable code of the task type.","nullable":true},"name":{"type":"string","description":"Display name of the task type.","nullable":true}},"additionalProperties":false,"description":"The kind of task."},"TaskAssignmentType":{"type":"object","properties":{"id":{"type":"string","description":"Id of the assignment type (GUID).","format":"uuid"},"code":{"type":"string","description":"Stable code of the assignment type.","nullable":true},"name":{"type":"string","description":"Display name of the assignment type.","nullable":true}},"additionalProperties":false,"description":"Who a task is assigned to: a borrower or a user."},"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/conditions/{conditionId}":{"get":{"tags":["Conditions"],"summary":"Retrieves one condition of a loan application, with the requests under it.","description":"**Required scope:** `read:loan-applications`","operationId":"LoanApplicationConditions_GetLoanApplicationCondition","parameters":[{"name":"id","in":"path","description":"The unique identifier of the loan application.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"conditionId","in":"path","description":"The unique identifier of the condition.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Loan application condition retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanApplicationConditionItem"}}}},"400":{"description":"Invalid identifier","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Missing, invalid or expired access token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The client application is not authorized to access this resource","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan application or condition not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Updates a condition on the specified loan application.

> \*\*Required scope:\*\* \`update:loan-applications\`\
> \
> Replaces PUT {id}/tasks/{taskId}. Name, description, category, due date, visibility and required document> \
> type. Written to the Loan Origination System, or kept in Henge while the loan has not been submitted;> \
> the id does not change at submission. Admin applications only, as the web app limits it to administrators and> \
> processors. Reassigning a request is PUT on the task route until it is withdrawn.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UpdateLoanConditionRequest":{"type":"object","properties":{"name":{"type":"string","description":"Null leaves the name alone. The short title the lists show; never written to the LOS, so a\r\nrequest that changes only the name makes no LOS call.","nullable":true},"description":{"type":"string","description":"The condition's wording; null leaves it alone. The condition keeps its identity, so this renames it in place.","nullable":true},"category":{"type":"string","description":"Null leaves the category alone. Validated against the company's known set.","nullable":true},"dueDate":{"type":"string","description":"Null leaves the due date alone.","format":"date","nullable":true},"isHidden":{"type":"boolean","description":"Null leaves the current visibility alone - an update never changes it by omission.","nullable":true},"documentTypeId":{"type":"string","description":"The document type the condition asks for; null leaves it alone. Setting it replaces the current one (a condition has one), and it cannot be cleared.","format":"uuid","nullable":true},"pairIndex":{"type":"integer","description":"The borrower pair the condition belongs to, by position (0 is the first pair). Kept in Henge only; a request with only this and appliesToAllPairs does not change the LOS. Applied only to a condition already in the LOS; ignored for one not yet there.","format":"int32","nullable":true},"appliesToAllPairs":{"type":"boolean","description":"True: every pair sees the condition. False with no `pairIndex`: the owner is cleared. Applied only to a condition already in the LOS; ignored for one not yet there.","nullable":true}},"additionalProperties":false,"description":"Changes an existing condition. Every field is optional and a null one is left alone. Send at least one field to change."},"WriteLoanConditionResponse":{"type":"object","properties":{"conditionTaskId":{"type":"string","description":"The local LoanApplicationTask id of the condition.","format":"uuid"},"externalId":{"type":"string","description":"The condition's id in the LOS.","nullable":true},"name":{"type":"string","description":"The condition's short title. Null when IsMirrored is false: only the local row holds it.","nullable":true},"description":{"type":"string","description":"The condition's wording.","nullable":true},"category":{"type":"string","description":"The condition's category, for example PRIOR TO DOCS.","nullable":true},"dueDate":{"type":"string","description":"The date the condition is due (ISO 8601), if any.","format":"date","nullable":true},"isHidden":{"type":"boolean","description":"True when the condition is hidden from the borrower."},"documentType":{"type":"string","description":"The name of the document type the condition asks for, as the LOS reports it.","nullable":true},"documentFolder":{"type":"string","description":"The required document type's folder.","nullable":true},"isMirrored":{"type":"boolean","description":"False when the LOS accepted the write but Henge could not save its own copy. The condition exists either way and the next sync adds the copy. Do not retry on false: a retried create makes a second condition."},"mirrorWarning":{"type":"string","description":"Set only when IsMirrored is false, explaining what the caller should expect.","nullable":true}},"additionalProperties":false},"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/conditions/{conditionId}":{"put":{"tags":["Conditions"],"summary":"Updates a condition on the specified loan application.","description":"**Required scope:** `update:loan-applications`\n\nReplaces PUT {id}/tasks/{taskId}. Name, description, category, due date, visibility and required document\r\ntype. Written to the Loan Origination System, or kept in Henge while the loan has not been submitted;\r\nthe id does not change at submission. Admin applications only, as the web app limits it to administrators and\r\nprocessors. Reassigning a request is PUT on the task route until it is withdrawn.","operationId":"LoanApplicationConditions_UpdateLoanApplicationCondition","parameters":[{"name":"id","in":"path","description":"The unique identifier of the loan application.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"conditionId","in":"path","description":"The unique identifier of the condition.","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"The fields to change; one that is not sent keeps its value.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLoanConditionRequest"}}}},"responses":{"200":{"description":"Loan application condition updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteLoanConditionResponse"}}}},"400":{"description":"Invalid identifier or request payload","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The client application is not authorized to perform this action","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan application or condition not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Deletes a condition of a loan application.

> \*\*Required scope:\*\* \`delete:loan-applications\`\
> \
> Replaces DELETE {id}/tasks/{taskId}.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/conditions/{conditionId}":{"delete":{"tags":["Conditions"],"summary":"Deletes a condition of a loan application.","description":"**Required scope:** `delete:loan-applications`\n\nReplaces DELETE {id}/tasks/{taskId}.","operationId":"LoanApplicationConditions_DeleteLoanApplicationCondition","parameters":[{"name":"id","in":"path","description":"The unique identifier of the loan application.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"conditionId","in":"path","description":"The unique identifier of the condition.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Loan application condition deleted successfully"},"400":{"description":"Invalid identifier","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Missing, invalid or expired access token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The client application is not authorized to perform this action","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan application or condition not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Accepts the documents under a condition on the specified loan application.

> \*\*Required scope:\*\* \`update:loan-applications\`\
> \
> Replaces POST {id}/tasks/{taskId}/accept; every request under the condition that holds a document is accepted.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Modified":{"required":["id"],"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the entity that was modified."},"type":{"type":"string","description":"A string indicating the type or category of the modified entity (e.g., “Webhook”, “LoanApplicationTask”).","nullable":true},"createdTimestamp":{"type":"string","description":"The timestamp when the entity was first created.","format":"date-time","nullable":true},"updatedTimestamp":{"type":"string","description":"The timestamp when the entity was last updated.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Represents an audit record for an entity that has been created or updated."},"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/conditions/{conditionId}/accept":{"post":{"tags":["Conditions"],"summary":"Accepts the documents under a condition on the specified loan application.","description":"**Required scope:** `update:loan-applications`\n\nReplaces POST {id}/tasks/{taskId}/accept; every request under the condition that holds a document is accepted.","operationId":"LoanApplicationConditions_AcceptLoanApplicationCondition","parameters":[{"name":"id","in":"path","description":"The unique identifier of the loan application.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"conditionId","in":"path","description":"The unique identifier of the condition.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"query","description":"Optional. Narrows the accept to one request under the condition.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Loan application condition accepted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Modified"}}}},"400":{"description":"Invalid identifier, or no request under the condition holds a document","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Missing, invalid or expired access token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The client application is not authorized to perform this action","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan application or condition not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Uploads a document to a condition within a loan application.

> \*\*Required scope:\*\* \`update:loan-applications\`\
> \
> Replaces POST {id}/tasks/{taskId}/documents. The request under the condition that takes the file is found> \
> or created from the kind of document the description says it is. The response gives the document's id.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Modified":{"required":["id"],"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the entity that was modified."},"type":{"type":"string","description":"A string indicating the type or category of the modified entity (e.g., “Webhook”, “LoanApplicationTask”).","nullable":true},"createdTimestamp":{"type":"string","description":"The timestamp when the entity was first created.","format":"date-time","nullable":true},"updatedTimestamp":{"type":"string","description":"The timestamp when the entity was last updated.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Represents an audit record for an entity that has been created or updated."},"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/conditions/{conditionId}/documents":{"post":{"tags":["Conditions"],"summary":"Uploads a document to a condition within a loan application.","description":"**Required scope:** `update:loan-applications`\n\nReplaces POST {id}/tasks/{taskId}/documents. The request under the condition that takes the file is found\r\nor created from the kind of document the description says it is. The response gives the document's id.","operationId":"LoanApplicationConditions_UploadLoanApplicationConditionDocument","parameters":[{"name":"id","in":"path","description":"The unique identifier of the loan application.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"conditionId","in":"path","description":"The unique identifier of the condition.","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","description":"The file to be uploaded.","format":"binary"},"description":{"type":"string","description":"Optional. Which document the file is; it defaults to the file name."}}},"encoding":{"file":{"style":"form"},"description":{"style":"form"}}}}},"responses":{"200":{"description":"Loan application condition document uploaded successfully A create answers 200 today. It will answer 201 with a Location header from a date announced in the changelog at least 60 days ahead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Modified"}}}},"201":{"description":"Created. Will be answered instead of 200 from a date announced in the changelog at least 60 days ahead; the Location header carries the new resource's URL.","headers":{"Location":{"description":"URL of the created resource: this request's path followed by the new id.","schema":{"type":"string","format":"uri-reference"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Modified"}}}},"400":{"description":"Invalid identifier or the file is missing/invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Missing, invalid or expired access token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The client application is not authorized to perform this action","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan application or condition not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Retrieves a specific document held under a condition.

> \*\*Required scope:\*\* \`read:loan-applications\`\
> \
> Replaces GET {id}/tasks/{taskId}/documents/{documentId}.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/conditions/{conditionId}/documents/{documentId}":{"get":{"tags":["Conditions"],"summary":"Retrieves a specific document held under a condition.","description":"**Required scope:** `read:loan-applications`\n\nReplaces GET {id}/tasks/{taskId}/documents/{documentId}.","operationId":"LoanApplicationConditions_GetLoanApplicationConditionDocument","parameters":[{"name":"id","in":"path","description":"The unique identifier of the loan application.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"conditionId","in":"path","description":"The unique identifier of the condition.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentId","in":"path","description":"The unique identifier of the document.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"isOriginal","in":"query","description":"Whether to return the original file (true) or the converted PDF version (false). Default is false.","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"The document's file: a PDF, or with isOriginal=true the file as it was uploaded, whose Content-Type header names its type.","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}},"*/*":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid identifier","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Missing, invalid or expired access token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The client application is not authorized to access this resource","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan application, condition or document not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Rejects the documents under a condition on the specified loan application.

> \*\*Required scope:\*\* \`update:loan-applications\`\
> \
> Replaces POST {id}/tasks/{taskId}/reject; every request under the condition that holds a document is rejected.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"RejectLoanApplicationTaskDocumentRequest":{"required":["rejectionReason"],"type":"object","properties":{"rejectionReasonNote":{"type":"string","description":"A note for the borrower explaining why the document was rejected; optional.","nullable":true},"rejectionReason":{"$ref":"#/components/schemas/TaskRejectionReasonRequest"}},"additionalProperties":false},"TaskRejectionReasonRequest":{"required":["id"],"type":"object","properties":{"id":{"type":"string","description":"Id (GUID) of the rejection reason, from the task rejection reasons lookup.","format":"uuid"},"name":{"type":"string","description":"The rejection reason's name.","nullable":true}},"additionalProperties":false,"description":"The reason a task's document is rejected, chosen from the task rejection reasons lookup."},"Modified":{"required":["id"],"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the entity that was modified."},"type":{"type":"string","description":"A string indicating the type or category of the modified entity (e.g., “Webhook”, “LoanApplicationTask”).","nullable":true},"createdTimestamp":{"type":"string","description":"The timestamp when the entity was first created.","format":"date-time","nullable":true},"updatedTimestamp":{"type":"string","description":"The timestamp when the entity was last updated.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Represents an audit record for an entity that has been created or updated."},"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/conditions/{conditionId}/reject":{"post":{"tags":["Conditions"],"summary":"Rejects the documents under a condition on the specified loan application.","description":"**Required scope:** `update:loan-applications`\n\nReplaces POST {id}/tasks/{taskId}/reject; every request under the condition that holds a document is rejected.","operationId":"LoanApplicationConditions_RejectLoanApplicationCondition","parameters":[{"name":"id","in":"path","description":"The unique identifier of the loan application.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"conditionId","in":"path","description":"The unique identifier of the condition.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"query","description":"Optional. Narrows the reject to one request under the condition.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"The rejection reason, and a note for the borrower.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectLoanApplicationTaskDocumentRequest"}}}},"responses":{"200":{"description":"Loan application condition rejected successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Modified"}}}},"400":{"description":"Invalid identifier or request payload, or no request under the condition holds a document","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Missing, invalid or expired access token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The client application is not authorized to perform this action","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan application or condition not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Sets the status of the requests under a condition on the specified loan application.

> \*\*Required scope:\*\* \`update:loan-applications\`\
> \
> Replaces POST {id}/tasks/{taskId}/status, with the same rules for each request: a document request moves by> \
> upload, accept and reject, and section verification tasks are refused.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"SetLoanApplicationTaskStatusRequest":{"required":["status"],"type":"object","properties":{"status":{"type":"string","description":"Required. InProgress, Complete or Requested."}},"additionalProperties":false},"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/conditions/{conditionId}/status":{"post":{"tags":["Conditions"],"summary":"Sets the status of the requests under a condition on the specified loan application.","description":"**Required scope:** `update:loan-applications`\n\nReplaces POST {id}/tasks/{taskId}/status, with the same rules for each request: a document request moves by\r\nupload, accept and reject, and section verification tasks are refused.","operationId":"LoanApplicationConditions_SetLoanApplicationConditionStatus","parameters":[{"name":"id","in":"path","description":"The unique identifier of the loan application.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"conditionId","in":"path","description":"The unique identifier of the condition.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"query","description":"Optional. Narrows the change to one request under the condition.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"The status to move the requests to: InProgress, Complete or Requested.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetLoanApplicationTaskStatusRequest"}}}},"responses":{"204":{"description":"Loan application condition status set successfully"},"400":{"description":"Unknown status, or a request whose status cannot be set this way","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The client application is not authorized to perform this action","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan application or condition not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Rewords a condition on the specified loan application.

> \*\*Required scope:\*\* \`update:loan-applications\`\
> \
> The rewording is local only: the Loan Origination System keeps its own wording and is never> \
> written to, and the rewording survives the condition sync. Admin applications only, matching> \
> the web app, where only administrators and processors can reword a condition.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UpdateConditionTextRequest":{"type":"object","properties":{"text":{"type":"string","description":"The replacement condition text. Null, empty or whitespace reverts to the Loan Origination System's own wording.","nullable":true}},"additionalProperties":false,"description":"Rewords a condition for the people working the loan without changing the Loan Origination System. A null, empty or whitespace text clears the rewording and restores the original wording."},"UpdateConditionTextResponse":{"type":"object","properties":{"conditionTaskId":{"type":"string","description":"Id (GUID) of the condition's task.","format":"uuid"},"description":{"type":"string","description":"The condition text to display after the update: the rewording when there is one, otherwise the Loan Origination System's text.","nullable":true},"conditionSourceText":{"type":"string","description":"The Loan Origination System's own text, returned only while a rewording is in effect so a caller can show the original and offer a revert. Null once the rewording is cleared.","nullable":true},"isConditionTextEdited":{"type":"boolean","description":"True while a local rewording is in effect."}},"additionalProperties":false},"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/conditions/{conditionTaskId}/text":{"put":{"tags":["Conditions"],"summary":"Rewords a condition on the specified loan application.","description":"**Required scope:** `update:loan-applications`\n\nThe rewording is local only: the Loan Origination System keeps its own wording and is never\r\nwritten to, and the rewording survives the condition sync. Admin applications only, matching\r\nthe web app, where only administrators and processors can reword a condition.","operationId":"LoanApplications_UpdateLoanApplicationConditionText","parameters":[{"name":"id","in":"path","description":"The unique identifier of the loan application.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"conditionTaskId","in":"path","description":"The unique identifier of the condition's task.","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"The replacement text; empty reverts to the Loan Origination System's wording.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConditionTextRequest"}}}},"responses":{"200":{"description":"Condition text updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConditionTextResponse"}}}},"400":{"description":"Invalid identifier, or the task is not a condition","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The client application is not authorized to perform this action","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan application or condition not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Lists the users a request under a condition on the specified loan application can be assigned to.

> \*\*Required scope:\*\* \`read:loan-applications\`\
> \
> Replaces GET {id}/tasks/assignable-users. Admin applications only.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"GetAssignableTaskUsersResponse":{"type":"object","properties":{"loanAppId":{"type":"string","description":"Id (GUID) of the loan.","format":"uuid"},"users":{"type":"array","items":{"$ref":"#/components/schemas/AssignableTaskUser"},"description":"The staff users a task on this loan can be assigned to.","nullable":true}},"additionalProperties":false},"AssignableTaskUser":{"type":"object","properties":{"id":{"type":"string","description":"Id (GUID) of the user; send it as userId to assign a task to them.","format":"uuid"},"firstName":{"type":"string","description":"The user's first name.","nullable":true},"lastName":{"type":"string","description":"The user's last name.","nullable":true},"role":{"type":"string","description":"The user's role on the loan, for example LoanOfficer or ConciergeKey.","nullable":true}},"additionalProperties":false},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/conditions/assignable-users":{"get":{"tags":["Conditions"],"summary":"Lists the users a request under a condition on the specified loan application can be assigned to.","description":"**Required scope:** `read:loan-applications`\n\nReplaces GET {id}/tasks/assignable-users. Admin applications only.","operationId":"LoanApplicationConditions_GetAssignableConditionUsers","parameters":[{"name":"id","in":"path","description":"The unique identifier of the loan application.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Assignable users retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAssignableTaskUsersResponse"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The client application is not authorized to access this resource","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan application not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Retrieves all tasks associated with a specific loan application.

> \*\*Required scope:\*\* \`read:loan-applications\`\
> \
> Deprecated: use the matching conditions route; the task routes are withdrawn on the Sunset date in the response headers.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"TaskItemResponse":{"type":"object","properties":{"id":{"type":"string","description":"Id (GUID) of the task.","format":"uuid"},"name":{"type":"string","description":"The task's name.","nullable":true},"description":{"type":"string","description":"What the task asks for, in plain language.","nullable":true},"updatedTaskStatusTimestamp":{"type":"string","description":"When the task's status last changed, in UTC (ISO 8601).","format":"date-time"},"updatedTimestamp":{"type":"string","description":"When the task was last changed, in UTC (ISO 8601).","format":"date-time"},"createdTimestamp":{"type":"string","description":"When the task was created, in UTC (ISO 8601).","format":"date-time"},"item":{"$ref":"#/components/schemas/ItemResponse"},"type":{"$ref":"#/components/schemas/TaskTypeResponse"},"status":{"$ref":"#/components/schemas/TaskStatusResponse"},"rejectionReasonNote":{"type":"string","description":"A note explaining why the task's document was rejected; null when it was not rejected.","nullable":true},"rejectionReason":{"$ref":"#/components/schemas/TaskRejectionReasonResponse"},"creditReportType":{"$ref":"#/components/schemas/CreditReportTypeResponse"},"document":{"$ref":"#/components/schemas/TaskDocumentResponse"},"assetAccountId":{"type":"string","description":"The asset account the task is on, if any.","format":"uuid","nullable":true},"requestedStartDate":{"type":"string","description":"Transaction History tasks only: the first day of the requested period.","format":"date","nullable":true},"requestedEndDate":{"type":"string","description":"Transaction History tasks only: the last day of the requested period.","format":"date","nullable":true}},"additionalProperties":false},"ItemResponse":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier (GUID) of the item.","format":"uuid"},"name":{"type":"string","description":"Display name of the item.","nullable":true}},"additionalProperties":false,"description":"The item a task is about."},"TaskTypeResponse":{"type":"object","properties":{"id":{"type":"string","description":"Id (GUID) of the task type.","format":"uuid"},"name":{"type":"string","description":"The task type's name.","nullable":true}},"additionalProperties":false,"description":"The type (task set) a task belongs to."},"TaskStatusResponse":{"type":"object","properties":{"id":{"type":"string","description":"Id (GUID) of the status.","format":"uuid"},"name":{"type":"string","description":"The status name.","nullable":true}},"additionalProperties":false,"description":"A task's status."},"TaskRejectionReasonResponse":{"type":"object","properties":{"id":{"type":"string","description":"Id (GUID) of the rejection reason.","format":"uuid"},"name":{"type":"string","description":"The rejection reason's name.","nullable":true}},"additionalProperties":false,"description":"The reason a task's document was rejected."},"CreditReportTypeResponse":{"type":"object","properties":{"id":{"type":"string","description":"Id (GUID) of the credit report type.","format":"uuid"},"name":{"type":"string","description":"The credit report type's name.","nullable":true}},"additionalProperties":false,"description":"A credit report type (such as soft pull or hard pull), as listed by the credit report types lookup."},"TaskDocumentResponse":{"type":"object","properties":{"id":{"type":"string","description":"Id (GUID) of the document.","format":"uuid"},"name":{"type":"string","description":"The document's file name.","nullable":true},"isPdfConversionComplete":{"type":"boolean","description":"True once the uploaded file has been converted to PDF and can be opened; false while conversion is still running."}},"additionalProperties":false,"description":"The document attached to a task."},"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/tasks":{"get":{"tags":["Conditions"],"summary":"Retrieves all tasks associated with a specific loan application.","description":"**Required scope:** `read:loan-applications`\n\nDeprecated: use the matching conditions route; the task routes are withdrawn on the Sunset date in the response headers.","operationId":"LoanApplications_GetLoanApplicationTasks","parameters":[{"name":"id","in":"path","description":"The unique identifier of the loan application.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"audience","in":"query","description":"Which tasks to return: `user` (ignoring case) for staff tasks, any other value (for example `borrower`) for borrower tasks; conditions are left out of both. Leave it out for every task.","schema":{"type":"string"}}],"responses":{"200":{"description":"Loan application tasks retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TaskItemResponse"}}}}},"400":{"description":"Invalid identifier","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Missing, invalid or expired access token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The client application is not authorized to access this resource","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan application not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"deprecated":true}}}}
```

## Creates a new task for the specified loan application.

> \*\*Required scope:\*\* \`create:loan-applications\`\
> \
> Deprecated: use the matching conditions route; the task routes are withdrawn on the Sunset date in the response headers.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CreateLoanApplicationTaskRequest":{"required":["item","name","type"],"type":"object","properties":{"conditionTaskId":{"type":"string","description":"Optional. The condition on this loan application that the new task belongs to.","format":"uuid","nullable":true},"assetAccountId":{"type":"string","description":"Required for a Transaction History task (item code TransactionHistory), ignored otherwise:\r\nthe asset account on this loan application whose activity is requested.","format":"uuid","nullable":true},"requestedStartDate":{"type":"string","description":"Required for a Transaction History task, ignored otherwise: the first day of the requested\r\nperiod. On or before requestedEndDate.","format":"date","nullable":true},"requestedEndDate":{"type":"string","description":"Required for a Transaction History task, ignored otherwise: the last day of the requested\r\nperiod. Not in the future.","format":"date","nullable":true},"name":{"type":"string","description":"Display name of the task."},"description":{"type":"string","description":"Description of the task, shown to whoever it is assigned to.","nullable":true},"item":{"$ref":"#/components/schemas/ItemRequest"},"type":{"$ref":"#/components/schemas/TaskTypeRequest"},"creditReportType":{"$ref":"#/components/schemas/CreditReportTypeRequest"}},"additionalProperties":false,"description":"A task to add to a loan application: a document request, a user task or a question. For a Transaction History item also send assetAccountId, requestedStartDate and requestedEndDate."},"ItemRequest":{"required":["id"],"type":"object","properties":{"id":{"type":"string","description":"Unique identifier (GUID) of the item.","format":"uuid"},"name":{"type":"string","description":"Display name of the item.","nullable":true}},"additionalProperties":false,"description":"A reference to an item a task is about, by id."},"TaskTypeRequest":{"required":["id"],"type":"object","properties":{"id":{"type":"string","description":"Id (GUID) of the task type, from the task types lookup.","format":"uuid"},"name":{"type":"string","description":"The task type's name.","nullable":true}},"additionalProperties":false,"description":"The type (task set) a task belongs to, chosen from the task types lookup."},"CreditReportTypeRequest":{"type":"object","properties":{"id":{"type":"string","description":"Id (GUID) of the credit report type, from the credit report types lookup.","format":"uuid"},"name":{"type":"string","description":"The credit report type's name.","nullable":true}},"additionalProperties":false,"description":"A credit report type (such as soft pull or hard pull), as listed by the credit report types lookup."},"Modified":{"required":["id"],"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the entity that was modified."},"type":{"type":"string","description":"A string indicating the type or category of the modified entity (e.g., “Webhook”, “LoanApplicationTask”).","nullable":true},"createdTimestamp":{"type":"string","description":"The timestamp when the entity was first created.","format":"date-time","nullable":true},"updatedTimestamp":{"type":"string","description":"The timestamp when the entity was last updated.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Represents an audit record for an entity that has been created or updated."},"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/tasks":{"post":{"tags":["Conditions"],"summary":"Creates a new task for the specified loan application.","description":"**Required scope:** `create:loan-applications`\n\nDeprecated: use the matching conditions route; the task routes are withdrawn on the Sunset date in the response headers.","operationId":"LoanApplications_CreateLoanApplicationTask","parameters":[{"name":"id","in":"path","description":"The unique identifier of the loan application.","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"The request payload containing details of the task to be created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLoanApplicationTaskRequest"}}}},"responses":{"200":{"description":"Loan application task created successfully A create answers 200 today. It will answer 201 with a Location header from a date announced in the changelog at least 60 days ahead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Modified"}}}},"201":{"description":"Created. Will be answered instead of 200 from a date announced in the changelog at least 60 days ahead; the Location header carries the new resource's URL.","headers":{"Location":{"description":"URL of the created resource: this request's path followed by the new id.","schema":{"type":"string","format":"uri-reference"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Modified"}}}},"400":{"description":"Invalid identifier or request payload","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Missing, invalid or expired access token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The client application is not authorized to perform this action","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan application not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"The loan refuses the new task or condition (code `BusinessRuleViolation`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"deprecated":true}}}}
```

## Retrieves a specific task associated with a loan application.

> \*\*Required scope:\*\* \`read:loan-applications\`\
> \
> Deprecated: use the matching conditions route; the task routes are withdrawn on the Sunset date in the response headers.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"TaskItemResponse":{"type":"object","properties":{"id":{"type":"string","description":"Id (GUID) of the task.","format":"uuid"},"name":{"type":"string","description":"The task's name.","nullable":true},"description":{"type":"string","description":"What the task asks for, in plain language.","nullable":true},"updatedTaskStatusTimestamp":{"type":"string","description":"When the task's status last changed, in UTC (ISO 8601).","format":"date-time"},"updatedTimestamp":{"type":"string","description":"When the task was last changed, in UTC (ISO 8601).","format":"date-time"},"createdTimestamp":{"type":"string","description":"When the task was created, in UTC (ISO 8601).","format":"date-time"},"item":{"$ref":"#/components/schemas/ItemResponse"},"type":{"$ref":"#/components/schemas/TaskTypeResponse"},"status":{"$ref":"#/components/schemas/TaskStatusResponse"},"rejectionReasonNote":{"type":"string","description":"A note explaining why the task's document was rejected; null when it was not rejected.","nullable":true},"rejectionReason":{"$ref":"#/components/schemas/TaskRejectionReasonResponse"},"creditReportType":{"$ref":"#/components/schemas/CreditReportTypeResponse"},"document":{"$ref":"#/components/schemas/TaskDocumentResponse"},"assetAccountId":{"type":"string","description":"The asset account the task is on, if any.","format":"uuid","nullable":true},"requestedStartDate":{"type":"string","description":"Transaction History tasks only: the first day of the requested period.","format":"date","nullable":true},"requestedEndDate":{"type":"string","description":"Transaction History tasks only: the last day of the requested period.","format":"date","nullable":true}},"additionalProperties":false},"ItemResponse":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier (GUID) of the item.","format":"uuid"},"name":{"type":"string","description":"Display name of the item.","nullable":true}},"additionalProperties":false,"description":"The item a task is about."},"TaskTypeResponse":{"type":"object","properties":{"id":{"type":"string","description":"Id (GUID) of the task type.","format":"uuid"},"name":{"type":"string","description":"The task type's name.","nullable":true}},"additionalProperties":false,"description":"The type (task set) a task belongs to."},"TaskStatusResponse":{"type":"object","properties":{"id":{"type":"string","description":"Id (GUID) of the status.","format":"uuid"},"name":{"type":"string","description":"The status name.","nullable":true}},"additionalProperties":false,"description":"A task's status."},"TaskRejectionReasonResponse":{"type":"object","properties":{"id":{"type":"string","description":"Id (GUID) of the rejection reason.","format":"uuid"},"name":{"type":"string","description":"The rejection reason's name.","nullable":true}},"additionalProperties":false,"description":"The reason a task's document was rejected."},"CreditReportTypeResponse":{"type":"object","properties":{"id":{"type":"string","description":"Id (GUID) of the credit report type.","format":"uuid"},"name":{"type":"string","description":"The credit report type's name.","nullable":true}},"additionalProperties":false,"description":"A credit report type (such as soft pull or hard pull), as listed by the credit report types lookup."},"TaskDocumentResponse":{"type":"object","properties":{"id":{"type":"string","description":"Id (GUID) of the document.","format":"uuid"},"name":{"type":"string","description":"The document's file name.","nullable":true},"isPdfConversionComplete":{"type":"boolean","description":"True once the uploaded file has been converted to PDF and can be opened; false while conversion is still running."}},"additionalProperties":false,"description":"The document attached to a task."},"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/tasks/{taskId}":{"get":{"tags":["Conditions"],"summary":"Retrieves a specific task associated with a loan application.","description":"**Required scope:** `read:loan-applications`\n\nDeprecated: use the matching conditions route; the task routes are withdrawn on the Sunset date in the response headers.","operationId":"LoanApplications_GetLoanApplicationTask","parameters":[{"name":"id","in":"path","description":"The unique identifier of the loan application.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","description":"The unique identifier of the task within the loan application.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Loan application task retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskItemResponse"}}}},"400":{"description":"Invalid identifier","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Missing, invalid or expired access token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The client application is not authorized to access this resource","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan application or task not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"deprecated":true}}}}
```

## Updates an existing task for the specified loan application.

> \*\*Required scope:\*\* \`update:loan-applications\`\
> \
> Name, description, item, type and credit report type are replaced as sent. Assignee, due date> \
> and required are optional: one that is not sent keeps its current value. An assignee with a> \
> userId makes the task a user task (the user must be one of GET {id}/tasks/assignable-users);> \
> otherwise it becomes a borrower task, addressed to borrowerId when sent. The condition link is> \
> not part of this update; use PUT {id}/tasks/{taskId}/condition. Deprecated: use the matching conditions route; the task routes are withdrawn on the Sunset date in the response headers.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UpdateLoanApplicationTaskRequest":{"required":["name","type"],"type":"object","properties":{"assignee":{"$ref":"#/components/schemas/TaskAssigneeRequest"},"dueDate":{"type":"string","description":"Optional. The date the task is due. Omit (or send null) to keep the current due date; use\r\nclearDueDate to remove it. Not accepted on an underwriting condition, whose due date is\r\nowned by the Loan Origination System.","format":"date","nullable":true},"clearDueDate":{"type":"boolean","description":"Optional. True removes the task's due date. Cannot be combined with dueDate."},"isRequired":{"type":"boolean","description":"Optional. Whether the task must be completed before the file can move forward. Omit (or send\r\nnull) to keep the current value.","nullable":true},"requestedStartDate":{"type":"string","description":"Optional, Transaction History tasks only. The first day of the requested period. Omit (or send\r\nnull) to keep the current date.","format":"date","nullable":true},"requestedEndDate":{"type":"string","description":"Optional, Transaction History tasks only. The last day of the requested period, not in the\r\nfuture. Omit (or send null) to keep the current date.","format":"date","nullable":true},"name":{"type":"string","description":"Display name of the task."},"description":{"type":"string","description":"Description of the task, shown to whoever it is assigned to. Replaced as sent: leaving it out clears the description.","nullable":true},"item":{"$ref":"#/components/schemas/ItemRequest"},"type":{"$ref":"#/components/schemas/TaskTypeRequest"},"creditReportType":{"$ref":"#/components/schemas/CreditReportTypeRequest"}},"additionalProperties":false,"description":"The fields of a task to change. name and type are replaced as sent, so send them. item and description are replaced too: leaving them out clears them. assignee, dueDate, requestedStartDate, requestedEndDate and isRequired keep their current value when left out."},"TaskAssigneeRequest":{"type":"object","properties":{"userId":{"type":"string","description":"Id (GUID) of the staff user to assign the task to, from the assignable users list. When sent, the task becomes a user task.","format":"uuid","nullable":true},"borrowerId":{"type":"string","description":"Id (GUID) of the borrower to address the task to. Used only when userId is not sent; omit it to address the loan's borrowers generally.","format":"uuid","nullable":true}},"additionalProperties":false,"description":"The new assignee of a task: an internal user, or a borrower. Send userId for a user task (one of\r\nGET loan-applications/{id}/tasks/assignable-users); otherwise the task becomes a borrower task,\r\naddressed to borrowerId when sent and to the loan's borrowers generally when not. Send userId, or borrowerId, or neither (the loan's borrowers generally); not both."},"ItemRequest":{"required":["id"],"type":"object","properties":{"id":{"type":"string","description":"Unique identifier (GUID) of the item.","format":"uuid"},"name":{"type":"string","description":"Display name of the item.","nullable":true}},"additionalProperties":false,"description":"A reference to an item a task is about, by id."},"TaskTypeRequest":{"required":["id"],"type":"object","properties":{"id":{"type":"string","description":"Id (GUID) of the task type, from the task types lookup.","format":"uuid"},"name":{"type":"string","description":"The task type's name.","nullable":true}},"additionalProperties":false,"description":"The type (task set) a task belongs to, chosen from the task types lookup."},"CreditReportTypeRequest":{"type":"object","properties":{"id":{"type":"string","description":"Id (GUID) of the credit report type, from the credit report types lookup.","format":"uuid"},"name":{"type":"string","description":"The credit report type's name.","nullable":true}},"additionalProperties":false,"description":"A credit report type (such as soft pull or hard pull), as listed by the credit report types lookup."},"Modified":{"required":["id"],"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the entity that was modified."},"type":{"type":"string","description":"A string indicating the type or category of the modified entity (e.g., “Webhook”, “LoanApplicationTask”).","nullable":true},"createdTimestamp":{"type":"string","description":"The timestamp when the entity was first created.","format":"date-time","nullable":true},"updatedTimestamp":{"type":"string","description":"The timestamp when the entity was last updated.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Represents an audit record for an entity that has been created or updated."},"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/tasks/{taskId}":{"put":{"tags":["Conditions"],"summary":"Updates an existing task for the specified loan application.","description":"**Required scope:** `update:loan-applications`\n\nName, description, item, type and credit report type are replaced as sent. Assignee, due date\r\nand required are optional: one that is not sent keeps its current value. An assignee with a\r\nuserId makes the task a user task (the user must be one of GET {id}/tasks/assignable-users);\r\notherwise it becomes a borrower task, addressed to borrowerId when sent. The condition link is\r\nnot part of this update; use PUT {id}/tasks/{taskId}/condition. Deprecated: use the matching conditions route; the task routes are withdrawn on the Sunset date in the response headers.","operationId":"LoanApplications_UpdateLoanApplicationTask","parameters":[{"name":"id","in":"path","description":"The unique identifier of the loan application.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","description":"The unique identifier of the task to be updated.","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"The request payload containing updated task details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLoanApplicationTaskRequest"}}}},"responses":{"200":{"description":"Loan application task updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Modified"}}}},"400":{"description":"Invalid identifier or request payload","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Missing, invalid or expired access token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The client application is not authorized to perform this action","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan application or task not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"deprecated":true}}}}
```

## Deletes a specific task associated with a loan application.

> \*\*Required scope:\*\* \`delete:loan-applications\`\
> \
> Deprecated: use the matching conditions route; the task routes are withdrawn on the Sunset date in the response headers.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/tasks/{taskId}":{"delete":{"tags":["Conditions"],"summary":"Deletes a specific task associated with a loan application.","description":"**Required scope:** `delete:loan-applications`\n\nDeprecated: use the matching conditions route; the task routes are withdrawn on the Sunset date in the response headers.","operationId":"LoanApplications_DeleteLoanApplicationTask","parameters":[{"name":"id","in":"path","description":"The unique identifier of the loan application.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","description":"The unique identifier of the task to be deleted.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Loan application task deleted successfully"},"400":{"description":"Invalid identifier","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Missing, invalid or expired access token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The client application is not authorized to perform this action","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan application or task not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"deprecated":true}}}}
```

## Accept Loan Application Task by ID

> \*\*Required scope:\*\* \`update:loan-applications\`\
> \
> Deprecated: use the matching conditions route; the task routes are withdrawn on the Sunset date in the response headers.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Modified":{"required":["id"],"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the entity that was modified."},"type":{"type":"string","description":"A string indicating the type or category of the modified entity (e.g., “Webhook”, “LoanApplicationTask”).","nullable":true},"createdTimestamp":{"type":"string","description":"The timestamp when the entity was first created.","format":"date-time","nullable":true},"updatedTimestamp":{"type":"string","description":"The timestamp when the entity was last updated.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Represents an audit record for an entity that has been created or updated."},"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/tasks/{taskId}/accept":{"post":{"tags":["Conditions"],"summary":"Accept Loan Application Task by ID","description":"**Required scope:** `update:loan-applications`\n\nDeprecated: use the matching conditions route; the task routes are withdrawn on the Sunset date in the response headers.","operationId":"LoanApplications_AcceptLoanApplicationTaskDocument","parameters":[{"name":"id","in":"path","description":"The unique identifier of the loan application.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","description":"The unique identifier of the task to be accepted.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Loan application task accepted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Modified"}}}},"400":{"description":"Invalid identifier","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Missing, invalid or expired access token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The client application is not authorized to perform this action","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan application task not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"The document is held in the loan origination system (code `DocumentHeldInLos`), or the loan refuses the change (code `BusinessRuleViolation`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"deprecated":true}}}}
```

## Sign off a section of a Loan Application

> \*\*Required scope:\*\* \`update:loan-applications\`\
> \
> Completes the section's verification task (for example About You Verification) as Accepted.> \
> Refused with a 400 while the section's required fields are unanswered: the body's> \
> \`code\` is \`LoanApplicationIncomplete\` and \`blockers\` lists the missing fields.> \
> The response is the loan's completion report after the sign-off, so the caller sees what still> \
> stands between the loan and a submit. Read the section task ids from> \
> \`GET loan-applications/{id}?include=completion\` (each blocker carries its \`taskId\`) or> \
> \`GET loan-applications/{id}/tasks\`.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"LoanAppSectionCompletionReport":{"type":"object","properties":{"sections":{"type":"array","items":{"$ref":"#/components/schemas/LoanAppSectionCompletion"},"description":"Per-section completion report for the 7 borrower wizard sections, in sidebar order. Each entry carries the section status plus the required fields that still have no value, mirroring the frontend's section validation exactly.","nullable":true},"missingRequiredFields":{"type":"array","items":{"$ref":"#/components/schemas/LoanAppMissingField"},"description":"Every required field that still has no value, across all sections, in the order the application asks for them (section by section, top to bottom). The first entry is the next field to fill in.","nullable":true},"pairs":{"type":"array","items":{"$ref":"#/components/schemas/LoanAppPairCompletion"},"description":"The missing required fields and rule errors of all sections grouped by borrower pair. missingRequiredFields keeps every entry; this adds the grouping.","nullable":true},"allSectionsComplete":{"type":"boolean","description":"True when every section's status is 'Completed' or 'Accepted' (the agent-side completion bar used for submission)."},"isReadyToSubmit":{"type":"boolean","description":"True when the loan application can be submitted right now: not already submitted, every section signed off, every validated section's required fields answered, and every required borrower task Uploaded/Submitted/Accepted. The server refuses a submit while this is false."},"submitBlockers":{"type":"array","items":{"type":"string"},"description":"Human-readable reasons the loan application cannot be submitted yet. Empty when isReadyToSubmit is true.","nullable":true},"blockers":{"type":"array","items":{"$ref":"#/components/schemas/LoanAppReadinessBlocker"},"description":"The same reasons as submitBlockers, structured: kind, section or task, status, and the missing fields.","nullable":true}},"additionalProperties":false,"description":"How complete the borrower's loan application is, section by section, and whether it can be submitted."},"LoanAppSectionCompletion":{"type":"object","properties":{"sectionName":{"type":"string","description":"Wizard section name as shown in the borrower UI sidebar: 'About You', 'Loan & Property', 'Work & Income', 'Assets', 'Liabilities', 'Real Estate', or 'Additional Details'.","nullable":true},"taskCode":{"type":"string","description":"Code of the verification task that tracks this section, e.g. 'LoanAndPropertyVerification'.","nullable":true},"taskName":{"type":"string","description":"Name of the verification task that tracks this section, e.g. 'Loan and Property Verification'.","nullable":true},"status":{"type":"string","description":"Normalized section status as the borrower UI sidebar shows it: 'NotStarted', 'InProgress', 'Submitted', 'Completed', or 'Accepted'. Derived from the verification task status; sections in 'Completed' or 'Accepted' count toward overall loan app completion.","nullable":true},"rawTaskStatusName":{"type":"string","description":"The verification task's raw status name as stored (e.g. 'Uploaded', 'Requested'); null when the loan has no verification task for this section (e.g. loans synced from the LOS that never went through the wizard).","nullable":true},"isValid":{"type":"boolean","description":"True when every required field in this section has a value and no section rule is violated, i.e. the borrower could press 'Complete Section' right now. Always true for Assets and Liabilities, which have no field-level validation here (use the section status for them)."},"fields":{"type":"array","items":{"$ref":"#/components/schemas/LoanAppFieldStatus"},"description":"Every wizard field in this section with its per-loan required flag and whether it currently holds a value. Empty for Assets and Liabilities, which have no field-level validation.","nullable":true},"missingRequiredFields":{"type":"array","items":{"$ref":"#/components/schemas/LoanAppMissingField"},"description":"Convenience list: the entries from 'fields' that are required and have no value. Empty when the section's data is complete.","nullable":true},"ruleErrors":{"type":"array","items":{"$ref":"#/components/schemas/LoanAppSectionRuleError"},"description":"Cross-field rule violations in this section (e.g. 2-year address/employment history gaps, loan amount above purchase price). Empty when no rules are violated.","nullable":true},"pairs":{"type":"array","items":{"$ref":"#/components/schemas/LoanAppPairCompletion"},"description":"The same missing fields and rule errors grouped by borrower pair. The flat lists above keep every entry; this adds the grouping. Empty for sections with no per-borrower fields.","nullable":true},"notes":{"type":"array","items":{"type":"string"},"description":"Caveats about how this section's completion is evaluated, when applicable.","nullable":true}},"additionalProperties":false},"LoanAppFieldStatus":{"type":"object","properties":{"path":{"type":"string","description":"Dot-path of the field, e.g. 'loanInfo.borrowers[0].currentAddress.zipCode'. Matches the frontend validation key and doubles as the camelCase JSON path into this same response.","nullable":true},"label":{"type":"string","description":"Human-readable label for the field, e.g. 'Co-Borrower Current Address ZIP Code'.","nullable":true},"required":{"type":"boolean","description":"Whether this field is required for THIS loan, with conditional rules already resolved (e.g. purchase price is not required on a Refinance, dependent ages only when the borrower has dependents). A field that is required and has no value blocks section completion."},"hasValue":{"type":"boolean","description":"Whether the field currently holds an acceptable value. False when empty AND when a value fails its format check (e.g. a malformed SSN or email), matching the wizard's treatment of invalid values as missing. required && !hasValue means the field is blocking section completion."},"borrower":{"type":"string","description":"'Borrower' or 'CoBorrower' when the field belongs to a specific applicant; null for loan-level fields.","nullable":true},"pairIndex":{"type":"integer","description":"The borrower pair (0 is the primary pair) the field belongs to; null for loan-level fields.","format":"int32","nullable":true}},"additionalProperties":false},"LoanAppMissingField":{"type":"object","properties":{"fieldPath":{"type":"string","description":"Dot-path of the required field that has no value, e.g. 'loanInfo.borrowers[0].currentAddress.zipCode'. Matches the frontend validation key and doubles as the camelCase JSON path into this same response.","nullable":true},"label":{"type":"string","description":"Human-readable label for the field, e.g. 'Co-Borrower Current Address ZIP Code'.","nullable":true},"section":{"type":"string","description":"The wizard section the field is on, e.g. 'About You'.","nullable":true},"borrower":{"type":"string","description":"'Borrower' or 'CoBorrower' when the field belongs to a specific applicant; null for loan-level fields.","nullable":true},"pairIndex":{"type":"integer","description":"The borrower pair (0 is the primary pair) the field belongs to; null for loan-level fields.","format":"int32","nullable":true}},"additionalProperties":false},"LoanAppSectionRuleError":{"type":"object","properties":{"message":{"type":"string","description":"Cross-field rule violation message, identical to the text the borrower-facing wizard shows (e.g. 'Address history must be at least 2 years', 'Missing March 2024 - May 2024'). Month-coverage rules are evaluated with the server clock, so results near a month boundary can differ by one month from a browser in another timezone.","nullable":true},"borrower":{"type":"string","description":"'Borrower' or 'CoBorrower' when the rule applies to a specific applicant; null for loan-level rules.","nullable":true},"pairIndex":{"type":"integer","description":"The borrower pair (0 is the primary pair) the rule belongs to; null for loan-level rules.","format":"int32","nullable":true}},"additionalProperties":false},"LoanAppPairCompletion":{"type":"object","properties":{"pairIndex":{"type":"integer","description":"The borrower pair's position on the loan; 0 is the primary pair.","format":"int32"},"isValid":{"type":"boolean","description":"True when this pair has no missing required field and no rule error."},"missingRequiredFields":{"type":"array","items":{"$ref":"#/components/schemas/LoanAppMissingField"},"description":"The required fields of this pair's borrower and co-borrower that still have no value.","nullable":true},"ruleErrors":{"type":"array","items":{"$ref":"#/components/schemas/LoanAppSectionRuleError"},"description":"The cross-field rule violations of this pair's borrower and co-borrower.","nullable":true},"status":{"type":"string","description":"Normalized status of this pair's own verification task for the section ('NotStarted', 'InProgress', 'Submitted', 'Completed', 'Accepted'). Set only when pairs are enabled, and only on sections that have one task per pair.","nullable":true},"rawTaskStatusName":{"type":"string","description":"This pair's verification task's raw status name; null when the pair has no task for the section yet.","nullable":true},"taskId":{"type":"string","description":"Id of this pair's verification task for the section, the id sign_off_loan_section takes; null when the pair has no task yet.","format":"uuid","nullable":true}},"additionalProperties":false},"LoanAppReadinessBlocker":{"type":"object","properties":{"kind":{"type":"string","description":"'AlreadySubmitted', 'SectionNotSignedOff', 'MissingFields', 'RequiredTask' or 'InvalidAsset'.","nullable":true},"section":{"type":"string","description":"Wizard section name, for SectionNotSignedOff and MissingFields.","nullable":true},"pairIndex":{"type":"integer","description":"The borrower pair (0 is the primary pair) a MissingFields blocker belongs to; null for a loan-level blocker.","format":"int32","nullable":true},"taskCode":{"type":"string","description":"Code of the section's verification task, for SectionNotSignedOff and MissingFields.","nullable":true},"taskId":{"type":"string","description":"The blocking task's id, for SectionNotSignedOff and RequiredTask; null when the section has no task.","format":"uuid","nullable":true},"task":{"type":"string","description":"The blocking task's name, for RequiredTask.","nullable":true},"status":{"type":"string","description":"The blocking task's status: the normalized section status for SectionNotSignedOff, the raw task status name for RequiredTask.","nullable":true},"assetAccountId":{"type":"string","description":"The asset account that cannot be submitted, for InvalidAsset; the message names the asset.","format":"uuid","nullable":true},"missingFields":{"type":"array","items":{"$ref":"#/components/schemas/LoanAppMissingField"},"description":"Required fields with no value, for MissingFields.","nullable":true},"ruleErrors":{"type":"array","items":{"$ref":"#/components/schemas/LoanAppSectionRuleError"},"description":"Cross-field rule violations, for MissingFields.","nullable":true},"message":{"type":"string","description":"Human-readable form of this blocker.","nullable":true}},"additionalProperties":false,"description":"One reason a loan application cannot move forward (a section sign-off or the final submit).\r\nStructured so a client can render it without parsing text; `message` is the\r\nhuman-readable form."},"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/tasks/{taskId}/complete":{"post":{"tags":["Conditions"],"summary":"Sign off a section of a Loan Application","description":"**Required scope:** `update:loan-applications`\n\nCompletes the section's verification task (for example About You Verification) as Accepted.\r\nRefused with a 400 while the section's required fields are unanswered: the body's\r\n`code` is `LoanApplicationIncomplete` and `blockers` lists the missing fields.\r\nThe response is the loan's completion report after the sign-off, so the caller sees what still\r\nstands between the loan and a submit. Read the section task ids from\r\n`GET loan-applications/{id}?include=completion` (each blocker carries its `taskId`) or\r\n`GET loan-applications/{id}/tasks`.","operationId":"LoanApplicationsSubmission_SignOffSection","parameters":[{"name":"id","in":"path","description":"The loan application's id (a GUID). Send the empty GUID `00000000-0000-0000-0000-000000000000` when you address the loan by `externalId` instead. A loan in another company answers 404, the same as one that does not exist.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","description":"The section verification task to sign off.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"externalId","in":"query","description":"The loan's id in the loan origination system (`loanInfo.loanId` on a loan read; not the loan number), to address the loan by instead of the path `id`: put the empty GUID in the path; when sent it is matched exactly and wins over the path `id`, and a value that matches no loan in your company answers 404.","schema":{"type":"string"}}],"responses":{"200":{"description":"Signed off. The loan's completion report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanAppSectionCompletionReport"}}}},"400":{"description":"The section's required fields are unanswered (code LoanApplicationIncomplete, with blockers)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Missing, invalid or expired access token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan or section task not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Links, moves or unlinks a task to a condition on the specified loan application.

> \*\*Required scope:\*\* \`update:loan-applications\`\
> \
> Only the condition link changes. Every copy of a multi-document request moves together, unless> \
> detachFromRequest is true. Any of the task's documents already filed in the Loan Origination> \
> System are re-associated from the old condition to the new one before the task is saved, so a> \
> refusal there (422) leaves the task where it was. Setting the condition the task is already> \
> under changes nothing. Deprecated: use the matching conditions route; the task routes are withdrawn on the Sunset date in the response headers.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"SetLoanAppTaskConditionRequest":{"type":"object","properties":{"conditionTaskId":{"type":"string","description":"The condition to file the task under. Null unlinks it from its current condition.","format":"uuid","nullable":true},"detachFromRequest":{"type":"boolean","description":"True moves only this task: it first leaves its multi-document request, so the request's\r\nother copies stay where they are and are no longer tied to it. False (the default) moves\r\nevery copy of the request together."}},"additionalProperties":false,"description":"Moves a task to a condition in one step: the link changes and any of the task's documents already filed in the Loan Origination System are re-associated from the old condition to the new one. A null conditionTaskId unlinks the task."},"Modified":{"required":["id"],"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the entity that was modified."},"type":{"type":"string","description":"A string indicating the type or category of the modified entity (e.g., “Webhook”, “LoanApplicationTask”).","nullable":true},"createdTimestamp":{"type":"string","description":"The timestamp when the entity was first created.","format":"date-time","nullable":true},"updatedTimestamp":{"type":"string","description":"The timestamp when the entity was last updated.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Represents an audit record for an entity that has been created or updated."},"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/tasks/{taskId}/condition":{"put":{"tags":["Conditions"],"summary":"Links, moves or unlinks a task to a condition on the specified loan application.","description":"**Required scope:** `update:loan-applications`\n\nOnly the condition link changes. Every copy of a multi-document request moves together, unless\r\ndetachFromRequest is true. Any of the task's documents already filed in the Loan Origination\r\nSystem are re-associated from the old condition to the new one before the task is saved, so a\r\nrefusal there (422) leaves the task where it was. Setting the condition the task is already\r\nunder changes nothing. Deprecated: use the matching conditions route; the task routes are withdrawn on the Sunset date in the response headers.","operationId":"LoanApplications_SetLoanApplicationTaskCondition","parameters":[{"name":"id","in":"path","description":"The unique identifier of the loan application.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","description":"The unique identifier of the task.","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"The condition to file the task under; a null conditionTaskId unlinks it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetLoanAppTaskConditionRequest"}}}},"responses":{"200":{"description":"Loan application task condition set successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Modified"}}}},"400":{"description":"Invalid identifier or request payload","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The client application is not authorized to perform this action","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan application or task not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"The Loan Origination System refused the move; the task was not changed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"deprecated":true}}}}
```

## Uploads a document to a specific task within a loan application.

> \*\*Required scope:\*\* \`update:loan-applications\`\
> \
> Deprecated: use the matching conditions route; the task routes are withdrawn on the Sunset date in the response headers.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Modified":{"required":["id"],"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the entity that was modified."},"type":{"type":"string","description":"A string indicating the type or category of the modified entity (e.g., “Webhook”, “LoanApplicationTask”).","nullable":true},"createdTimestamp":{"type":"string","description":"The timestamp when the entity was first created.","format":"date-time","nullable":true},"updatedTimestamp":{"type":"string","description":"The timestamp when the entity was last updated.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Represents an audit record for an entity that has been created or updated."},"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/tasks/{taskId}/documents":{"post":{"tags":["Conditions"],"summary":"Uploads a document to a specific task within a loan application.","description":"**Required scope:** `update:loan-applications`\n\nDeprecated: use the matching conditions route; the task routes are withdrawn on the Sunset date in the response headers.","operationId":"LoanApplications_UploadLoanApplicationTaskDocument","parameters":[{"name":"id","in":"path","description":"The unique identifier of the loan application.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","description":"The unique identifier of the task within the loan application.","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","description":"The file to be uploaded.","format":"binary"}}},"encoding":{"file":{"style":"form"}}}}},"responses":{"200":{"description":"Loan application task document uploaded successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Modified"}}}},"400":{"description":"Invalid identifier or the file is missing/invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Missing, invalid or expired access token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The client application is not authorized to perform this action","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan application or task not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"deprecated":true}}}}
```

## Retrieves a specific document associated with a loan application task.

> \*\*Required scope:\*\* \`read:loan-applications\`\
> \
> Deprecated: use the matching conditions route; the task routes are withdrawn on the Sunset date in the response headers.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/tasks/{taskId}/documents/{documentId}":{"get":{"tags":["Conditions"],"summary":"Retrieves a specific document associated with a loan application task.","description":"**Required scope:** `read:loan-applications`\n\nDeprecated: use the matching conditions route; the task routes are withdrawn on the Sunset date in the response headers.","operationId":"LoanApplications_GetLoanApplicationTaskDocument","parameters":[{"name":"id","in":"path","description":"The unique identifier of the loan application.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","description":"The unique identifier of the task within the loan application.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentId","in":"path","description":"The unique identifier of the document associated with the task.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"isOriginal","in":"query","description":"A boolean indicating whether to return the original file (true) or the converted PDF version (false). Default is false.","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"The document's file: a PDF, or with isOriginal=true the file as it was uploaded, whose Content-Type header names its type.","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}},"*/*":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid identifier","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Missing, invalid or expired access token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The client application is not authorized to access this resource","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan application, task or document not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"The document is held in the loan origination system and has no file here (code `DocumentHeldInLos`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"deprecated":true}}}}
```

## Answer a question task on a Loan Application

> \*\*Required scope:\*\* \`update:loan-applications\`\
> \
> Answers, or changes the answer to, a question task such as the Employment History Explanation,> \
> which a submit requires. The task moves to Submitted. Send \`yesNoResponse\` for a yes/no> \
> question and \`shortAnswer\` for a short-answer one.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"AnswerLoanApplicationQuestionRequest":{"type":"object","properties":{"yesNoResponse":{"type":"boolean","description":"The answer to a yes/no question.","nullable":true},"shortAnswer":{"type":"string","description":"The answer to a short-answer question, for example the Employment History Explanation.","nullable":true}},"additionalProperties":false,"description":"The answer to a question task. Send the field the question asks for: a yes/no question takes\r\n`yesNoResponse`, a short-answer question takes `shortAnswer`. Send `yesNoResponse` or `shortAnswer`; a body with neither is refused."},"Modified":{"required":["id"],"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the entity that was modified."},"type":{"type":"string","description":"A string indicating the type or category of the modified entity (e.g., “Webhook”, “LoanApplicationTask”).","nullable":true},"createdTimestamp":{"type":"string","description":"The timestamp when the entity was first created.","format":"date-time","nullable":true},"updatedTimestamp":{"type":"string","description":"The timestamp when the entity was last updated.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Represents an audit record for an entity that has been created or updated."},"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/tasks/{taskId}/question/answer":{"put":{"tags":["Conditions"],"summary":"Answer a question task on a Loan Application","description":"**Required scope:** `update:loan-applications`\n\nAnswers, or changes the answer to, a question task such as the Employment History Explanation,\r\nwhich a submit requires. The task moves to Submitted. Send `yesNoResponse` for a yes/no\r\nquestion and `shortAnswer` for a short-answer one.","operationId":"LoanApplicationsSubmission_AnswerQuestion","parameters":[{"name":"id","in":"path","description":"The loan application's id (a GUID). Send the empty GUID `00000000-0000-0000-0000-000000000000` when you address the loan by `externalId` instead. A loan in another company answers 404, the same as one that does not exist.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","description":"The question task to answer.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"externalId","in":"query","description":"The loan's id in the loan origination system (`loanInfo.loanId` on a loan read; not the loan number), to address the loan by instead of the path `id`: put the empty GUID in the path; when sent it is matched exactly and wins over the path `id`, and a value that matches no loan in your company answers 404.","schema":{"type":"string"}}],"requestBody":{"description":"The answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerLoanApplicationQuestionRequest"}}}},"responses":{"200":{"description":"Answered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Modified"}}}},"400":{"description":"No answer was sent","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Missing, invalid or expired access token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan or question task not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Rejects a specific task within a loan application.

> \*\*Required scope:\*\* \`update:loan-applications\`\
> \
> Deprecated: use the matching conditions route; the task routes are withdrawn on the Sunset date in the response headers.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"RejectLoanApplicationTaskDocumentRequest":{"required":["rejectionReason"],"type":"object","properties":{"rejectionReasonNote":{"type":"string","description":"A note for the borrower explaining why the document was rejected; optional.","nullable":true},"rejectionReason":{"$ref":"#/components/schemas/TaskRejectionReasonRequest"}},"additionalProperties":false},"TaskRejectionReasonRequest":{"required":["id"],"type":"object","properties":{"id":{"type":"string","description":"Id (GUID) of the rejection reason, from the task rejection reasons lookup.","format":"uuid"},"name":{"type":"string","description":"The rejection reason's name.","nullable":true}},"additionalProperties":false,"description":"The reason a task's document is rejected, chosen from the task rejection reasons lookup."},"Modified":{"required":["id"],"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the entity that was modified."},"type":{"type":"string","description":"A string indicating the type or category of the modified entity (e.g., “Webhook”, “LoanApplicationTask”).","nullable":true},"createdTimestamp":{"type":"string","description":"The timestamp when the entity was first created.","format":"date-time","nullable":true},"updatedTimestamp":{"type":"string","description":"The timestamp when the entity was last updated.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Represents an audit record for an entity that has been created or updated."},"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/tasks/{taskId}/reject":{"post":{"tags":["Conditions"],"summary":"Rejects a specific task within a loan application.","description":"**Required scope:** `update:loan-applications`\n\nDeprecated: use the matching conditions route; the task routes are withdrawn on the Sunset date in the response headers.","operationId":"LoanApplications_RejectLoanApplicationTaskDocument","parameters":[{"name":"id","in":"path","description":"The unique identifier of the loan application.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","description":"The unique identifier of the task to be rejected.","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"The request payload containing the rejection reason and optional note.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectLoanApplicationTaskDocumentRequest"}}}},"responses":{"200":{"description":"Loan application task rejected successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Modified"}}}},"400":{"description":"Invalid identifier","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Missing, invalid or expired access token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The client application is not authorized to perform this action","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan application task not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"The loan refuses the change (code `BusinessRuleViolation`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"deprecated":true}}}}
```

## Sets the status of a task on the specified loan application.

> \*\*Required scope:\*\* \`update:loan-applications\`\
> \
> Runs what the web app runs for the same change, so its side effects follow. Only Loan> \
> Application tasks change status this way: a document task moves by upload, accept and reject.> \
> Section verification tasks are refused (they are signed off through the section sign-off> \
> path), and so are underwriting conditions (they are signed off in the Loan Origination System). Deprecated: use the matching conditions route; the task routes are withdrawn on the Sunset date in the response headers.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"SetLoanApplicationTaskStatusRequest":{"required":["status"],"type":"object","properties":{"status":{"type":"string","description":"Required. InProgress, Complete or Requested."}},"additionalProperties":false},"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/tasks/{taskId}/status":{"post":{"tags":["Conditions"],"summary":"Sets the status of a task on the specified loan application.","description":"**Required scope:** `update:loan-applications`\n\nRuns what the web app runs for the same change, so its side effects follow. Only Loan\r\nApplication tasks change status this way: a document task moves by upload, accept and reject.\r\nSection verification tasks are refused (they are signed off through the section sign-off\r\npath), and so are underwriting conditions (they are signed off in the Loan Origination System). Deprecated: use the matching conditions route; the task routes are withdrawn on the Sunset date in the response headers.","operationId":"LoanApplications_SetLoanApplicationTaskStatus","parameters":[{"name":"id","in":"path","description":"The unique identifier of the loan application.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","description":"The unique identifier of the task.","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"The status to move the task to: InProgress, Complete or Requested.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetLoanApplicationTaskStatusRequest"}}}},"responses":{"204":{"description":"Loan application task status set successfully"},"400":{"description":"Unknown status, or a task whose status cannot be set this way","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The client application is not authorized to perform this action","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan application or task not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"deprecated":true}}}}
```

## Lists the users a task on the specified loan application can be assigned to.

> \*\*Required scope:\*\* \`read:loan-applications\`\
> \
> The loan officer, their ConciergeKey user when they have one, and the company's processors.> \
> Admin applications only, matching the web app, where administrators, processors and> \
> ConciergeKey users can assign tasks. Deprecated: use the matching conditions route; the task routes are withdrawn on the Sunset date in the response headers.

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"GetAssignableTaskUsersResponse":{"type":"object","properties":{"loanAppId":{"type":"string","description":"Id (GUID) of the loan.","format":"uuid"},"users":{"type":"array","items":{"$ref":"#/components/schemas/AssignableTaskUser"},"description":"The staff users a task on this loan can be assigned to.","nullable":true}},"additionalProperties":false},"AssignableTaskUser":{"type":"object","properties":{"id":{"type":"string","description":"Id (GUID) of the user; send it as userId to assign a task to them.","format":"uuid"},"firstName":{"type":"string","description":"The user's first name.","nullable":true},"lastName":{"type":"string","description":"The user's last name.","nullable":true},"role":{"type":"string","description":"The user's role on the loan, for example LoanOfficer or ConciergeKey.","nullable":true}},"additionalProperties":false},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/loan-applications/{id}/tasks/assignable-users":{"get":{"tags":["Conditions"],"summary":"Lists the users a task on the specified loan application can be assigned to.","description":"**Required scope:** `read:loan-applications`\n\nThe loan officer, their ConciergeKey user when they have one, and the company's processors.\r\nAdmin applications only, matching the web app, where administrators, processors and\r\nConciergeKey users can assign tasks. Deprecated: use the matching conditions route; the task routes are withdrawn on the Sunset date in the response headers.","operationId":"LoanApplications_GetAssignableTaskUsers","parameters":[{"name":"id","in":"path","description":"The unique identifier of the loan application.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Assignable users retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAssignableTaskUsersResponse"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The client application is not authorized to access this resource","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Loan application not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"deprecated":true}}}}
```

## Loan Application Task Rejection Reasons

> \*\*Required scope:\*\* \`read:types\`

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"TypeResponse":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier (GUID) of the type; send it where an endpoint asks for this type.","format":"uuid"},"name":{"type":"string","description":"Display name of the type.","nullable":true}},"additionalProperties":false},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/types/task-rejection-reasons":{"get":{"tags":["Conditions"],"summary":"Loan Application Task Rejection Reasons","description":"**Required scope:** `read:types`","operationId":"Types_TaskRejectionReasons","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TypeResponse"}}}}},"401":{"description":"Missing, invalid or expired access token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The access token lacks the read:types scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Loan Application Task Sets

> \*\*Required scope:\*\* \`read:types\`

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Conditions","description":"A loan's conditions and the requests under them: create, read, change and clear them, upload a document to one, and accept or reject what was uploaded. The `/tasks` routes are deprecated in favour of the `/conditions` routes; the Deprecated table in Changelog and versioning gives their sunset dates.\n\n`GET /types/task-types` and `GET /types/task-rejection-reasons` list the request types and rejection reasons the other routes accept.\n\n**Scopes:** `create:loan-applications`, `delete:loan-applications`, `read:loan-applications`, `read:types`, `update:loan-applications`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"TaskType":{"type":"object","properties":{"id":{"type":"string","description":"Id of the task type (GUID).","format":"uuid"},"code":{"type":"string","description":"Stable code of the task type.","nullable":true},"name":{"type":"string","description":"Display name of the task type.","nullable":true}},"additionalProperties":false,"description":"The kind of task."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/types/task-types":{"get":{"tags":["Conditions"],"summary":"Loan Application Task Sets","description":"**Required scope:** `read:types`","operationId":"Types_LoanApplicationTaskTypes","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TaskType"}}}}},"401":{"description":"Missing, invalid or expired access token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The access token lacks the read:types scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://api-docs.hengelending.com/api/api-reference/conditions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
