- On the NewLead record, E-mail address is required.
- CountryID or CountryCode is required. (The country ID for US is 1; Canada is 2.)
- StateAbbr is required for US and Canada. Specify standard 2-character US state code or Canadian province code.
- PostalCode: for US, can be specified as 5-digit code or 5+4. (If specified as 5+4, only the 5-digit code is saved; the rest is ignored.)
- PriorityID: must be a valid priority ID. See LeadRslt class for valid values.
- LeadSourceID: must be a valid lead source ID for this client. See GetLeadSources() for valid values.
- A "Categories" array can be passed in. The CategoryId must be set on each record, to a valid category ID for this client. (Specifying third-party category ID’s is not supported.)
- An "Attributes" array can be used to specify one or more attributes. Only text, numeric, yes/no, and option attributes are supported.
This call will set the lead ID in the LeadRslt structure to a negative number on failure. Here are the values related to this method:
-1: invalid credentials (API key and/or client ID) or client does not subscribe to Lead Manager.
-2: validation failure (see errorMsg for details)
-3: exception caught while adding lead. (see errorMsg for details)
Note that, if an error occurs while deserializing the JSON lead object, the system is not capable of passing back a well-formatted error. In this case, you will get a 400 error code and a detailed “request error” from the .Net JSON deserializer.
Lead Priority Values