Leads_GetList
Retrieve and filter leads in ServiceTitan by tenant ID, creation/modification dates, status, customer details, and more, with options for sorting and pagination.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
createdBefore | No | Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC) | |
createdOnOrAfter | No | Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC) | |
customerCity | No | Filters by customer city | |
customerCreatedBefore | No | Format - date-time (as date-time in RFC3339). Returns customers who were created after a certain date/time (in UTC) | |
customerCreatedOnOrAfter | No | Format - date-time (as date-time in RFC3339). Returns customers who were created on or before a certain date/time (in UTC) | |
customerId | No | Format - int64. Filters by associated customer | |
customerModifiedOnOrAfter | No | Format - date-time (as date-time in RFC3339). Returns customers who were modified on or before a certain date/time (in UTC) | |
customerState | No | Filters by customer state | |
customerZip | No | Filters by customer zip | |
genPermUrl | No | If true, generates a permanent URL for the lead | |
ids | No | Perform lookup by multiple IDs (maximum 50) | |
includeTotal | No | Whether total count should be returned | |
isProspect | No | Allows to filter leads where the customer doesn't have a job, or there is no customer. Possible values are: null (return all leads); true (return leads without customer/jobs); false (return leads with customer and job) | |
modifiedBefore | No | Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC) | |
modifiedOnOrAfter | No | Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC) | |
page | No | Format - int32. The logical number of page to return, starting from 1 | |
pageSize | No | Format - int32. How many records to return (50 by default) | |
sort | No | Applies sorting by the specified field: "?sort=+FieldName" for ascending order, "?sort=-FieldName" for descending order. Available fields are: Id, ModifiedOn, CreatedOn. | |
status | No | Filters by status Values: [Open, Dismissed, Converted] | |
tenant | Yes | Format - int64. Tenant ID | |
withoutCustomer | No | Allows to filter leads that don't have a customer or location record associated to it. Possible values are: null (return all leads); true (return leads without customers or locations only); false (return leads with customers and locations only) |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"createdBefore": {
"description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)",
"format": "date-time",
"type": "string"
},
"createdOnOrAfter": {
"description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)",
"format": "date-time",
"type": "string"
},
"customerCity": {
"description": "Filters by customer city",
"type": "string"
},
"customerCreatedBefore": {
"description": "Format - date-time (as date-time in RFC3339). Returns customers who were created after a certain date/time (in UTC)",
"format": "date-time",
"type": "string"
},
"customerCreatedOnOrAfter": {
"description": "Format - date-time (as date-time in RFC3339). Returns customers who were created on or before a certain date/time (in UTC)",
"format": "date-time",
"type": "string"
},
"customerId": {
"description": "Format - int64. Filters by associated customer",
"type": "integer"
},
"customerModifiedOnOrAfter": {
"description": "Format - date-time (as date-time in RFC3339). Returns customers who were modified on or before a certain date/time (in UTC)",
"format": "date-time",
"type": "string"
},
"customerState": {
"description": "Filters by customer state",
"type": "string"
},
"customerZip": {
"description": "Filters by customer zip",
"type": "string"
},
"genPermUrl": {
"description": "If true, generates a permanent URL for the lead",
"type": "boolean"
},
"ids": {
"description": "Perform lookup by multiple IDs (maximum 50)",
"type": "string"
},
"includeTotal": {
"description": "Whether total count should be returned",
"type": "boolean"
},
"isProspect": {
"description": "Allows to filter leads where the customer doesn't have a job, or there is no customer.\nPossible values are:\nnull (return all leads);\ntrue (return leads without customer/jobs);\nfalse (return leads with customer and job)",
"type": "boolean"
},
"modifiedBefore": {
"description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)",
"format": "date-time",
"type": "string"
},
"modifiedOnOrAfter": {
"description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)",
"format": "date-time",
"type": "string"
},
"page": {
"description": "Format - int32. The logical number of page to return, starting from 1",
"type": "integer"
},
"pageSize": {
"description": "Format - int32. How many records to return (50 by default)",
"type": "integer"
},
"sort": {
"description": "Applies sorting by the specified field:\n\"?sort=+FieldName\" for ascending order,\n\"?sort=-FieldName\" for descending order.\n\nAvailable fields are: Id, ModifiedOn, CreatedOn.",
"type": "string"
},
"status": {
"description": "Filters by status\nValues: [Open, Dismissed, Converted]",
"type": "string"
},
"tenant": {
"description": "Format - int64. Tenant ID",
"type": "integer"
},
"withoutCustomer": {
"description": "Allows to filter leads that don't have a customer or location record associated to it.\nPossible values are:\nnull (return all leads);\ntrue (return leads without customers or locations only);\nfalse (return leads with customers and locations only)",
"type": "boolean"
}
},
"required": [
"tenant"
],
"type": "object"
}