---
updatedAt: 2026-10-08T08:13:29.000Z
agentTools:
  projectIndex: https://docs.youlend.com/llms.txt
---

# Generate preapproved offers

<Callout icon="📘" theme="info">
  ### Good to know

  variableFactorRate defaults as false if not populated. When set to true, the size of the object returned by this endpoint can increase significantly.
</Callout>

<Callout icon="far fa-triangle-exclamation" theme="warn">
  ### Validation codes

  The response can include payment data and renewal validation codes explaining why eligibility checks failed. These are separate from HTTP response statuses.

  **Payment-data validation**

  - `PV000`: No settlement data was provided, or all settlement amounts are zero.
  - `PV001`: Settlement data does not cover the minimum required period.
  - `PV002`: The settlement history contains too many consecutive days with zero total settlement amounts.
  - `PV003`: The latest settlement data is too old.

  **Renewal validation**

  - `AOR001`: The existing loan status is not eligible for renewal.
  - `AOR002`: Repayments on the existing funding are behind expectations.
  - `AOR003`: More of the existing funding must be repaid before renewal.
</Callout>

### Body Params Formatting

| Param    | Format          | Example                                                                      |
| :------- | :-------------- | :--------------------------------------------------------------------------- |
| `date`   | UTC             | 2025-01-16T16:16:51.154Z                                                     |
| `amount` | Regular amounts | £100 should be inputted as `100`<br />€120.50 should be inputted as `120.50` |

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "PreApproval",
    "description": "Through this API you can manage pre approval services.",
    "contact": {
      "name": "Mark Ufland",
      "email": "mark.ufland@youlend.com"
    },
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://partners.staging-youlendapi.com/preapproval"
    }
  ],
  "paths": {
    "/PreApproval/offers": {
      "post": {
        "tags": [
          "PreApproval"
        ],
        "summary": "Generate preapproved offers",
        "parameters": [
          {
            "name": "api-version",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "A YL.Web.Api.ThirdParty.PreApproval.Models.PreApprovalRequestModel containing the data required to generate pre-approved offers",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreApprovalRequestModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PreApprovalResponseModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreApprovalResponseModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreApprovalResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Client Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Server Error"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Codes": {
        "enum": [
          "PV000",
          "PV001",
          "PV002",
          "PV003"
        ],
        "type": "string"
      },
      "CompanyTypes": {
        "enum": [
          "Ltd",
          "Plc",
          "Llp",
          "SoleTrader",
          "Partnership",
          "Llc",
          "BusinessCorporation",
          "Dac",
          "Eenmanszaak",
          "NaamlozeVennootschap",
          "Bv",
          "Cv",
          "Nv",
          "Vof",
          "SpZoo",
          "SpkSpj",
          "Scspp",
          "SaSKA",
          "Jdg",
          "GmbhUg",
          "EK",
          "Gewerbebetrieb",
          "GbrOhg",
          "Gbr",
          "EGbr",
          "Ohg",
          "Kg",
          "Aktiengesellschaft",
          "SlSlne",
          "SociedadColectiva",
          "SociedadComanditaria",
          "EIAutonomo",
          "SociedadCivil",
          "SociedadCooperativa",
          "SNC",
          "EINomPropre",
          "SARL",
          "SocieteCooperative",
          "SA",
          "SAS",
          "EURL",
          "SCP",
          "SCS",
          "SASU",
          "EnterpriseIndividuelle",
          "SocieteAnonyme",
          "SRL",
          "SComm",
          "AS",
          "ApS",
          "KS",
          "PS",
          "Fmba",
          "Andelsselskab",
          "Amba",
          "ErhvervsdrivendeFond",
          "IS",
          "Smba",
          "SI",
          "SelvstændigOffentligVirksomhed",
          "Partrederi",
          "Filial",
          "Enkeltmandsvirksomhed",
          "PMV",
          "Forening"
        ],
        "type": "string"
      },
      "CountryISOCode": {
        "enum": [
          "GBR",
          "USA",
          "NLD",
          "BEL",
          "DEU",
          "FRA",
          "DNK",
          "IRL",
          "POL"
        ],
        "type": "string",
        "description": "Gets or sets the merchant payment data"
      },
      "CurrencyISOCode": {
        "enum": [
          "GBP",
          "EUR",
          "USD",
          "PLN",
          "DKK"
        ],
        "type": "string"
      },
      "LoanOffers": {
        "type": "object",
        "properties": {
          "offerId": {
            "type": "string",
            "format": "uuid"
          },
          "fundedAmount": {
            "type": "number",
            "format": "double"
          },
          "originalAmount": {
            "type": "number",
            "format": "double"
          },
          "currencyISOCode": {
            "type": "string",
            "nullable": true
          },
          "factorRate": {
            "type": "number",
            "format": "double"
          },
          "sweep": {
            "type": "number",
            "format": "double"
          },
          "daysUntilRepayment": {
            "type": "integer",
            "format": "int32"
          },
          "daysUntilMaturity": {
            "type": "integer",
            "format": "int32"
          },
          "expirationDate": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "PaymentDataRow": {
        "required": [
          "amount",
          "currencyISOCode",
          "date",
          "paymentType"
        ],
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "amount": {
            "minimum": 0,
            "type": "number",
            "format": "double"
          },
          "paymentType": {
            "$ref": "#/components/schemas/PaymentType"
          },
          "currencyISOCode": {
            "$ref": "#/components/schemas/CurrencyISOCode"
          },
          "numberOfTransactions": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PaymentDataValidationResponse": {
        "type": "object",
        "properties": {
          "preApprovalId": {
            "type": "string",
            "description": "Gets or sets the ID of PreApproval",
            "format": "uuid"
          },
          "paymentDataValidationSuccessful": {
            "type": "boolean",
            "description": "Gets or sets the boolean indicating whether the validation of the paymentdata was successful"
          },
          "paymentDataValidationsRulesNotMet": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentValidationRulesModel"
            },
            "description": "Gets or sets the rules that were not satisfied in the case where the validation is not successful",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PaymentType": {
        "enum": [
          "Settlement",
          "Chargeback",
          "Refund"
        ],
        "type": "string"
      },
      "PaymentValidationRulesModel": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Codes"
          },
          "reason": {
            "type": "string",
            "description": "Gets or sets the reason related to the payment data validation rule that failed",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PreApprovalRequestModel": {
        "required": [
          "countryISOCode",
          "paymentData",
          "regularIncrementTypeForOfferGrid",
          "thirdPartyCustomerId"
        ],
        "type": "object",
        "properties": {
          "thirdPartyCustomerId": {
            "minLength": 1,
            "type": "string",
            "description": "Gets or sets the third party unique merchant identifier"
          },
          "companyType": {
            "$ref": "#/components/schemas/CompanyTypes"
          },
          "merchantMcc": {
            "type": "string",
            "description": "Gets or sets the unique merchant MCC",
            "nullable": true
          },
          "countryISOCode": {
            "$ref": "#/components/schemas/CountryISOCode"
          },
          "paymentData": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentDataRow"
            },
            "description": "Gets or sets the merchant payment data"
          },
          "isRenewal": {
            "type": "boolean",
            "description": "Gets or sets the boolean indicating whether the customer has  had a Loan in the past."
          },
          "variableFactorRate": {
            "type": "boolean",
            "description": "Gets or sets the boolean indicating whether the desired pre approved offers are provided for a unique factor rate or a range of different factor rates"
          },
          "requestPreQualification": {
            "type": "boolean",
            "description": "Gets or sets the boolean indicating whether the partner would like to recieve a prequalification offer in addition to pre-approval"
          },
          "regularIncrementTypeForOfferGrid": {
            "$ref": "#/components/schemas/RegularIncrementTypeForOfferGrid"
          },
          "secondaryLendingPartnerDetails": {
            "$ref": "#/components/schemas/SecondaryLendingPartnerDetails"
          },
          "additionalInfo": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "nullable": true
            },
            "description": "Gets or sets additional info.",
            "nullable": true
          },
          "customerData": {
            "description": "Gets or sets Customer Data.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Model containing the pre-approval request body"
      },
      "PreApprovalResponseModel": {
        "type": "object",
        "properties": {
          "merchantIsEligibleForPreApproval": {
            "type": "boolean",
            "description": "Gets or sets the boolean indicating whether the merchant is eligible for pre approved offers. If this is false, the PreApprovedOffersModel will be null"
          },
          "merchantIsInControlGroup": {
            "type": "boolean",
            "description": "Gets or sets the boolean indicating whether the merchant is in the control group, this is an indicator that the merchant is not eligible for pre-approved offers."
          },
          "loanType": {
            "type": "string",
            "description": "Gets or sets the type of loan (Initial, Renewal, Early Renewal)",
            "nullable": true
          },
          "isRepaymentHoliday": {
            "type": "boolean",
            "description": "Gets or sets the repayment holiday flag"
          },
          "secondaryLendingPartnerDetails": {
            "$ref": "#/components/schemas/SecondaryLendingPartnerDetails"
          },
          "paymentDataValidationResponse": {
            "$ref": "#/components/schemas/PaymentDataValidationResponse"
          },
          "renewalsValidationResponse": {
            "$ref": "#/components/schemas/RenewalsValidationResponse"
          },
          "preApprovedOffersModel": {
            "$ref": "#/components/schemas/PreApprovedOffersModel"
          },
          "preQualificationOffersModel": {
            "$ref": "#/components/schemas/PreQualificationOffersModel"
          }
        },
        "additionalProperties": false,
        "description": "Gets or sets the pre approval response model"
      },
      "PreApprovedOffersModel": {
        "type": "object",
        "properties": {
          "thirdPartyCustomerId": {
            "type": "string",
            "description": "Gets or sets the third party unique merchant identifier",
            "nullable": true
          },
          "preApprovalId": {
            "type": "string",
            "description": "Gets or sets the YouLend unique identifier for the pre approved merchant. This Id is needed in the Onboarding API to ensure YouLend can match the pre-approved offers (obtained before the merchant application) with the application journey",
            "format": "uuid"
          },
          "interval": {
            "type": "number",
            "description": "Gets or sets the regular interval used to generate the offer grid (e.g. loan amout increment of £500)",
            "format": "double"
          },
          "regularIncrementTypeForOfferGrid": {
            "$ref": "#/components/schemas/RegularIncrementTypeForOfferGrid"
          },
          "offers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PricingOffers"
            },
            "description": "Gets or sets the list of pre approved offeres",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Gets or sets the pre approved offers model"
      },
      "PreQualificationOffersModel": {
        "type": "object",
        "properties": {
          "thirdPartyCustomerId": {
            "type": "string",
            "description": "Gets or sets the third party unique merchant identifier",
            "nullable": true
          },
          "preApprovalId": {
            "type": "string",
            "description": "Gets or sets the YouLend unique identifier for the pre approved merchant. This Id is needed in the Onboarding API to ensure YouLend can match the pre-approved offers (obtained before the merchant application) with the application journey",
            "format": "uuid"
          },
          "offer": {
            "$ref": "#/components/schemas/LoanOffers"
          }
        },
        "additionalProperties": false
      },
      "PricingOffers": {
        "type": "object",
        "properties": {
          "offerId": {
            "type": "string",
            "description": "Gets or sets the unique identifier for the offer",
            "format": "uuid"
          },
          "fundedAmount": {
            "type": "number",
            "description": "Gets or sets the loan Funded amount",
            "format": "double"
          },
          "originalAmount": {
            "type": "number",
            "description": "Gets or sets the amount the merchant will need to repay (includes fees)",
            "format": "double"
          },
          "currencyISOCode": {
            "type": "string",
            "description": "Gets or sets the currency ISO code",
            "nullable": true
          },
          "factorRate": {
            "type": "number",
            "description": "Gets or sets the offer factor rate",
            "format": "double"
          },
          "sweep": {
            "type": "number",
            "description": "Gets or sets the offer sweep",
            "format": "double"
          },
          "daysUntilRepayment": {
            "type": "integer",
            "description": "Gets or sets the number of days until the loan is expected to be repaid",
            "format": "int32"
          },
          "daysUntilMaturity": {
            "type": "integer",
            "description": "Gets or sets the number of days until the loan's maturity date",
            "format": "int32"
          },
          "expirationDate": {
            "type": "string",
            "description": "Gets or sets the offer expiration date",
            "format": "date-time"
          },
          "minimumWeeklyRepayment": {
            "type": "number",
            "description": "Gets or sets the minimum weekly repayment amount",
            "format": "double"
          },
          "repaymentType": {
            "$ref": "#/components/schemas/RepaymentType"
          }
        },
        "additionalProperties": false,
        "description": "Gets or sets the list of pre approved offers"
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": {}
      },
      "RegularIncrementTypeForOfferGrid": {
        "enum": [
          "LoanAmount",
          "Sweep"
        ],
        "type": "string",
        "description": "Gets or sets the increment type that is used to generate the offer  grid (sweep or loan amount)"
      },
      "RenewalsReasonCodes": {
        "enum": [
          "AOR001",
          "AOR002",
          "AOR003"
        ],
        "type": "string"
      },
      "RenewalsValidationResponse": {
        "type": "object",
        "properties": {
          "renewalsValidationSuccessful": {
            "type": "boolean",
            "description": "Gets or sets the boolean indicating whether the validation of the paymentdata was successful"
          },
          "renewalsValidationsRulesNotMet": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RenewalsValidationRulesModel"
            },
            "description": "Gets or sets the rules that were not satisfied in the case where the validation is not successful",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RenewalsValidationRulesModel": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/RenewalsReasonCodes"
          },
          "reason": {
            "type": "string",
            "description": "Gets or sets the reason related to the Renewal validation rule that failed",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RepaymentType": {
        "enum": [
          "Variable",
          "Fixed"
        ],
        "type": "string",
        "description": "High-level classification of repayment behavior for an offer.\r\nVariable = revenue-based / sweeping.\r\nFixed = scheduled fixed (e.g. weekly direct debit)."
      },
      "SecondaryLendingPartnerDetails": {
        "type": "object",
        "properties": {
          "secondaryLendingPartnerId": {
            "type": "string",
            "nullable": true
          },
          "secondaryLendingPartnerName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://youlend-stag.eu.auth0.com/oauth/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ]
}
```