A lead custom field is an object with the following details.
The unique id of the lead custom field
The value of the lead custom field. Depends on the type of custom field value.
The contact type of a lead is either a company or a contact. When companyId or company is present in the request then the contact type of the lead is set to company, and the contactId or contact must be a contact that belongs to that company. Otherwise the contact type of the lead is set to contact and contactId can be any valid contact in the account.
If contact and company are present in request then it will link given contact to company.
Whether or not the lead was added to the account
The unique id of the lead
Specific Code: 24215
The request is empty
Specific Code: 24216
The lead does not exist
Specific Code: 24218
The lead details are invalid
This call takes values for a lead, and either
Updates the values for that lead (after you have provided an id in the parameters), or
Adds the lead to the system (if the id parameter is missing)
The result of this call will contain the status of the result (either true or false) and the lead identifier of the updated or newly created lead.