> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lendflow.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Golden Path for Funders

## Golden Path for Funders

Use this guide to receive a deal, retrieve the information needed for underwriting, submit an offer, and keep the offer status synchronized with Lendflow.

| Step | Outcome |
| - | - |
| 1. Authenticate | Create an integration token and authorize API requests. |
| 2. Receive the deal | Use webhooks to know when an application is ready for review. |
| 3. Retrieve underwriting data | Retrieve the application, documents, bank data, and provider results. |
| 4. Complete underwriting | Run Data Orchestration when needed and advance the deal through the configured workflow. |
| 5. Submit an offer | Create an offer for the placement using its configured offer template. |
| 6. Manage the offer | Retrieve, update, share, confirm, or decline the offer as its status changes. |

## 1. Authenticate API requests

Create a personal access token from **Profile → Integration Tokens** in the Lendflow Dashboard. Store the token securely because its plain-text value is displayed only once.

Send the token with each API request:

```http theme={"system"}
Authorization: Bearer <token>
Accept: application/json
```

See [Authentication Overview](/lendflow-external/docs/authentication-overview), [Integration Tokens](/lendflow-external/docs/integration-tokens), and [Create Personal Access Token](/api-reference/access-tokens/create-personal-access-token).

## 2. Receive and verify deal notifications

Configure custom workflow webhooks so your system knows when a deal requires action. Common events in a funder integration include:

* **Application Fully Submitted**, when the application is ready to retrieve.
* **Any Document Uploaded**, when a new underwriting document is available.
* **Data Orchestration Outcome Reached**, when an orchestration run finishes.
* **Offer Accepted**, **Offer Declined**, and **Offer Retracted**, when an offer changes.
* **Application Dead**, when the deal is no longer active.

Treat webhook delivery as a notification, then retrieve the latest resource from the API before taking action. Always [verify webhook authenticity](/lendflow-external/docs/verifying-webhook-authenticity) before processing the payload.

See [Custom Workflow Webhooks](/lendflow-external/docs/custom-workflows-webhooks) for configuration and event payloads.

## 3. Retrieve the application and underwriting data

The webhook payload identifies the application. Use its application UUID to retrieve the current deal data.

* Use [List Applications](/api-reference/workflow-management/list-applications) to list and filter applications.
* Use [Get Application](/api-reference/workflow-management/get-application) to retrieve one application.

### Retrieve documents

1. Call [List Application Files](/api-reference/documents/list-application-files) to list the application's files.
2. Use the returned file ID with [Download Application File](/api-reference/documents/download-application-file), or use [Download Selected Application Files](/api-reference/documents/download-selected-application-files) to download multiple files.

See [Downloading Documents](/api-docs/docs/downloading-documents-1) for the complete document retrieval flow.

### Retrieve bank and provider data

* See [Plaid](/api-docs/docs/plaid) for available Plaid services, required application data, and returned bank data.
* Use [Get Commercial Data](/api-reference/workflow-management/get-commercial-data) to retrieve stored Data Services results for an application. Use the endpoint's `services[]` filter when you only need selected services.

Do not maintain a hard-coded provider list in your integration. Available services can change as your Lendflow configuration evolves.

## 4. Complete underwriting

Data Orchestration can run data providers and custom underwriting rules as a connected decision flow. Depending on the workflow configuration, a template can run automatically when the deal reaches its assigned stage or can be started manually.

For API execution, follow [Data Orchestration via API](/lendflow-external/docs/how-to-run-orchestration-via-api). Retrieve the completed orchestration log before using its outcome in your underwriting process.

When your process is ready to continue, use [Move to Next Workflow Stage](/api-reference/workflow-management/move-to-next-workflow-stage) to advance the application. Workflow stages represent the deal's position in the process; statuses and sub-statuses describe its state within that process.

## 5. Create an offer

An offer must be associated with the funder's placement on the application.

1. Retrieve the application's placements with [List Application Placements](/api-reference/placements/list-application-placements).
2. Select the placement assigned to your funder and retain its `placement_id`.
3. Review the available [Offer Templates](/api-reference/offer-templates/list-offer-templates). Offer fields are defined by the selected template.
4. Use [Get Offer Template Sample](/api-reference/offer-templates/get-offer-template-sample) to retrieve the template's expected offer and closing fields.
5. Call [Create Offer](/api-reference/offers/create-offer) with the application UUID in the path, the placement UUID in `placement_id`, and the selected template UUID in `offer_template_id`.

If the request includes `stips`, each stip must use the ID of a configured requirement. Retrieve current requirements with [Get Required Application Documents](/api-reference/documents/get-required-application-documents) instead of storing numeric stip IDs in your integration.

<Warning>
  Offer and closing fields depend on the selected offer template. Do not send a fixed set of fields for every product.
</Warning>

## 6. Manage the offer

Use the offer UUID returned when the offer is created or included in an offer webhook.

| Action | API endpoint |
| - | - |
| List the application's offers | [List Application Offers](/api-reference/offers/list-application-offers) |
| Retrieve one offer | [Get Offer](/api-reference/offers/get-offer) |
| Update offer terms | [Update Offer](/api-reference/offers/update-offer) |
| Update one or more offer statuses | [Update Multiple Offer Statuses](/api-reference/offers/update-multiple-offer-statuses) |
| Share or unshare offers | [Update Offer Sharing](/api-reference/offers/update-offer-sharing) |
| Record final closing terms | [Confirm Offer](/api-reference/offers/confirm-offer) |

Use **Confirm Offer** for final closing terms so the submitted offer and the final confirmed terms remain distinct.

If the application should not proceed, call [Decline Application](/api-reference/workflow-management/decline-application). The request requires a `reason`; `sub_reason`, notification settings, and notes are optional.

## FAQ

<AccordionGroup>
  <Accordion title="Should I use product IDs to determine which offer fields to send?">
    No. Use the placement's offer template and retrieve its sample schema. Custom Offer Products and Dynamic Offers allow the configured fields to differ between templates.
  </Accordion>

  <Accordion title="Should I store stip IDs in my integration?">
    No. Retrieve the application's configured required documents and use the returned IDs. Hard-coded numeric IDs can become inaccurate as requirements change.
  </Accordion>

  <Accordion title="What is the difference between a placement ID and an offer ID?">
    A placement identifies the funder's opportunity on an application. An offer belongs to that placement and receives its own offer ID after creation.
  </Accordion>

  <Accordion title="Should my system use the application data included in a webhook?">
    Use the webhook to identify the event and resource, then retrieve the latest application, file, orchestration log, or offer from the API. This avoids acting on data that changed after the notification was created.
  </Accordion>

  <Accordion title="How do workflow stages differ from statuses?">
    A workflow stage identifies where the deal is in the configured process, such as Application, Underwriting, or Offer. A status or sub-status describes the deal's current state without replacing its workflow stage.
  </Accordion>
</AccordionGroup>

## Next steps

<Card title="Configure integration tokens" icon="key" href="/lendflow-external/docs/integration-tokens" horizontal>
  Create scoped credentials for your funder integration.
</Card>

<Card title="Configure custom workflow webhooks" icon="webhook" href="/lendflow-external/docs/custom-workflows-webhooks" horizontal>
  Subscribe to application, document, orchestration, and offer events.
</Card>

<Card title="Run Data Orchestration via API" icon="diagram-project" href="/lendflow-external/docs/how-to-run-orchestration-via-api" horizontal>
  Execute a template and retrieve its logs.
</Card>
