Complex addition of leads with contact and company

The method allows you to add leads with contacts and a company to your account in batches. The added data can be checked in the duplicate control.

Limitations

  • The method is available according to the user’s rights
  • For one lead, you can specify no more than one related contact and one related company
  • For added entities (lead, contact, company), you can transfer no more than 40 values of additional fields
  • The data you add participates in duplicate control if the option is enabled for the integration that adds the data
  • The method does not perform duplicate control for already added leads against each other
  • The method does not perform duplicate control for leads in the same request
  • The method searches for duplicates among the current added leads against the already added ones
  • You can add no more than 50 leads per request
  • When you create a new contact and company, they will be linked together

Data type header on success
Content-Type: application/hal+json

Data type header on error
Content-Type: application/problem+json

Response example

The first time you enter the lead, it will be added normally.

[  
   {  
       "id": 9774766,  
       "contact_id": 12117258,  
       "company_id": 12117260,  
       "request_id": [  
           "1"  
       ],  
       "merged": false  
   }  
]

Now, let’s change in the request body a little bit. For example, let’s change the request name and id and send it again. According to the duplicate control rules in our account and pipeline where we perform the request, the lead is considered a duplicate. The response with the true value of the merged flag is received.

[  
   {  
       "id": 9774766,  
       "contact_id": 12117258,  
       "company_id": 12117260,  
       "request_id": [  
           "2"  
       ],  
       "merged": true  
   }  
]

Response parameters

ParameterDescription
idLead id
contact_idContact id
company_idCompany id
request_idAn array of request IDs that have been added. If no duplicates were found, the array would always have one element. If multiple duplicates of the same lead are passed, the request_id array will contain the identifiers of the passed leads, which are duplicates.
mergedA flag indicates whether a duplicate was found according to the conditions for searching for duplicates and whether the merging was performed.

Find out more info about metadata and custom_fields_values, used in Body Params.

Language
Credentials
OAuth2
URL
Click Try It! to start a request and see the response here!