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

# Joining the Valiant Platform

> Technical guide for finance partners integrating with the Valiant platform

# Introduction

This document provides an initial outline of the technical preferences, processes and ideal workflow for finance partners to seamlessly join and be integrated into the Valiant platform.

Valiant offers a comprehensive integration framework to onboard finance partners that is designed to suit available tech capability while also supercharging any existing and required internal processes. This includes support for:

1. **Multi-layered validations** – Applications undergo three phases of validation (frontend, backend, and finance partner-specific) to ensure data quality and compliance before submission
2. **Multiple submission methods** – Applications can be submitted via API (preferred) or email, with API submissions providing the most efficient and feature-rich experience and email helping fill the gaps where data may not be able to be accepted in a structure way via API
3. **Built-in document generation** – Any required supporting documents (booking spreadsheets, etc.) can be generated dynamically at submission and formatted to finance partner specifications to help power and accelerate internal process
4. **Support for real-time status updates** – Accurate application statuses can be maintained through push notifications (webhooks, preferred) or pull mechanisms (polling), with manual CSV imports available as a fallback
5. **Support for auto-decisioning** – Valiant's platform provides reactive and dynamic notifications and UI flows where auto-decisioning is available

<Note>
  **Important:** See below for a detailed sequence diagram that outlines a step-by-step overview of API submissions.
</Note>

# Validations

When a customer submits an application via the Valiant platform, before an application is submitted to a finance partner three phases of validation checks are run:

* **Frontend validations** – basic input format and data quality validations run client-side where speed of communicating a validation fail to a customer is critical
* **Backend validations** – deeper and more robust security, model and database level validations
* **Finance partner API requirement validations** – input and mapping validations required for valid finance partner submission as outlined in finance partner API docs or discovered in testing – folded into our backend validations so we can move any validation issues further up the funnel

# Application submissions

Valiant can submit applications to finance partners automatically via two mediums:

* **API** – The preferred submission method, where Valiant maps our application format and submits applications directly to a finance partner
* **Email** – A backup submission method where an email with summary of application is sent to a nominated inbox

## API submissions

API submissions are Valiant's preferred method. Both `JSON` and `XML SOAP` APIs are supported.

API documentation is a must-have for an effective implementation. Documents in Swagger, OpenAPI or other formats are all accepted – please share with [integrations@valiant.finance](mailto:integrations@valiant.finance).

### Ideal API capability

While submitting applications is the primary goal of any finance partner integration when joining the Valiant platform, the submission itself is ideally the first part of a broader suite of API capability offered by a finance partner to help manage interface with and manage application and the application pipeline.

Example endpoints and the ideal API capability we would hope to be able to interface with includes:

<div className="p-4 border rounded-lg bg-gray-50 dark:bg-gray-900 mb-8">
  <Tabs>
    <Tab title="Application create">
      > e.g., `POST` to `/application`

      * Primary app submission entry point
      * Critical in any API implementation
      * Must return a unique finance partner application ID for Valiant to reference across reporting and other processes
    </Tab>

    <Tab title="Application read">
      > e.g., `GET` to `/application/:id`

      * Fetch a single application, primarily for manual status checks / data reconciliation
      * Critical in any API implementation
      * Includes latest status of the application and ideally includes a timestamped status history if available
    </Tab>

    <Tab title="Application index">
      > e.g., `GET` to `/applications`

      * Fetch a list of applications, either a complete paginated list or filterable via query parameters (or alternatively a `POST` body if `POST` endpoint)
      * Accepts query params to filter a list of applications by status or datetimes support for filter by – e.g., `updated_after` to filter for applications updated since the provided timestamp – `/applications?updated_after=2025-01-01T12:00:00Z`
    </Tab>

    <Tab title="Document uploads">
      > e.g., `POST` to `/application/:id/documents`

      * Attach supporting documents and files to an existing application
    </Tab>

    <Tab title="Application update">
      > e.g., `PATCH` to `/application/:id`

      * Push application updates directly to finance partner
      * Accepts both minor 'edits' and major updates that would be considered an 'appeal' from a credit perspective with corresponding
      * Can including support for withdrawing or expiring applications – i.e., setting of specific statuses from the Valiant side
    </Tab>
  </Tabs>
</div>

<Warning>
  **Note:** There is a strong preference for `JSON` APIs if available – please note integration and testing timelines for `XML SOAP` APIs will likely be longer vs. a `JSON` API implementation.
</Warning>

## Email submissions

Email submissions are available to supplement API submissions.

* Can be sent to a nominated finance partner inbox for processing / reference by a specific team or for automated parsing
* Allow Valiant to share additional application metadata collected during the quoting and application process, like risk factor assessments and other metadata, that might not be accepted in a structured way via API
* Often leveraged for audit and compliance record-keeping purposes
* Where supporting documents were uploaded or generated and are required as part of a submission, tokenised links to download the documents as attachments are included in the submission email

# Supporting documents

When processing an application, Valiant can also generate and submit many supporting documents that might help facilitate or accelerate an internal process requirement. These include:

* Spreadsheets – e.g., doc request, bill of materials or booking spreadsheets required for internal processes
* Documents – e.g., Word documents or PDFs application forms or other specifically formatted word processor documents
* Images – e.g., ID document captures or other images captured as part of the Valiant application journey

These documents can be generated and uploaded / attached to any supported submission method (API, email, etc.).

<Warning>
  **Note:** While we have generic templates for many document types, we are also able to implement the generation of docs that follow finance partner specific templates that might be required internally – if so, please provide Valiant a copy of the required template for implementation.
</Warning>

# Status updates

Maintaining an accurate representation of the current status of a given Opportunity in the Valiant system is critical to providing a beautiful customer and team member experience. Changes in status trigger a number of UI features and real-time notifications on the Valiant platform.

## When automated updates are available

Where an automated solution via technology is available, we can support and process status updates via both:

<div className="p-4 border rounded-lg bg-gray-50 dark:bg-gray-900 mb-8">
  <Tabs>
    <Tab title="Push">
      **Push** – Updates are pushed from the finance partner via `webhooks` or another event-driven pub/sub-style push notification protocol

      * Needs to be made available by the finance partner and provides real-time updates, reducing latency and ensuring immediate status accuracy when changes occur
      * Any push notification received via a `webhook` should ideally include:
        * The finance partner's unique ID for the application / target object
        * The event that was triggered – e.g., a status change or other event – and its value
        * The full timestamp of the event – e.g., `YYYY-MM-DDTHH:MM:SSZ` – so we have the timestamp of the event from the source of truth system
          * All webhooks received are added to a processing queue so if there is a processing delay or we are processing a retried event, the event and processing time may be misaligned
      * All requests made to subscription endpoint are processed via an API gateway layer (Cloudflare worker and Cloudflare queue) that receives the payload and then will pipe through to our platform. In case of platform unavailability, this service will keep retrying with exponential backoff until success
      * In case of failure at our subscription endpoint worker (which should only really happen during planned maintenance) or we are receiving a retried – ideally the partner system should also continue attempts to push the update with an exponential backoff over a few hours before marking as failed
      * Ideally we do not need to run a manual poll to fetch additional required data to process a status update after receipt of a push notification, however this can be implemented if required
    </Tab>

    <Tab title="Pull">
      **Pull** – Valiant manually polls applications directly via periodically run background jobs to check for status updates

      * Ideally serves as a backup to a push protocol and ensures that any missed push notifications don't result in permanently out-of-sync data
      * Where relied on as the primary status update process, we poll with an exponential backoff with cadence determined as a function of current application status and number of previous polls completed
      * Can result in a significant number of requests to finance partner API if there are a large number of open applications!
      * While polling individual apps is supported, to minimise unnecessary polling requests, ideally we are able to poll a queryable applications `index` – e.g, `GET` to `/applications` – where we can filter applications for specific attributes, including collecting all applications updated after a specified timestamp
    </Tab>
  </Tabs>
</div>

<Warning>
  **Important:**

  To maintain an accurate status history and avoid unnecessary manual polling requests when there are large application volumes, there is a **very strong preference for inclusion of a push mechanism** in any finance partner implementation, ideally via `webhooks`.

  If a push solution is not available, there is significant risk that status updates are missed as multiple status updates may occur between polls – especially during statuses with usually short turnaround windows like `Docs Out` → `Docs Signed`.

  We will always implement both **push** and **pull** protocols if they are available, leaning on **pull** as a backup / failsafe check.
</Warning>

## When no automated solution is available

In the case where a push or pull solution via technology is not supported, we are able to backfill Opportunity statuses and events with relevant timestamps via a daily/weekly or monthly `CSV` import where the `CSV` includes a relevant unique identifier that is tracked in Valiant's system – e.g., Valiant app ID, vendor partner quote ID, etc., and timestamps for the events we are looking to track.

<FileDownload file="/files/application_status_manual_import.csv" name="application_status_manual_import.csv" />

<Warning>
  **Note:** A manual `CSV` upload solution is not ideal and only offered in the case where a push/pull solution via technology is not available.
</Warning>

# API submission sequence / interaction flow with both push / pull updates

```mermaid theme={null}
%%{init: {"zoomEnabled": true, "pan": true}}%%
sequenceDiagram
  autonumber

  %% Participants. %%
  participant FrontlineTeamMember as Frontline Team
  participant Customer as Customer
  participant ValiantFrontend as Valiant Customer Frontend
  participant ValiantServer as Valiant Server
  participant FinancePartnerServer as Finance Partner Server
  participant ValiantPortal as Valiant Partner Portal
  participant FinancePartnerTeam as Finance Partner Team

  rect rgba(255, 200, 0, 0.1)
    alt Global webhook subscription available
      Note over ValiantServer,FinancePartnerServer: If 'global' push / webhook subscription is available – i.e., can<br/>subscribe to receive updates for all applications and do not need<br/>to subscribe on an app-by-app basis – subscription on<br/>Valiant side should already be established.
      FinancePartnerServer -->> ValiantServer: Begin listening for application updates
    end  
  end

  %% App invite. %%
  activate FrontlineTeamMember
  FrontlineTeamMember ->> Customer: Invite customer to view quote<br/>and complete credit application
  deactivate FrontlineTeamMember

  %% App completion. %%
  activate Customer
  Customer ->> ValiantFrontend: Complete, sign and submit<br/>Valiant application form<br/>(including privacy and consents)
  deactivate Customer

  %% Frontend validations. %%
  activate ValiantFrontend  
  critical Frontend validations run
    Note over Customer,ValiantServer: Client-side basic input format and data quality validations.
  option Invalid application
    rect rgba(255, 0, 50, 0.1)
      ValiantFrontend -->> Customer: Display validation error
    end
  option Valid application
    rect rgba(0, 255, 77, 0.1)
      ValiantFrontend ->> ValiantServer: Submit application
      deactivate ValiantFrontend
      activate ValiantServer
      Note over ValiantFrontend,ValiantServer: Including timestamps and consent<br/>audit data (IP address, device, etc.)
    end
  end

  %% Backend validations. %%
  critical Backend validations run
    Note over Customer,ValiantServer: Robust model, database and selected finance partner API requirement validations.
  option Invalid application
    rect rgba(255, 0, 50, 0.1)
      ValiantServer -->> ValiantFrontend: Return validation error
      ValiantFrontend -->> Customer: Display validation error
    end
  option Valid application
    rect rgba(0, 255, 77, 0.1)
      ValiantServer -->> ValiantFrontend: Return success
      ValiantServer ->> ValiantServer: Commit application
    end
  end

   %% Submit app to finance partner. %%
  ValiantServer -->> ValiantPortal: Opportunity updated in Portal
  ValiantServer ->> ValiantServer: Credit application mapped / data transformed<br/>to required finance partner format
  ValiantServer ->> ValiantServer: Supporting docs (booking spreadsheet, any<br/>supporting PDF, etc.) generated where required
  ValiantServer ->> FinancePartnerServer: Submit credit application to finance partner (POST)
  deactivate ValiantServer
  activate FinancePartnerServer
  FinancePartnerServer ->> ValiantServer: Confirm successful submission (20X response)
  Note over FinancePartnerServer,ValiantServer: Valiant captures unique finance partner application ID<br/>returned in response to use as reference in future flows.
  ValiantServer -->> ValiantPortal: Opportunity status updated to 'Applied'
```

<Note>
  You can view the [full interactive sequence diagram](https://mermaid.live/view#pako:eNrNWetu28gVfpUBgYVtgFJ8iWxHCAIk9jow0G3cONktCv9Y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