API Reference

Lead

A lead represents a scope of work, job or sale in its early stages. A Lead can be converted into a Project later on.

Attributes

AttributeTypeDescription
idStringThe unique id of the Lead.
tenant_idIntegerThe id of the Tenant the Lead belongs to.
lead_connection_idStringThe id of the LeadConnection the Lead belongs to.
transaction_idStringThe id assigned to the Lead when it was submitted. Multiple Leads submitted together will always have the same transaction id.
created_byIntegerThe id of the User that created the Lead.
project_idIntegerThe id of the Project the Lead corresponds to once the Lead has been successfully processed and converted.
statusStringThe current status of the Lead (queued, processing, converting, needs-review, ready, successful, error).
received_atDateTimeThe date time of when the Lead was submitted to Contractors Cloud.
validation_errorsArrayAn array of errors outlining what needs to be fixed before the Lead can be converted into a project.
derived_dataArrayAn array of data that has been derived based on the raw, submitted Lead data. This data will be used to convert the Lead into a project.
dataArrayAn array of rudimentary data derived from the raw, submitted Lead data. This data is related to the defined field maps for the LeadConnection if available.
status_messageStringA human readable message describing the current status of the Lead.
created_atDateTimeThe date time of when the Lead was created.
updated_atDateTimeThe date time of when the Lead was last updated.

Allowed includes

RelationTypeDescription
creatorUserThe User who created the Lead.
projectProjectThe resulting Project the Lead has been converted into.
lead_connectionLeadConnectionThe LeadConnection the Lead belongs to.

Allowed filters

NameTypeDescription
idIntegerFilter Projects by their id.
lead_connection_idStringFilter Leads to a specific LeadConnection.
transaction_idStringFilter Leads to a specific transaction id.
statusStringFilter Leads to a specific status (queued, processing, converting, needs-review, ready, successful, error).
searchStringFilter Leads to a specific search term.

Allowed sorts

NameDescription
received_atSort Leads by when they where submitted.
updated_atSort Leads by when they where last updated.