Manage an Application via the API
Use this guide after creating an application to manage the deal through its full API lifecycle: update application data, upload documents, run underwriting, create placements and offers, close the deal, and record funding activity. Before you begin, you need:- An integration token with the required application and workflow permissions, or a Bearer token from the Get Bearer Token endpoint.
- The application UUID returned when the application was created.
- A Workflow Builder template configured with the stages and Builders your process uses.
Application lifecycle
Follow the stages configured in the application’s workflow. A typical API-managed deal follows this sequence:- Retrieve and update the application.
- Upload bank statements, the signed application, and other required documents.
- Advance the deal to the Underwriting stage and run Data Orchestration.
- Advance the deal to the Scorecards stage and run Scorecards.
- Advance the deal to the Placement stage.
- Create and manage lender placements.
- Create, share, and manage offers.
- Accept an offer and advance the deal to closing.
- Confirm the final offer terms and advance the deal to funded.
- Record funding transactions when the funded product supports them.
1. Retrieve the application
Call Get Application with the application UUID. Use the response to confirm the application’s current information before sending an update. Re-retrieve the application after asynchronous operations or webhook notifications so your integration acts on the latest saved state.2. Update application data
Application fields depend on the workflow template assigned when the deal was created.- Call Sample Payload - Workflow to retrieve the expected fields for the application.
- Send the fields that changed to Update Application Workflow Data.
- Retrieve the application again to confirm the saved values.
3. Upload application documents
Upload and categorize files
Use Upload Multiple Application Files for bank statements, signed applications, and other application documents. The current route is:files with its file. Do not specify file_type, and omit skip_categorization. Lendflow categorizes each file by its contents and assigns the appropriate type, including bank statements and signed applications.
Set
skip_categorization only when your integration intentionally needs to preserve a supplied category. For the standard upload flow, omit the flag and let Lendflow categorize the files.Retrieve uploaded documents
- Use List Application Files to retrieve the current file IDs and categories.
- Use Download Application File to download a specific file.
4. Move through workflow stages
Retrieve the application’s configured stages with Show Workflow Stages. Each stage includes an ID, name, and stage type. Use Move to Next Workflow Stage to advance through the configured flow one stage at a time. This is the preferred transition because it follows the application’s workflow order and stage validation. Use Get Workflow Status to retrieve configured status choices. Use Update Workflow Status to update those labels without changing the stage. If the deal should no longer proceed, use Decline Application. Declining the application marks the deal as dead; it is not a substitute for declining one placement or offer.5. Run Data Orchestration
Run Data Orchestration when the deal reaches the Underwriting stage where the published template is available. The API flow is:- Find a published template compatible with the application and stage.
- Execute the template for the application.
- Monitor the asynchronous run through its Data Orchestration log.
- Use the completed outcome and history in your underwriting decision.
6. Run Scorecards
After Data Orchestration is complete, advance the application to its separate Scorecards stage. Scorecards evaluate information already stored on the application. When the scorecard depends on current provider data, complete Data Orchestration before running the scorecard. The API flow is:- Retrieve the application’s Scorecards stage ID.
- List the finished scorecards available for the application and stage.
- Run selected scorecards or scorecard groups, or omit their ID lists to run all eligible templates.
- Retrieve the individual or group results after processing finishes. Follow Scorecards via API for the current endpoints, result retrieval, and webhook events.
7. Create and manage placements
A placement represents an application sent to a funder for a specific product.Create a placement
Call Create Lender Placement when the application reaches its Placement stage. The request identifies:- The funder.
- The product.
- The application’s Placement stage ID.
- The delivery method, such as API, email, manual, or Lendflow-managed placement.
Review and update placements
- Use List Application Placements to list placements.
- Use Get Application Placement to retrieve one placement.
- Use Update Lender Placement Status to update a placement.
8. Create and manage offers
Create an offer
- Select an approved placement belonging to the application.
- Use List Offer Templates to select the correct template and retain its ID.
- Retrieve the selected template’s expected offer fields.
- Call Create Offer with the application UUID, approved
placement_id, and requiredoffer_template_id. - Save the offer UUID returned in the response.
Manage the offer
Offer-status updates are asynchronous. Retrieve the offer after the update completes or process the corresponding offer webhook before continuing.
9. Close and fund the deal
Accepting, confirming, and funding an offer are separate actions:- Set the selected offer’s status to Accepted.
- Advance the application through its configured workflow until it reaches Closing.
- Call Confirm Offer with the final closing fields defined by the offer template.
- Advance the application through the remaining configured stages until it reaches Funded.
- Retrieve the application and offer to confirm their final state.
Create a Funded Offer is a shortcut for eligible self-funded deals. It creates, accepts, and confirms the offer. Automatic movement to Funded applies to linear workflows; other workflows must still be advanced through their configured stages.
10. Add funding transactions
Funding transactions record activity after an application is funded. They do not move the application to Funded. Transactions are currently supported for:- Line of Credit, where a transaction represents a draw.
- ARLOC, where a transaction represents an invoice.
Creating a transaction requires
transaction_amount and transaction_date. Additional fields, such as payment terms, invoice due date, commission, or accounting code, depend on the transaction.
Use webhooks throughout the flow
Use Custom Workflow Webhooks to notify your integration when applications, documents, underwriting runs, placements, and offers change. For every event:- Verify the webhook signature.
- Use the payload to identify the application or related resource.
- Retrieve the current resource from the API.
- Apply an idempotent update so duplicate webhook delivery does not repeat the action.
FAQ
What is the difference between a workflow stage and a workflow status?
What is the difference between a workflow stage and a workflow status?
A stage identifies where the application is in the configured process. A status or sub-status describes the application’s state without moving it to another stage.
Should Data Orchestration run before Scorecards?
Should Data Orchestration run before Scorecards?
Run Data Orchestration first when the scorecard requires current Data Services results. A scorecard evaluates information already stored on the application and does not request new provider data.
What is the difference between a placement ID and an offer ID?
What is the difference between a placement ID and an offer ID?
A placement identifies the opportunity sent to a funder for a product. An offer belongs to an approved placement and receives its own ID when created.
Does confirming an offer close or fund the application?
Does confirming an offer close or fund the application?
No. Confirming records final closing terms. Accept the offer, move the application to Closing, confirm it, and then advance the application through the configured workflow to Funded.
Does creating a funding transaction fund the deal?
Does creating a funding transaction fund the deal?
No. The application must already be in the Funded stage. A funding transaction records a later Line of Credit draw or ARLOC invoice.
Should my integration poll or use webhooks?
Should my integration poll or use webhooks?
Use webhooks for event-driven processing and retrieve the current resource after each event. Poll asynchronous resources when your integration must control the check interval or when a completion webhook is not configured.
Next steps
Submit a New Application via the API
Create the application that starts this lifecycle.
Data Orchestration via API
Run underwriting data and decision flows.
Scorecards via API
Run scorecards and retrieve their results.
Configure Custom Workflow Webhooks
Receive lifecycle notifications in your integration.