---
title: "List leads with filtering applied. Returns a max 500 of the most recent results."
method: GET
path: "/Leads/all"
tags: ["GET Details"]
---

# List leads with filtering applied. Returns a max 500 of the most recent results.

`GET /Leads/all`

## Request

- Base URL: `https://partners.staging-youlendapi.com/onboarding`
- URL: `https://partners.staging-youlendapi.com/onboarding/Leads/all`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://youlend-stag.eu.auth0.com/oauth/token`

## Query parameters

- `Limit` integer
- `LastSortValue` string, nullable
- `LastLeadId` string, uuid, nullable

## Headers

- `api-version` string

## Request body

- GetAllLeadsQuery
  - `leadStates` string[], nullable: Gets or sets the list of lead states to filter by.
  - `filterBy` string, nullable
  - `dateFrom` string, date-time, required
  - `dateTo` string, date-time, required
  - `sortBy` string, nullable
  - `thirdPartyCustomerId` string, nullable: Optional field to search by ThirdPartyCustomerId.

## Response `200`

Request processed successfully.

- GetAllLeadsByLendingPartnerWithFilterResultModel[]
  - `leadId` string, uuid: Gets or sets the lead id.
  - `thirdPartyCustomerId` string, nullable: Gets or sets the TPCI associated with the lead.
  - `preApprovalId` string, uuid: Gets or sets the PreApproval Id.
  - `state` string, nullable: Gets or sets the state for the lead.
  - `stateUpdated` string, date-time: Gets or sets the state updated for the lead.
  - `signUpDate` string, date-time: Gets or sets the sign-up date for the lead.
  - `additionalInfo` object, nullable: Gets or sets additional info associated with the lead.
  - `companyName` string, nullable: Gets or sets the name of the company.
  - `name` string, nullable: Gets or sets the name.
  - `owner` string, nullable: Gets or sets the owner.
  - `leadType` string, nullable: Gets or sets the lead type.
  - `partnerLoanType` string, nullable: Gets or sets the Partner Loan Type - "Initial", "Early Renewal" or "Renewal".
  - `ownerEmail` string, nullable: Gets or sets the registered email of the owner.
  - `country` string, nullable: Gets or sets the country.
  - `countryISOCode` string, nullable: Gets or sets the country ISO value.
  - `email` string, nullable: Gets or sets the registered email of the borrower.
  - `comments` object[], nullable: Gets or sets the comments.
  - `companyType` string, nullable: Gets or sets the company type.
  - `rejectionReasons` object[], nullable: Gets or sets the rejection reasons.
  - `ineligibleReasons` object[], nullable: Gets or sets the ineligible reasons.
  - `rescindedReasons` object[], nullable: Gets or sets the rescinded reasons.
  - `productType` string, nullable: Gets or sets the product code.

## Other responses

- `204`: No leads were found that match the input criteria for the lending partner.
- `400`: Bad Request
- `401`: Unauthorized request! Please check your bearer token.

---

[API](https://skmtc.dev/youlend/apis/onboarding.md) - [All operations](https://skmtc.dev/youlend/apis/onboarding/llms.txt) - [OpenAPI document](https://skmtc.dev/youlend/apis/onboarding/revisions/32aa9c8d752a?raw)
