get https://{subdomain}.kommo.com/api/v4/leads/
This method allows getting a particular lead data by its ID.
with Parameter | Description |
---|---|
catalog_elements | Adds lists items linked to the lead to the response |
is_price_modified_by_robot | Adds a property represents whether the lead sale value was changed last time by Robot to the response |
loss_reason | Adds detailed information about the lead loss reason to the response |
contacts | Adds information about the contacts associated with the lead to the response |
only_deleted | If 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. |
source_id | Adds the lead source ID to the response |
Limitations
The method is available in accordance with the user’s rights.
Authorization type
OAuth 2.0 with Access Token/ Long-lived token
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
Parameter | Data type | Description |
---|---|---|
id | int | Lead ID |
name | string | Lead name |
price | int | Lead sale |
responsible_user_id | int | Lead responsible user ID |
group_id | int | Group ID of the lead responsible user |
status_id | int | ID of the stage the lead is added to, the first stage of the main pipeline by default |
pipeline_id | int | ID of the pipeline the lead is added to |
loss_reason_id | int | Lead loss reason ID |
source_id | int | GET parameter “with” is required. Lead source ID. |
created_by | int | Id of the user who created the lead |
updated_by | int | Id of the user who updated the lead |
created_at | int | The time and date the lead was created in the format of Unix Timestamp |
updated_at | int | The time and date the lead was updated in the format of Unix Timestamp |
closed_at | int | The time and date the lead was closed in the format of Unix Timestamp |
closest_task_at | int | The time and date of the closest open task in the format of Unix Timestamp |
custom_fields_values | array|null | An array containing information on the values of custom fields specified for this lead |
score | int|null | Lead score |
account_id | int | Account ID where the lead is located in |
labor_cost | int | Shows how much time was spent working with the deal. Calculation time in seconds. |
is_price_modified_by_robot | bool | GET parameter “with” is required. Defines whether the lead sale value was changed by the Robot last time. |
_embedded | object | Embedded entities data |
_embedded[loss_reason] | object | GET parameter “with” is required. Lead loss reason |
_embedded[loss_reason][id] | int | Loss reason ID |
_embedded[loss_reason][name] | string | Loss reason name |
_embedded[tags] | array | Lead tags data array |
_embedded[tags][0] | object | Lead tag model |
_embedded[tags][0][id] | int | Tag ID |
_embedded[tags][0][name] | string | Tag name |
_embedded[tags][0][color] | string/null | Tag color |
_embedded[contacts] | array | GET parameter “with” is required. Linked contacts data array. |
_embedded[contacts][0] | object | Linked contact data |
_embedded[contacts][0][id] | ints | Linked contact ID |
_embedded[contacts][0][is_main] | bool | Defines whether the contact is main for the lead |
_embedded[companies] | array | Linked company data array. This array always consists of 1 element as a lead can have only 1 company linked to it. |
_embedded[companies][0] | object | Linked company data |
_embedded[companies][0][id] | int | Linked company ID |
_embedded[catalog_elements] | array | GET parameter “with” is required. Linked lists’ elements data array. |
_embedded[catalog_elements][0] | object | Linked list element data |
_embedded[catalog_elements][0][id] | int | Linked element ID |
_embedded[catalog_elements][0][metadata] | object | Meta-data of the element |
_embedded[catalog_elements][0][quantity] | int | Linked element quantity |
_embedded[catalog_elements][0][catalog_id] | int | ID of the linked element’s list |