Get leads

This method allows getting a list of leads in the account

Limitations
The method is available in accordance with the user’s rights.

“with”parameters

ParameterDescription
contactsAdds information about the contacts associated with the lead to the response
only_deletedIf this parameter is passed, the method request will return only the deleted leads that are still restorable in the response. You will receive lead models with the following properties: “id”, modification date and “is_deleted” = true parameters.
loss_reasonAdds detailed information about the lead loss reason to the response
is_price_modified_by_robotAdds a property represents whether the lead sale value was changed last time by Robot to the response
catalog_elementsAdds lists items linked to the lead to the response
source_idAdds the lead source ID to the response
sourceAdds information about the source, its ID and name to the response

filter[statuses]

❗️

Due to the service limitations, you can filter only one stage in one pipeline. But it is possible to filter several stages within several pipelines outside of the service.

Data type header when the request is successful
Content-Type: application/hal+json

Data type header in case of an error
Content-Type: application/problem+json

Response parameters

ParameterData typeDescription
idintLead ID
namestringLead name
priceintLead sale
responsible_user_idintLead responsible user ID
group_idintGroup ID of the lead responsible user
status_idintID of the stage the lead is added to, the first stage of the main pipeline by default
pipeline_idintID of the pipeline the lead is added to
loss_reason_idintLead loss reason ID
source_idintGET parameter “with” is required.
Lead source ID.
created_byintId of the user who created the lead
updated_byintId of the user who updated the lead
created_atintThe time and date the lead was created in the format of Unix Timestamp
updated_atintThe time and date the lead was updated in the format of Unix Timestamp
closed_atintThe time and date the lead was closed in the format of Unix Timestamp
closest_task_atintThe time and date of the closest open task in the format of Unix Timestamp
custom_fields_valuesarray|nullAn array containing information on the values of custom fields specified for this lead
scoreint|nullLead score
account_idintAccount ID where the lead is located in
labor_costintShows how much time was spent working with the deal. Calculation time in seconds.
is_price_modified_by_robotboolGET parameter “with” is required.
Defines whether the lead sale value was changed by the Robot last time.
_embeddedobjectEmbedded entities data
_embedded[loss_reason][loss_reason]objectGET parameter “with” is required.
Lead loss reason
_embedded[loss_reason][id]intLoss reason ID
_embedded[loss_reason][name]stringLoss reason name
_embedded[tags]arrayLead tags data array
_embedded[tags][0]objectLead tag model
_embedded[tags][0][id]intTag ID
_embedded[tags][0][name]stringTag name
_embedded[tags][0][color]string/nullTag color
_embedded[contacts]arrayGET parameter “with” is required.
Linked contacts data array.
_embedded[contacts][0]objectLinked contact data
_embedded[contacts][0][id]intsLinked contact ID
_embedded[contacts][0][is_main][is_main]boolDefines whether the contact is main for the lead
_embedded[companies]arrayLinked company data array. This array always consists of 1 element as a lead can have only 1 company linked to it.
_embedded[companies][0]objectLinked company data
_embedded[companies][0][id]intLinked company ID
_embedded[catalog_elements][catalog_elements]arrayGET parameter “with” is required.
Linked lists’ elements data array.
_embedded[catalog_elements][0]objectLinked list element data
_embedded[catalog_elements][0][id]intLinked element ID
_embedded[catalog_elements][0][metadata]objectMeta-data of the element
_embedded[catalog_elements][0][quantity]intLinked element quantity
_embedded[source]objectGET parameter "with" is required. Lead source
_embedded[source][id]intLead source ID
_embedded[source][id]stringLead source name
Query Params
string

This parameter accepts a string which may consist of several values (look at the table above) separated by commas.

int32

Page of leads list

string

The number of entities returned per request (limit – 250)

string

Search query (Searches through the filled fields of the entity)

string
enum

Sorting the results

Allowed:
string
enum

Sorting the results

Allowed:
string
enum

Sorting the results

Allowed:
filter[id][]
array of int32s

Filter by lead ID

filter[id][]
filter[name][]
array of strings

Filter by lead name

filter[name][]
int32
filter[created_by][]
array of int32s

Filter by ID of the user who created the entity.

filter[created_by][]
filter[updated_by][]
array of int32s

Filter by ID of the user who changed the entity last

filter[updated_by][]
filter[responsible_user_id][]
array of int32s

Filter by ID of the entity responsible user

filter[responsible_user_id][]
int32

Filter by the creation date of the lead. Date in Unix Timestamp format

int32

Filter by the creation date of the lead. Date in Unix Timestamp format

int32

Filter by the last update date of the lead. Date in Unix Timestamp format.

int32

Filter by the last update date of the lead. Date in Unix Timestamp format.

int32

Filter by the lead closing date. Date in Unix Timestamp format.

int32

Filter by the lead closing date. Date in Unix Timestamp format.

int32

Filter leads by the date of the task closest to completion. Date in Unix Timestamp format.

int32

Date in Unix Timestamp format. Date in Unix Timestamp format.

filter[pipeline_id][]
array of int32s

Filter by pipeline ID

filter[pipeline_id][]
int32

Should be used with filter[statuses][0][status_id]. The filter allows you to filter leads based on their specific stages.

int32

Should be used with filter[statuses][0][pipeline_id]. The filter allows you to filter leads based on their specific stages.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
OAuth2
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
text/plain