API Documentation

The below documentation illustrates how to use the LeadExec account API.

Note: For lead data exports, please visit the Lead Data Queries API for documentation.


Authentication

For the following methods, refer to the IAuthenticationService interface when using the .NET SDK.

POST Get Authorization Token

This method generates an authentication token to be used to authenticate with the API.

Request Parameters

Parameter Type Position Required Description
client_id string body required Your client ID
client_secret string body required Your client secret
grant_type string body required Grant type (client_credentials)

Request

POST /v1/authorization/token HTTP/1.1
host: api.leadexec.net
content-type: application/json

{
    "client_id": "00000000-0000-0000-0000-000000000000",
    "client_secret": "00000000-0000-0000-0000-000000000000",
    "grant_type": "client_credentials"
}

Response

{
  "access_token": "00000000-0000-0000-0000-000000000000",
  "token_type": "Bearer",
  "expires_in": 3600,
  "error": null
}

Clients

For the following methods, refer to the IClientsService interface when using the .NET SDK.

PATCH Create / Modify Client Record

This method is used to update or create a client record, this includes client fields.
Note: If creating a new record, supply 0 for the ClientUID field.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
Info.ClientUID integer body required Client identifier
Info.DateAdded date body required Date client record was added (Pacific Time)
Info.Status ClientStatus body required Status of the client.
Available Values:

New
Pending
Working
Waiting
Dead
Inactive
Active
Late
Suspended
Closed
Info.UserUID integer body ID of user to assign to
Info.TimeOffset integer body The amount of hours to offset from UTC
Info.TimeZoneName string body Name of timezone for the offset provided.
Info.Notes string body Notes or comments for the client
Info.ResellerUID integer body Identifier of reseller to assign to.
Info.GroupUID integer body Identifier of the client group to assign to.
Info.Username string body required (if new) Username of the client (must be unique if new).
Info.Password string body required (if new) Password of the client.
Info.OverrideReassign bool body Should this client have the ability to reassign leads from the client portal.
Info.DeliveryAccountAutomationType AutomationType body The automation preference for scanning delivery accounts.
Available Values:

Price
Priority
RoundRobin
FieldData Array<FieldData> body Array of field data for the client
FieldData.ClientFieldUID integer body required The identifier of the client field.
FieldData.Value string body required The value for the field.

Request

PATCH /v1/clients HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

{
  "Info": {
    "ClientUID": 0,
    "DateAdded": "2020-08-21T16:38:22.976Z",
    "Status": "New",
    "UserUID": 0,
    "TimeOffset": -8,
    "Notes": "",
    "TimeZoneName": "Pacific Standard Time",
    "ResellerUID": 0,
    "GroupUID": 0,
    "Username": "",
    "Password": "",
    "OverrideReassign": true,
    "DeliveryAccountAutomationType": "Price"
  },
  "FieldData": [
    {
      "ClientFieldUID": 0,
      "Value": ""
    },
    {
      "ClientFieldUID": 0,
      "Value": ""
    }
  ]
}

Response

123456

GET Client List

This method get a list of all client records.

Request Parameters

Parameter Type Position Required Description
access_token string header Required Authentication token (See Authentication)

Response Properties

Property Type Description Example Values
ClientUID unique identifier Identifier of client integer
DateAdded date Date the client was added (Pacific Time) 2020-08-21T21:21:50.585Z
Status ClientStatus Current status of the client New
Pending
Working
Waiting
Dead
Inactive
Active
Late
Suspended Closed
InternalUID integer Deprecated
UserUID integer User assigned to the client
TimeOffset integer Time offset in hours from UTC -8
Image string Byte array value of the client image (Deprecated)
Notes string The notes or comments contained on the client
IsLocked bool Is the client record locked (Deprecated)
DateLocked date Date the client record was locked (Deprecated)
LockedReason string Reason for client record lock (Deprecated)
OutlookUID string Identifier of client record in Outlook (Deprecated)
TimeZoneName string Name of time zone client is assigned to
ResellerUID integer Identifier of the reseller assigned to the client
GroupUID integer Identifier of the client group client is assigned to
AutomationType automation_type The default automation delivery accounts will follow Avaialble Values:

Price Priority RoundRobin
Priority integer The priority of the cilent with regard to distribution
DeliveryGroupUID integer Identifier of the delivery group assigned to
Username string Username of the client for the client portal
ShowLeadGrade bool Should the lead's grade be shown in the client portal
ShowLeadSource bool Should the lead's source be shown in the client portal
ShowCampaign bool Should the lead's campaign be shown in the client portal
AllowCalls bool Allow calls to be placed from the client portal
AllowReassign bool Allow the client to reassign leads within the client portal
UserAssigned integer User identifier that the client is assigned to
UseDeliveryTiers bool Should the client allow for delivery tiers, this allows delivery accounts to display in multiple delivery groups.
OverrideReassign bool The ability to override an assignment in the client portal.
MFAPhone string The cell phone used to validate multifactor authentication.
MFAEmail string The email used to validate multifactor authentication.

Request

GET /v1/clients HTTP/1.1
host: api.leadexec.net
Authorization: Bearer [access_token]
content-type: application/json

Response

[
  {
    "ClientUID": 0,
    "AccountUID": 0,
    "DateAdded": "2020-08-24T15:57:09.828Z",
    "Status": 0,
    "InternalUID": 0,
    "UserUID": 0,
    "TimeOffset": 0,
    "Image": "",
    "Notes": "",
    "IsLocked": true,
    "LockedBy": 0,
    "DateLocked": "2020-08-24T15:57:09.828Z",
    "LockedReason": "",
    "OutLookUID": "",
    "TimeZoneName": "",
    "ResellerUID": 0,
    "GroupUID": 0,
    "AutomationType": "Price",
    "Priority": 0,
    "DeliveryGroupUID": 0,
    "Username": "",
    "ShowLeadGrade": true,
    "ShowLeadSource": true,
    "ShowCampaign": true,
    "AllowCalls": true,
    "AllowReassign": true,
    "UserAssigned": 0,
    "UseDeliveryTiers": true,
    "OverrideReassign": true,
    "MFAPhone": "",
    "MFAEmail": ""
  },{
    "ClientUID": 0,
    "AccountUID": 0,
    "DateAdded": "2020-08-24T15:57:09.828Z",
    "Status": 0,
    "InternalUID": 0,
    "UserUID": 0,
    "TimeOffset": 0,
    "Image": "",
    "Notes": "",
    "IsLocked": true,
    "LockedBy": 0,
    "DateLocked": "2020-08-24T15:57:09.828Z",
    "LockedReason": "",
    "OutLookUID": "",
    "TimeZoneName": "",
    "ResellerUID": 0,
    "GroupUID": 0,
    "AutomationType": "Price",
    "Priority": 0,
    "DeliveryGroupUID": 0,
    "Username": "",
    "ShowLeadGrade": true,
    "ShowLeadSource": true,
    "ShowCampaign": true,
    "AllowCalls": true,
    "AllowReassign": true,
    "UserAssigned": 0,
    "UseDeliveryTiers": true,
    "OverrideReassign": true,
    "MFAPhone": "",
    "MFAEmail": ""
  }
]

POST Client Active List by Lead Type

Returns a list of active clients by lead type. This list ignores criteria and can be filtered by automation and order preferences.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
leadtypeuid integer query parameter required The identifier of the lead type to list.
DeliveryAccountType AccountType body required The type of delivery account to scan.
Available Values:
Web
Redirect
TransferForm
PhoneRouting
SortBy SortBy body required Sort the list by one of the following.
Available Values:
Name
Price
Priority
LastSentDate
SortDirection SortDirection body required Available Values:
Ascending
Decending
Filters Filter body optional Allows filtering by order, automation, and client groups.
Filters.ClientGroupUIDs Array body optional An array of client group identifiers.
Filters.HasActiveOrder bool body optional Filter list by clients with or without active orders.
Filters.AutomationEnabled bool body optional Filter list by clients with or automation enabled or disabled.
Skip int body required
Take int body required

Response Properties

Property Type Description Example Values
QueryTotal integer The total number of results found
QueryDurationTotalMS integer The total query duration in milliseconds
QueryDurationItemAverageMS integer The average client processing time in milliseconds
Skip integer The skip applied to the results
Take integer The take amount applied to the results
FetchedCount integer The amount of client records returned
Clients array Array of client records
Client.ClientUID unique identifier Identifier of client integer
Client.DateCreated datetime Date the client was created in the system (UTC) 2024-07-10T04:10:07.55Z
Client.Name string Name of client
Client.Email string Email of the client
Client.Phone string Phone number of the client
Client.LastSentDate dateimte The date and time of the last successful send (UTC) 2024-07-10T04:10:07.55Z
Client.Priority int Priority setting located on the client record
Client.Price decimal The price of the delivery account selected during the scanning process based on the sort by and direction
Client.Agent AgentInfo The agent properties located on the delivery account
Client.Agent.Name AgentInfo Name of the agent
Client.Agent.Phone AgentInfo Phone number of the agent
Client.DistributionLists Array Array of distribution lists assigned to the client
Client.DistributionLists.Name string Name of the distribution list
Client.DistributionLists.Assignments Array Array of distribution list items assigned to the client

Request

POST /v1/clients/list/active/leadtype/[leadtypeuid] HTTP/1.1
host: api.leadexec.net
Authorization: Bearer [access_token]
content-type: application/json

{
    "DeliveryAccountType": "",
    "SortBy": "LastSentDate",
    "SortDirection": "Decending",
    "Filters": {
        "HasActiveOrder": true,
        "AutomationEnabled": true,
        "ClientGroupUIDs": [
            0,
            0
        ]
    },
    "Skip": 0,
    "Take": 100
}

Response

{
    "QueryTotal": 0,
    "QueryDurationTotalMS": 0,
    "QueryDurationItemAverageMS": 0.0,
    "Skip": 0,
    "Take": 100,
    "FetchedCount": 0,
    "Clients": [
        {
            "ClientUID": 25756,
            "DateCreated": "2017-03-10T02:29:28.677Z",
            "Name": "",
            "Email": "",
            "Phone": "",
            "LastSentDate": "2024-08-06T22:37:59.79Z",
            "Priority": 0,
            "Price": 0.0000,
            "Agent": null,
            "DistributionLists": [
                {
                    "Name": "",
                    "Assignments": [
                        "",
                        ""
                    ]
                },
                {
                    "Name": "",
                    "Assignments": [
                        "",
                        ""
                    ]
                }
            ]
        },
        {
            "ClientUID": 25756,
            "DateCreated": "2017-03-10T02:29:28.677Z",
            "Name": "",
            "Email": "",
            "Phone": "",
            "LastSentDate": "2024-08-06T22:37:59.79Z",
            "Priority": 0,
            "Price": 0.0000,
            "Agent": null,
            "DistributionLists": [
                {
                    "Name": "",
                    "Assignments": [
                        "",
                        ""
                    ]
                },
                {
                    "Name": "",
                    "Assignments": [
                        "",
                        ""
                    ]
                }
            ]
        }
    ]
}

PATCH Update Client Status

This method updates the status on a client record.

Request Parameters

Parameter Type Position Required Description
access_token string header Required Authentication token (See Authentication)
ClientUID integer url segment Required The client identifier
Status ClientStatus body required Status of the client.
Available Values:
New
Pending
Working
Waiting
Dead
Inactive
Active
Late
Suspended Closed

Request

PATCH /v1/clients/[ClientUID]/status HTTP/1.1
host: api.leadexec.net
Authorization: Bearer [access_token]
content-type: application/json

{
    "Status" : "New"
}

Response

true

PATCH Update Client Group Assignment

This method updates the group assignment on a client record. Either the group name or UID is required. You can remove a group assignment by sending a value of 0 for the client group UID.

Request Parameters

Parameter Type Position Required Description
access_token string header Required Authentication token (See Authentication)
ClientUID integer url segment Required The client identifier
ClientGroupName string body optional Name of the group
ClientGroupUID string body optional Identifier of the group. Send a value of 0 to remove client group assignment.

Request

PATCH /v1/clients/[ClientUID]/group HTTP/1.1
host: api.leadexec.net
Authorization: Bearer [access_token]
content-type: application/json

{
    "ClientGroupName" : "",
    "ClientGroupUID" : 0
}

Response

true

GET Client Group List

This method returns a list of all client groups

Request Parameters

Parameter Type Position Required Description
access_token string header Required Authentication token (See Authentication)

Response Properties

Property Type Description Example Values
ClientGroupUID unique identifier Group identifier integer
Description string Description or name of group
DisplayOrder integer The order in which to display the group within lists
ClientCount integer The quantity of client records assigned to the group

Request

GET /v1/clients/groups HTTP/1.1
host: api.leadexec.net
Authorization: Bearer [access_token]
content-type: application/json

Response

[
  {
    "ClientGroupUID": 0,
    "Description": "string",
    "DisplayOrder": 0,
    "ClientCount": 0
  },
  {
    "ClientGroupUID": 0,
    "Description": "string",
    "DisplayOrder": 0,
    "ClientCount": 0
  }
]

PUT Create / Modify Client Group

This method allows you to create or modify a client group in the system.
Note: When creating a new group, send in 0 for ClientGroupUID

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
ClientGroupUID integer body required Identifier of the group
Description string body required Description or name of the group
DisplayOrder integer body required The display order within lists
ClientCount integer body Not needed for creating or updating groups, send 0

Request

PUT /v1/clients/groups HTTP/1.1
host: api.leadexec.net
Authorization: Bearer [access_token]
content-type: application/json

{
  "ClientGroupUID": 0,
  "Description": "",
  "DisplayOrder": 0,
  "ClientCount": 0
}

Response

No Response

GET Fields for Client

This method returns an array of fields for a client with values.

Request Parameters

Parameter Type Position Required Description
access_token integer header required Authentication token (See Authentication)
ClientUID integer url segment required Identifier of client for values

Response Properties

Property Type Description Example Values
ClientFieldUID unique identifier Identifier of client field integer
Descriptor string Description of the field Company
DataType DataType Type of response No_DataType
Int
Bigint
Bit
Money
Decimal
Float
DateTime
Varchar
Required bool Is the field required true
false
Status bool Is the field enabled true
false
Computed bool Is the field computed based on other fields true
false
ComputedExpr string The expression used to compute the value of the field
Enumerated bool Is the field enumerated with a set list of values true
Enums Array<Enum> Array of Enums that are valid for the field
Enum.ClientFieldEnumUID integer Identifier of the enum
Enum.ClientFieldUID integer Identifier of the parent client field
Enum.Descriptor string Name or value of the enumeration, may not contain spaces
Enum.Priority integer Display priority in lists and dropdowns
Validation string Validation regular expression for confirming formatting
InvalidChars string Invalid character regular expression for trimming invalid characters
FormatError string Error to be displayed when value does not meet required format
FormatString string Display format for the field value throughout the system
SpecialBit SpecialBit The system field the client field should be assigned to throughout the system. Expected Values:
NoSpecialBit
Company
FirstName
LastName
Email
PrimaryPhone
PrimaryPhoneExt
AlternatePhone
AlternatePhoneExt
Address
City
State
Zip
FaxNumber
Comments
JobTitle
WebSite
MobilePhone
isState bool Does the field contain a US state value true
false
FieldValue string Current value of the field for the client
PastValues Array<string> Array of previous values

Request

GET /v1/clients/fields/[ClientUID] HTTP/1.1
host: api.leadexec.net
Authorization: Bearer [access_token]
content-type: application/json

Response


[
  {
    "ClientFieldUID": 0,
    "Descriptor": "",
    "DataType": "No_DataType",
    "Required": true,
    "Status": true,
    "Computed": true,
    "ComputedExpr": "",
    "Enumerated": true,
    "Enums": [
      {
        "ClientFieldEnumUID": 0,
        "ClientFieldUID": 0,
        "Descriptor": "",
        "Priority": 0
      }
    ],
    "Validation": "",
    "InvalidChars": "",
    "FormatError": "",
    "FormatString": "",
    "SpecialBit": "NoSpecialBit",
    "isState": ,
    "FieldValue": "",
    "PastValues": [
      "string",
      "string"
    ]
  }
]

GET Available Fields for Clients

This method returns an array of all possible fields for a client.

Request Parameters

Parameter Type Position Required Description
access_token integer header required Authentication token (See Authentication)

Response Properties

Property Type Description Example Values
ClientFieldUID unique identifier Identifier of client field integer
Descriptor string Description of the field Company
DataType DataType Type of response No_DataType
Int
Bigint
Bit
Money
Decimal
Float
DateTime
Varchar
Required bool Is the field required true
false
Status bool Is the field enabled true
false
Computed bool Is the field computed based on other fields true
false
ComputedExpr string The expression used to compute the value of the field
Enumerated bool Is the field enumerated with a set list of values true
Enums Array<Enum> Array of Enums that are valid for the field
Enum.ClientFieldEnumUID integer Identifier of the enum
Enum.ClientFieldUID integer Identifier of the parent client field
Enum.Descriptor string Name or value of the enumeration, may not contain spaces
Enum.Priority integer Display priority in lists and dropdowns
Validation string Validation regular expression for confirming formatting
InvalidChars string Invalid character regular expression for trimming invalid characters
FormatError string Error to be displayed when value does not meet required format
FormatString string Display format for the field value throughout the system
SpecialBit SpecialBit The system field the client field should be assigned to throughout the system. Expected Values:
NoSpecialBit
Company
FirstName
LastName
Email
PrimaryPhone
PrimaryPhoneExt
AlternatePhone
AlternatePhoneExt
Address
City
State
Zip
FaxNumber
Comments
JobTitle
WebSite
MobilePhone
isState bool Does the field contain a US state value true
false
FieldValue string Not used for this method
PastValues Array<string> Not used for this method

Request

GET /v1/clients/fields HTTP/1.1
host: api.leadexec.net
Authorization: Bearer [access_token]
content-type: application/json

Response


[
  {
    "ClientFieldUID": 0,
    "Descriptor": "",
    "DataType": "No_DataType",
    "Required": true,
    "Status": true,
    "Computed": true,
    "ComputedExpr": "",
    "Enumerated": true,
    "Enums": [
      {
        "ClientFieldEnumUID": 0,
        "ClientFieldUID": 0,
        "Descriptor": "",
        "Priority": 0
      }
    ],
    "Validation": "",
    "InvalidChars": "",
    "FormatError": "",
    "FormatString": "",
    "SpecialBit": "NoSpecialBit",
    "isState": ,
    "FieldValue": "",
    "PastValues": [
      "string",
      "string"
    ]
  }
]

POST Client Login

This method validates a client username and password, also returns the client info object

Request Parameters

Parameter Type Position Required Description
access_token string header Required Authentication token (See Authentication)
Username string body Required Username of the client
Password string body required Password of the client

Response Properties

Property Type Description Example Values
ClientUID unique identifier Identifier of client integer
DateAdded date Date the client was added (Pacific Time) 2020-08-21T21:21:50.585Z
Status ClientStatus Current status of the client New
Pending
Working
Waiting
Dead
Inactive
Active
Late
Suspended Closed
InternalUID integer Deprecated
UserUID integer User assigned to the client
TimeOffset integer Time offset in hours from UTC -8
Image string Byte array value of the client image (Deprecated)
Notes string The notes or comments contained on the client
IsLocked bool Is the client record locked (Deprecated)
DateLocked date Date the client record was locked (Deprecated)
LockedReason string Reason for client record lock (Deprecated)
OutlookUID string Identifier of client record in Outlook (Deprecated)
TimeZoneName string Name of time zone client is assigned to
ResellerUID integer Identifier of the reseller assigned to the client
GroupUID integer Identifier of the client group client is assigned to
Username string Username of the client
Password string Password of the client

Request

POST /v1/clients/login HTTP/1.1
host: api.leadexec.net
Authorization: Bearer [access_token]
content-type: application/json

{
    "Username" : "",
    "Password" : ""
}

Response


{
  "ClientUID": 0,
  "DateAdded": "2020-08-21T21:21:50.585Z",
  "Status": "New",
  "InternalUID": 0,
  "UserUID": 0,
  "TimeOffset": 0,
  "Image": "",
  "Notes": "",
  "IsLocked": true,
  "LockedBy": 0,
  "DateLocked": "2020-08-21T21:21:50.586Z",
  "LockedReason": "",
  "OutLookUID": "",
  "TimeZoneName": "",
  "ResellerUID": 0,
  "GroupUID": 0,
  "Username": "",
  "Password": "",
  "OverrideReassign": true
}

GET Check Client Username

This method checks to see if the supplied username is in use

Request Parameters

Parameter Type Position Required Description
access_token string header Required Authentication token (See Authentication)
Username string url segment Required Username of the client

Request

GET /v1/clients/username/check/[Username] HTTP/1.1
host: api.leadexec.net
Authorization: Bearer [access_token]
content-type: application/json

Response

true

Delivery

For the following methods, refer to the IDeliveryService interface when using the .NET SDK.

GET Client Scanner : Redirects

This method provides the ability to scan redirect URL clients delivery types for a specified lead UID.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LeadUID integer url segment required The lead identifier to scan

Response Properties

Property Type Description Example Values
ClientUID unique identifier Identifier of client integer
ClientAccountUID integer Identifier for the delivery account
ClientOrderUID integer Identiifer for the client order (if any)
ClientOrderItemUID integer Identifier for the client order item (if any)
Automation bool Should the lead be automatically sent

Request

GET /v1/delivery/scanner/redirect/[LeadUID] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

[
  {
    "ClientUID": 0,
    "ClientAccountUID": 0,
    "ClientOrderUID": 0,
    "ClientOrderItemUID": 0,
    "Automation": true
  },{
    "ClientUID": 0,
    "ClientAccountUID": 0,
    "ClientOrderUID": 0,
    "ClientOrderItemUID": 0,
    "Automation": true
  }
]

GET Client Scanner : Call Transfers

This method provides the ability to scan transfer clients delivery type for a specified lead UID.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LeadUID integer url segment required The lead identifier to scan

Response Properties

Property Type Description Example Values
ClientUID unique identifier Identifier of client integer
ClientAccountUID integer Identifier for the delivery account
ClientOrderUID integer Identiifer for the client order (if any)
ClientOrderItemUID integer Identifier for the client order item (if any)
Automation bool Should the lead be automatically sent

Request

GET /v1/delivery/scanner/transfer/[LeadUID] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response


[
  {
    "ClientUID": 0,
    "ClientAccountUID": 0,
    "ClientOrderUID": 0,
    "ClientOrderItemUID": 0,
    "Automation": true
  },{
    "ClientUID": 0,
    "ClientAccountUID": 0,
    "ClientOrderUID": 0,
    "ClientOrderItemUID": 0,
    "Automation": true
  }
]

POST Client Scanner : General

This method provides the ability to scan general clients delivery type for a specified lead UID.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LeadUID integer body required The lead identifier to scan
Automated bool body required Should the system only return clients set for automated delivery
AllowOverMax bool body required Should the system return all matching clients regarless of how many times the lead has been sent already.
IgnoreExclusive bool body required Ignore if lead has already been sent to an exclusive location.

Response Properties

Property Type Description Example Values
ClientUID unique identifier Identifier of client integer
ClientAccountUID integer Identifier for the delivery account
ClientOrderUID integer Identiifer for the client order (if any)
ClientOrderItemUID integer Identifier for the client order item (if any)
Automation bool Should the lead be automatically sent

Request

POST /v1/delivery/scanner/general HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

{
  "LeadUID": 0,
  "Automated": true,
  "AllowOverMax": true,
  "IgnoreExclusive": true
}

Response

[
  {
    "ClientUID": 0,
    "ClientAccountUID": 0,
    "ClientOrderUID": 0,
    "ClientOrderItemUID": 0,
    "Automation": true
  },{
    "ClientUID": 0,
    "ClientAccountUID": 0,
    "ClientOrderUID": 0,
    "ClientOrderItemUID": 0,
    "Automation": true
  }
]

GET Client Scanner : Process Logs

This method provides the ability to retreive the process logs for a lead while scanning clients.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LeadUID integer url segment required The lead identifier

Response Properties

Property Type Description Example Values
LeadUID unique identifier Identifier of the lead integer
ScanDate date Date of the log
Log string Log details

Request

GET /v1/delivery/scanner/logs/[LeadUID] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

[
  {
    "LeadUID": 0,
    "ScanDate": "2020-08-24T15:57:09.561Z",
    "Log": "string"
  },{
    "LeadUID": 0,
    "ScanDate": "2020-08-24T15:57:09.561Z",
    "Log": "string"
  }
]

POST Client Scanner : Search by Criteria

This method provides the ability to retreive a list of clients that match a specified criteria.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LeadTypeUID integer url segment required The identifier of the lead type to scan
Criteria Array<FieldValue> body required An array of field values or criteria to apply
FieldValue.Name string body required Name of the lead field
FieldValue.Value string body required Value of the lead field

Response Properties

Property Type Description Example Values
ClientUID unique identifier Identifier of the client integer
ClientName string Name of the client
ContactFirstName string First name of the contact
ContactLastName string Last name of the contact
Address string Address field
Address 2 string Address 2 field
City string City field
State string State field
Country string Country field
PostalCode string Postal code field
PhoneNumber string Phone number field
Email string Email field
Price double Price located on delivery account
Website string Website field

Request

POST /v1/clients/scanner/criteria/[LeadTypeUID] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

[
  {
    "Name": "",
    "Value": ""
  },{
    "Name": "",
    "Value": ""
  }
]

Response

[
  {
    "ClientUID": 0,
    "ClientName": "",
    "ContactFirstName": "",
    "ContactLastName": "",
    "Address": "",
    "Address2": "",
    "City": "",
    "State": "",
    "Country": "",
    "PostalCode": "",
    "PhoneNumber": "",
    "Email": "",
    "Price": 0,
    "Website": ""
  },{
    "ClientUID": 0,
    "ClientName": "",
    "ContactFirstName": "",
    "ContactLastName": "",
    "Address": "",
    "Address2": "",
    "City": "",
    "State": "",
    "Country": "",
    "PostalCode": "",
    "PhoneNumber": "",
    "Email": "",
    "Price": 0,
    "Website": ""
  }
]

POST Process Client Delivery

This method provides the ability to process delivery of a lead to a client.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LeadUID integer body required The identifier of the lead to be sent
ClientUID integer body required The identifier of the client to send to
ClientAccountUID integer body required The delivery account under the client to assign to
ClientOrderUID integer body The identifier of the order to assign the send to
Notes string body Any notes to attach to the lead send
AllowOverMax bool body Process delivery even if the lead is already at it's max send count.

Response Properties

Property Type Description Example Values
isValid bool Was the delivery successful
Status string Result of the send
Response string Response received from the delivery target

Request

POST /v1/delivery/process HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

{
  "LeadUID": 0,
  "ClientUID": 0,
  "ClientAccountUID": 0,
  "ClientOrderUID": 0,
  "Notes": "",
  "AllowOverMax": true
}

Response

{
  "isValid": true,
  "Status": "",
  "Response": ""
}

POST Auto Process Delivery

Process a general scan on a lead and deliver based on the lead's max sell settings and/or force ID.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LeadUID integer body required The identifier of the lead to be sent
AllowOverMax bool body Process delivery even if the lead is already at it's max send count.
ForceIDs array body optional Array of force ID values to apply when scanning.

Response Properties

Property Type Description Example Values
ClientUID integer Identifier of the client sent to
ClientName string Name of the client sent to
DeliveryAccountUID integer Identifier of the delivery account sent to
DeliveryAccountName string Name of the delivery account sent to
OrderUID integer Identifier of the order sent against
OrderItemUID integer Identifier of the order item sent against
isValid bool Was the delivery successful
Status string Result of the send
Response string Response received from the delivery target

Request

POST /v1/delivery/autosend HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

{
  "LeadUID": 0,
  "AllowOverMax": true,
  "ForceIDs": [
        "",
        ""
    ]
}

Response

{
  "ClientUID": 0,
  "ClientName": "",
  "DeliveryAccountUID": 0,
  "DeliveryAccountName": "",
  "OrderUID": 0,
  "OrderItemUID": 0,
  "isValid": true,
  "Status": "",
  "Response": ""
}

POST Run Lead Automation

This method provides the ability to process delivery of a lead through delivery automation.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LeadUID integer url segment required The identifier of the lead to be sent

Response Properties

Property Type Description Example Values
Result string Was the lead scheduled successful

Request

POST /v1/delivery/runautomation/[LeadUID] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

Record has been scheduled for automation

POST Schedule Lead Automation

This method provides the ability to process delivery of a lead through delivery automation at a specific date and time.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LeadUID integer url segment required The identifier of the lead to be sent
SendDateUtc date body required The date and time the lead should be sent (in UTC)

Response Properties

Property Type Description Example Values
Result string Was the lead scheduled successful

Request

POST /v1/delivery/scheduleautomation/[LeadUID] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

{
    "SendDateUtc": "2021-09-10T18:25:43Z"
}

Response

Record has been scheduled for automation

POST Confirm Delivery

This method provides the ability to confirm that a lead was successfully received.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LeadUID integer url segment required The identifier of the lead to be sent
ClientUID integer url segement required The identifier of the client to send to

Request

POST /v1/delivery/[ClientUID]/confirm/[LeadUID] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

No Response

POST Confirm Redirect Delivery

This method provides the ability to confirm that a lead was redirected based on the client's needs.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LeadUID integer body required The identifier of the lead to be sent
RedirectURL integer body required The URL the lead was redirect to
IsValid integer body required Was the redirection successful
Response integer body The response of the redirect

Request

POST /v1/delivery/redirectconfirmation HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

{
  "isValid": true,
  "Status": "",
  "Response": ""
}

PUT Log Delivery to Client

This method provides the ability to log a lead as sent to a client. Note: This method only logs the send, it will not attempt delivery to the client.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LeadUID integer body required The identifier of the lead to be logged
ClientUID integer body required The identifier of the client to log against
DeliveryUID integer body required The identifier of the delivery to log against
PostString string body The request that was sent to the client
Response string body The response received from the client
ClientOrderUID integer body The identifier of the client order to log against
ClientOrderItemUID integer body The identifier of the client order item to log against
ClientOrderItemUID integer body required The identifier of the client delivery account to log against

Request

PUT /v1/delivery/log HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

{
  "ClientUID": 0,
  "LeadUID": 0,
  "DeliveryUID": 0,
  "PostString": "",
  "Response": "",
  "ClientOrderUID": 0,
  "ClientOrderItemUID": 0,
  "ClientAccountUID": 0
}

Response

No Response

GET Get Sends for Lead

This method returns an array of lead sends for the supplied lead.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LeadUID integer url segment required The identifier of the lead to be returned

Response Properties

Property Type Description Example Values
ClientUID integer The identifier of the client sent to
ClientName string The name of the client sent to
ContactFirstName string The first name field
ContactLastName string The last name field
Address string The address field
Addres2 string The address 2 field
City string The city field
State string The state field
Country string The country field
PostalCode string The postal code field
PhoneNumber string The phone number field
Email string The email field
Notes string The notes field
DateSent date The date the lead was sent
IsValid bool Was the send successful
Response string The response received from the client
Price double The amount the lead was sold for

Request

GET /v1/delivery/sends/[LeadUID] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response


[
  {
    "ClientUID": 0,
    "ClientName": "",
    "ContactFirstName": "",
    "ContactLastName": "",
    "Address": "",
    "Address2": "",
    "City": "",
    "State": "",
    "Country": "",
    "PostalCode": "",
    "PhoneNumber": "",
    "Email": "",
    "Notes": "",
    "DateSent": "2020-08-24T15:57:09.622Z",
    "IsValid": true,
    "Response": "",
    "Price": 0
  },{
    "ClientUID": 0,
    "ClientName": "",
    "ContactFirstName": "",
    "ContactLastName": "",
    "Address": "",
    "Address2": "",
    "City": "",
    "State": "",
    "Country": "",
    "PostalCode": "",
    "PhoneNumber": "",
    "Email": "",
    "Notes": "",
    "DateSent": "2020-08-24T15:57:09.622Z",
    "IsValid": true,
    "Response": "",
    "Price": 0
  }
]

POST Reprocess Send to Client

This method reprocesses the delivery of a lead to a client.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LeadSendUID integer url segment required The identifier of the lead send to be reprocessed

Request

POST /v1/delivery/resend/[LeadSendUID] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

Send has been reprocessed

Delivery Accounts

For the following methods, refer to the IDeliveryAccountsService interface when using the .NET SDK.

POST List of All Accounts (Filtered by Criteria)

This method provides the ability to scan clients delivery accounts for a set of criteria.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LeadTypeUID integer url segment required The lead type of the accounts to return
LeadFieldUID integer body required The identifier of the field to search criteria for
Value string body required The value of the criteria to match with

Response Properties

Property Type Description Example Values
ClientAccountUID unique identifier Identifier of client delivery account integer
ClientUID integer Identifier for the client
DeliveryUID integer Identiifer for the delivery method
Price double The assigned default price
HourMax int The maximum amount of leads that can be delivered within a 60 minute period. Value of -1 means no maximum
DayMax int The maximum amount of leads that can be delivered within the current day. Value of -1 means no maximum
MonthMax int The maximum amount of leads that can be delivered within the current month. Value of -1 means no maximum
WeekMax int The maximum amount of leads that can be delivered within the current week. Value of -1 means no maximum
useOrder bool Should an open order be required to receive leads against this account
Status delivery_account_status The current status Available Values:

9 = Closed
10 = Suspended
11 = OnHold
12 = Open
DeliveryDelay integer The amount in seconds to delay delivery of a lead
Description string Name of account
RedirectURL string The redirect URL the lead should be directed to (if any)
AutomationEnabled bool Does the account receive leads through delivery automation
AlternatePosting integer Identifier of alternate delivery method
AccountType delivery_account_type The type of leads this account is set to receive Available Values:

0 = General
1 = Redirect
2 = Live Call
3 = 800 IVR
AgentName string The name of the agent targeted in the transfer
AgentPhone string The phone number the lead should be transferred to
Criteria Array<Criteria> An array of lead field criteria for filtering leads during scanning
Criteria.ClientCriteriaUID integer The identifier of the criteria item
Criteria.LeadFieldUID integer The identifier of the lead field
Criteria.Type criteria_type The type of fitler to apply Available Values:

FieldValue
Expression
Function
Criteria.Expression string The regular expression or calculated expression for the criteria
Criteria.Operator string The check operator to apply to the value of the lead Available Values:

Equal
NotEqual
Greater
Less
GreaterOrEqual
LessOrEqual
Between
In
NotIn
DateCompare
Distance_Compare
Contains
Doesnt_Contain
Criteria.Value string The value of the criteria to be checked against the lead
DeliveryDetails delivery_method The properties of how a lead is delivered
DeliveryDetails.ClientDeliveryUID integer The identifier for the delivery method
DeliveryDetails.ClientUID integer The identifier for the client
DeliveryDetails.Type delivery_type The type of delivery Available Values:

0 = HTTP POST
1 = HTTP GET
2 = XML / JSON
3 = SalesExec
4 = FTP
5 = E-Mail
6 = CSV Attachment
7 = SOAP
8 = Internal System
9 = PING/POST
10 = Batch Email File Delivery
11 = SMS Notification
DeliveryDetails.Name string The name of the delivery method
DeliveryDetails.Status bool Is the delivery enabled
DeliveryDetails.DateAdded date The date the delivery was created (Pacific Time)
DeliveryDetails.inTesting bool Is the delivery currently in testing. This will force the delivery to use test values if available
DeliveryDetails.LeadTypeUID integer The identifier of the lead type assigned to this delivery
DeliveryDetails.XML string The XML or JSON schema
DeliveryDetails.EmailTemplate string The template of the outbound email to be sent
DeliveryDetails.EmailSubject string The template of the outbound email subject to be sent
DeliveryDetails.FTPUser string The username used during FTP delivery
DeliveryDetails.FTPPassword string The password used during FTP delivery
DeliveryDetails.FTPPath string The file path used during FTP delivery
DeliveryDetails.EmailAddress string The To address used when sending outbound email
DeliveryDetails.useRegEx bool When scanning response from external systems, should the system use a regular expression
DeliveryDetails.ResponseSearch string The expression or text to search for in the response from an external system
DeliveryDetails.DeliveryAddress string The URL that an outbound request should be sent to
DeliveryDetails.SMTPServer string The SMTP server to use when sending outbound email
DeliveryDetails.SMTPAuth bool Does the SMTP server require authentication
DeliveryDetails.SMTPUsername string Username to use when authenticating with SMTP
DeliveryDetails.SMTPPassword string Password to use when authenticating with SMTP
DeliveryDetails.fAddress string The from address applied to outbound emails
DeliveryDetails.tAddress string The To address applied to outbound emails
DeliveryDetails.EmailNotify bool After delivery, should a notification email be sent (depricated)
DeliveryDetails.NotifyCC string The copy to field for outbound emails
DeliveryDetails.NotifyBCC string The blinkd copy field for outbound emails
DeliveryDetails.NotifyEmail string The email to send the notification email to (depricated)
DeliveryDetails.LeadCatUID integer The identifier for the lead category to assign the leads to
DeliveryDetails.ClientEmail string (depricated)
DeliveryDetails.FieldSettings Array<FieldSetting> An array of field mappings for outbound delivery
DeliveryDetails.FieldSetting.DeliverySettingUID integer The identifier of the field setting
DeliveryDetails.FieldSetting.DeliveryUID integer The identifier of the delivery method
DeliveryDetails.FieldSetting.Delete bool Should the setting be removed
DeliveryDetails.FieldSetting.Format string Value format string
DeliveryDetails.FieldSetting.FieldType field_type Type of field mapping Available Values:

0 = Static Value
1 = Lead Field
2 = Special Field
3 = Custom Expr
4 = Sub-String
5 = String Concatenation
6 = Client Field
7 = Lead Source Field
8 = Evaluate Function
DeliveryDetails.FieldSetting.FieldName string Outbound name to send
DeliveryDetails.FieldSetting.Value string Value of the mapping
DeliveryDetails.FieldSetting.LeadFieldUID string Identifier of the lead field if needed
DeliveryDetails.FieldSetting.Expr string Calculated or regular expression used to generate value
DeliveryDetails.FieldSetting.hasMap bool Field setting has value mapping settings
DeliveryDetails.FieldSetting.FieldMappings Array<FieldMapping> Array of field mapping definitions
DeliveryDetails.FieldSetting.FieldMapping.DeliveryMappingUID integer Identifier for the delivery mapping
DeliveryDetails.FieldSetting.FieldMapping.Delete bool Should this mapping be removed
DeliveryDetails.FieldSetting.FieldMapping.DeliverySettingUID integer Parent delivery field setting identifier
DeliveryDetails.FieldSetting.FieldMapping.DeliveryValue string Value to be delivered
DeliveryDetails.FieldSetting.FieldMapping.FieldValue string Value located on the field
DeliveryDetails.DeliveryDays Array<DeliveryDay> Array of valid delivery day schedules
DeliveryDetails.DeliveryDay.DeliveryDayUID integer The identifier of the delivery day setting
DeliveryDetails.DeliveryDay.DeliveryUID integer Parent delivery detail identifier
DeliveryDetails.DeliveryDay.WeekDay integer Day of the week Available Values

0 = Sunday
1 = Monday
2 = Tuesday
3 = Wednesday
4 = Thursday
5 = Friday
6 = Saturday
DeliveryDetails.DeliveryDay.StaticDate date For use on a static date
DeliveryDetails.DeliveryDay.StartTime date Start time of the day or date provided
DeliveryDetails.DeliveryDay.EndTime date End time of the day or date provided
DeliveryDetails.DeliveryDay.Allow bool Should delivery be allowed

Request

POST /v1/delivery/accounts/all/[LeadTypeUID] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

{
    "LeadFieldUID": 0,
    "Value": ""
}

Response

[
  {
    "ClientAccountUID": 0,
    "ClientUID": 0,
    "DeliveryUID": 0,
    "Price": 0,
    "HourMax": 0,
    "DayMax": 0,
    "MonthMax": 0,
    "WeekMax": 0,
    "useOrder": true,
    "Status": 0,
    "DeliveryDelay": 0,
    "Description": "",
    "RedirectURL": "",
    "AutomationEnabled": true,
    "AlternatePosting": 0,
    "AccountType": 0,
    "AgentName": "",
    "AgentPhone": "",
    "Criteria": [
      {
        "ClientCriteriaUID": 0,
        "LeadFieldUID": 0,
        "Type": "FieldValue",
        "Expression": "",
        "Operator": "Equal",
        "Value": ""
      }
    ],
    "DeliveryDetails": {
      "ClientDeliveryUID": 0,
      "ClientUID": 0,
      "Type": 0,
      "Name": "",
      "Status": true,
      "DateAdded": "2020-08-25T14:23:40.877Z",
      "inTesting": true,
      "LeadTypeUID": 0,
      "XML": "",
      "EmailTemplate": "",
      "EmailSubject": "",
      "FTPUser": "",
      "FTPPassword": "",
      "FTPPath": "",
      "EmailAddress": "",
      "useRegEx": true,
      "ResponseSearch": "",
      "DeliveryAddress": "",
      "SMTPServer": "",
      "SMTPAuth": true,
      "SMTPUsername": "",
      "SMTPPassword": "",
      "fAddress": "",
      "tAddress": "",
      "EmailNotify": true,
      "NotifyCC": "",
      "NotifyBCC": "",
      "NotifyEmail": "",
      "LeadCatUID": 0,
      "ClientEmail": "",
      "FieldSettings": [
        {
          "DeliverySettingUID": 0,
          "DeliveryUID": 0,
          "Delete": true,
          "Format": "",
          "FieldType": 0,
          "FieldName": "",
          "Value": "",
          "LeadFieldUID": 0,
          "Expr": "",
          "hasMap": true,
          "FieldMappings": [
            {
              "DeliveryMappingUID": 0,
              "Delete": true,
              "DeliverySettingUID": 0,
              "DeliveryValue": "",
              "FieldValue": ""
            }
          ]
        }
      ],
      "DeliveryDays": [
        {
          "DeliveryDayUID": 0,
          "DeliveryUID": 0,
          "WeekDay": 0,
          "StaticDate": "2020-08-25T14:23:40.877Z",
          "StartTime": "2020-08-25T14:23:40.877Z",
          "EndTime": "2020-08-25T14:23:40.877Z",
          "Allow": true
        }
      ]
    }
  }
]

GET List of Accounts for Client

This method provides a list of all delivery accounts for the specified client.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
ClientUID integer url segment required The identifier of the client

Response Properties

Property Type Description Example Values
ClientAccountUID unique identifier Identifier of client delivery account integer
ClientUID integer Identifier for the client
DeliveryUID integer Identiifer for the delivery method
Price double The assigned default price
HourMax int The maximum amount of leads that can be delivered within a 60 minute period. Value of -1 means no maximum
DayMax int The maximum amount of leads that can be delivered within the current day. Value of -1 means no maximum
MonthMax int The maximum amount of leads that can be delivered within the current month. Value of -1 means no maximum
WeekMax int The maximum amount of leads that can be delivered within the current week. Value of -1 means no maximum
useOrder bool Should an open order be required to receive leads against this account
Status delivery_account_status The current status Available Values:

9 = Closed
10 = Suspended
11 = OnHold
12 = Open
DeliveryDelay integer The amount in seconds to delay delivery of a lead
Description string Name of account
RedirectURL string The redirect URL the lead should be directed to (if any)
AutomationEnabled bool Does the account receive leads through delivery automation
AlternatePosting integer Identifier of alternate delivery method
AccountType delivery_account_type The type of leads this account is set to receive Available Values:

0 = General
1 = Redirect
2 = Live Call
3 = 800 IVR
AgentName string The name of the agent targeted in the transfer
AgentPhone string The phone number the lead should be transferred to
Criteria Array<Criteria> An array of lead field criteria for filtering leads during scanning
Criteria.ClientCriteriaUID integer The identifier of the criteria item
Criteria.LeadFieldUID integer The identifier of the lead field
Criteria.Type criteria_type The type of fitler to apply Available Values:

FieldValue
Expression
Function
Criteria.Expression string The regular expression or calculated expression for the criteria
Criteria.Operator string The check operator to apply to the value of the lead Available Values:

Equal
NotEqual
Greater
Less
GreaterOrEqual
LessOrEqual
Between
In
NotIn
DateCompare
Distance_Compare
Contains
Doesnt_Contain
Criteria.Value string The value of the criteria to be checked against the lead
DeliveryDetails delivery_method The properties of how a lead is delivered
DeliveryDetails.ClientDeliveryUID integer The identifier for the delivery method
DeliveryDetails.ClientUID integer The identifier for the client
DeliveryDetails.Type delivery_type The type of delivery Available Values:

0 = HTTP POST
1 = HTTP GET
2 = XML / JSON
3 = SalesExec
4 = FTP
5 = E-Mail
6 = CSV Attachment
7 = SOAP
8 = Internal System
9 = PING/POST
10 = Batch Email File Delivery
11 = SMS Notification
DeliveryDetails.Name string The name of the delivery method
DeliveryDetails.Status bool Is the delivery enabled
DeliveryDetails.DateAdded date The date the delivery was created (Pacific Time)
DeliveryDetails.inTesting bool Is the delivery currently in testing. This will force the delivery to use test values if available
DeliveryDetails.LeadTypeUID integer The identifier of the lead type assigned to this delivery
DeliveryDetails.XML string The XML or JSON schema
DeliveryDetails.EmailTemplate string The template of the outbound email to be sent
DeliveryDetails.EmailSubject string The template of the outbound email subject to be sent
DeliveryDetails.FTPUser string The username used during FTP delivery
DeliveryDetails.FTPPassword string The password used during FTP delivery
DeliveryDetails.FTPPath string The file path used during FTP delivery
DeliveryDetails.EmailAddress string The To address used when sending outbound email
DeliveryDetails.useRegEx bool When scanning response from external systems, should the system use a regular expression
DeliveryDetails.ResponseSearch string The expression or text to search for in the response from an external system
DeliveryDetails.DeliveryAddress string The URL that an outbound request should be sent to
DeliveryDetails.SMTPServer string The SMTP server to use when sending outbound email
DeliveryDetails.SMTPAuth bool Does the SMTP server require authentication
DeliveryDetails.SMTPUsername string Username to use when authenticating with SMTP
DeliveryDetails.SMTPPassword string Password to use when authenticating with SMTP
DeliveryDetails.fAddress string The from address applied to outbound emails
DeliveryDetails.tAddress string The To address applied to outbound emails
DeliveryDetails.EmailNotify bool After delivery, should a notification email be sent (depricated)
DeliveryDetails.NotifyCC string The copy to field for outbound emails
DeliveryDetails.NotifyBCC string The blinkd copy field for outbound emails
DeliveryDetails.NotifyEmail string The email to send the notification email to (depricated)
DeliveryDetails.LeadCatUID integer The identifier for the lead category to assign the leads to
DeliveryDetails.ClientEmail string (depricated)
DeliveryDetails.FieldSettings Array<FieldSetting> An array of field mappings for outbound delivery
DeliveryDetails.FieldSetting.DeliverySettingUID integer The identifier of the field setting
DeliveryDetails.FieldSetting.DeliveryUID integer The identifier of the delivery method
DeliveryDetails.FieldSetting.Delete bool Should the setting be removed
DeliveryDetails.FieldSetting.Format string Value format string
DeliveryDetails.FieldSetting.FieldType field_type Type of field mapping Available Values:

0 = Static Value
1 = Lead Field
2 = Special Field
3 = Custom Expr
4 = Sub-String
5 = String Concatenation
6 = Client Field
7 = Lead Source Field
8 = Evaluate Function
DeliveryDetails.FieldSetting.FieldName string Outbound name to send
DeliveryDetails.FieldSetting.Value string Value of the mapping
DeliveryDetails.FieldSetting.LeadFieldUID string Identifier of the lead field if needed
DeliveryDetails.FieldSetting.Expr string Calculated or regular expression used to generate value
DeliveryDetails.FieldSetting.hasMap bool Field setting has value mapping settings
DeliveryDetails.FieldSetting.FieldMappings Array<FieldMapping> Array of field mapping definitions
DeliveryDetails.FieldSetting.FieldMapping.DeliveryMappingUID integer Identifier for the delivery mapping
DeliveryDetails.FieldSetting.FieldMapping.Delete bool Should this mapping be removed
DeliveryDetails.FieldSetting.FieldMapping.DeliverySettingUID integer Parent delivery field setting identifier
DeliveryDetails.FieldSetting.FieldMapping.DeliveryValue string Value to be delivered
DeliveryDetails.FieldSetting.FieldMapping.FieldValue string Value located on the field
DeliveryDetails.DeliveryDays Array<DeliveryDay> Array of valid delivery day schedules
DeliveryDetails.DeliveryDay.DeliveryDayUID integer The identifier of the delivery day setting
DeliveryDetails.DeliveryDay.DeliveryUID integer Parent delivery detail identifier
DeliveryDetails.DeliveryDay.WeekDay integer Day of the week Available Values

0 = Sunday
1 = Monday
2 = Tuesday
3 = Wednesday
4 = Thursday
5 = Friday
6 = Saturday
DeliveryDetails.DeliveryDay.StaticDate date For use on a static date
DeliveryDetails.DeliveryDay.StartTime date Start time of the day or date provided
DeliveryDetails.DeliveryDay.EndTime date End time of the day or date provided
DeliveryDetails.DeliveryDay.Allow bool Should delivery be allowed

Request

GET /v1/delivery/[ClientUID]/accounts HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

[
  {
    "ClientAccountUID": 0,
    "ClientUID": 0,
    "DeliveryUID": 0,
    "Price": 0,
    "HourMax": 0,
    "DayMax": 0,
    "MonthMax": 0,
    "WeekMax": 0,
    "useOrder": true,
    "Status": 0,
    "DeliveryDelay": 0,
    "Description": "",
    "RedirectURL": "",
    "AutomationEnabled": true,
    "AlternatePosting": 0,
    "AccountType": 0,
    "AgentName": "",
    "AgentPhone": "",
    "Criteria": [
      {
        "ClientCriteriaUID": 0,
        "LeadFieldUID": 0,
        "Type": "FieldValue",
        "Expression": "",
        "Operator": "Equal",
        "Value": ""
      }
    ],
    "DeliveryDetails": {
      "ClientDeliveryUID": 0,
      "ClientUID": 0,
      "Type": 0,
      "Name": "",
      "Status": true,
      "DateAdded": "2020-08-25T14:23:40.877Z",
      "inTesting": true,
      "LeadTypeUID": 0,
      "XML": "",
      "EmailTemplate": "",
      "EmailSubject": "",
      "FTPUser": "",
      "FTPPassword": "",
      "FTPPath": "",
      "EmailAddress": "",
      "useRegEx": true,
      "ResponseSearch": "",
      "DeliveryAddress": "",
      "SMTPServer": "",
      "SMTPAuth": true,
      "SMTPUsername": "",
      "SMTPPassword": "",
      "fAddress": "",
      "tAddress": "",
      "EmailNotify": true,
      "NotifyCC": "",
      "NotifyBCC": "",
      "NotifyEmail": "",
      "LeadCatUID": 0,
      "ClientEmail": "",
      "FieldSettings": [
        {
          "DeliverySettingUID": 0,
          "DeliveryUID": 0,
          "Delete": true,
          "Format": "",
          "FieldType": 0,
          "FieldName": "",
          "Value": "",
          "LeadFieldUID": 0,
          "Expr": "",
          "hasMap": true,
          "FieldMappings": [
            {
              "DeliveryMappingUID": 0,
              "Delete": true,
              "DeliverySettingUID": 0,
              "DeliveryValue": "",
              "FieldValue": ""
            }
          ]
        }
      ],
      "DeliveryDays": [
        {
          "DeliveryDayUID": 0,
          "DeliveryUID": 0,
          "WeekDay": 0,
          "StaticDate": "2020-08-25T14:23:40.877Z",
          "StartTime": "2020-08-25T14:23:40.877Z",
          "EndTime": "2020-08-25T14:23:40.877Z",
          "Allow": true
        }
      ]
    }
  }
]

GET Delivery Account Detail

Provides details and delivery details for the supplied delivery account.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
ClientUID integer url segment required The identifier of the client
ClientAccountUID integer url segment required The identifier of the delivery account

Response Properties

Property Type Description Example Values
ClientAccountUID unique identifier Identifier of client delivery account integer
ClientUID integer Identifier for the client
DeliveryUID integer Identiifer for the delivery method
Price double The assigned default price
HourMax int The maximum amount of leads that can be delivered within a 60 minute period. Value of -1 means no maximum
DayMax int The maximum amount of leads that can be delivered within the current day. Value of -1 means no maximum
MonthMax int The maximum amount of leads that can be delivered within the current month. Value of -1 means no maximum
WeekMax int The maximum amount of leads that can be delivered within the current week. Value of -1 means no maximum
useOrder bool Should an open order be required to receive leads against this account
Status delivery_account_status The current status Available Values:

9 = Closed
10 = Suspended
11 = OnHold
12 = Open
DeliveryDelay integer The amount in seconds to delay delivery of a lead
Description string Name of account
RedirectURL string The redirect URL the lead should be directed to (if any)
AutomationEnabled bool Does the account receive leads through delivery automation
AlternatePosting Integer Identifier of the alternate posting
AccountType delivery_account_type The type of leads this account is set to receive Available Values:

0 = General
1 = Redirect
2 = Live Call
3 = 800 IVR
AgentName string The name of the agent targeted in the transfer
AgentPhone string The phone number the lead should be transferred to
Criteria Array<Criteria> An array of lead field criteria for filtering leads during scanning
Criteria.ClientCriteriaUID integer The identifier of the criteria item
Criteria.LeadFieldUID integer The identifier of the lead field
Criteria.Type criteria_type The type of fitler to apply Available Values:

FieldValue
Expression
Function
Criteria.Expression string The regular expression or calculated expression for the criteria
Criteria.Operator string The check operator to apply to the value of the lead Available Values:

Equal
NotEqual
Greater
Less
GreaterOrEqual
LessOrEqual
Between
In
NotIn
DateCompare
Distance_Compare
Contains
Doesnt_Contain
Criteria.Value string The value of the criteria to be checked against the lead
DeliveryDetails delivery_method The properties of how a lead is delivered
DeliveryDetails.ClientDeliveryUID integer The identifier for the delivery method
DeliveryDetails.ClientUID integer The identifier for the client
DeliveryDetails.Type delivery_type The type of delivery Available Values:

0 = HTTP POST
1 = HTTP GET
2 = XML / JSON
3 = SalesExec
4 = FTP
5 = E-Mail
6 = CSV Attachment
7 = SOAP
8 = Internal System
9 = PING/POST
10 = Batch Email File Delivery
11 = SMS Notification
DeliveryDetails.Name string The name of the delivery method
DeliveryDetails.Status bool Is the delivery enabled
DeliveryDetails.DateAdded date The date the delivery was created (Pacific Time)
DeliveryDetails.inTesting bool Is the delivery currently in testing. This will force the delivery to use test values if available
DeliveryDetails.LeadTypeUID integer The identifier of the lead type assigned to this delivery
DeliveryDetails.XML string The XML or JSON schema
DeliveryDetails.EmailTemplate string The template of the outbound email to be sent
DeliveryDetails.EmailSubject string The template of the outbound email subject to be sent
DeliveryDetails.FTPUser string The username used during FTP delivery
DeliveryDetails.FTPPassword string The password used during FTP delivery
DeliveryDetails.FTPPath string The file path used during FTP delivery
DeliveryDetails.EmailAddress string The To address used when sending outbound email
DeliveryDetails.useRegEx bool When scanning response from external systems, should the system use a regular expression
DeliveryDetails.ResponseSearch string The expression or text to search for in the response from an external system
DeliveryDetails.DeliveryAddress string The URL that an outbound request should be sent to
DeliveryDetails.SMTPServer string The SMTP server to use when sending outbound email
DeliveryDetails.SMTPAuth bool Does the SMTP server require authentication
DeliveryDetails.SMTPUsername string Username to use when authenticating with SMTP
DeliveryDetails.SMTPPassword string Password to use when authenticating with SMTP
DeliveryDetails.fAddress string The from address applied to outbound emails
DeliveryDetails.tAddress string The To address applied to outbound emails
DeliveryDetails.EmailNotify bool After delivery, should a notification email be sent (depricated)
DeliveryDetails.NotifyCC string The copy to field for outbound emails
DeliveryDetails.NotifyBCC string The blinkd copy field for outbound emails
DeliveryDetails.NotifyEmail string The email to send the notification email to (depricated)
DeliveryDetails.LeadCatUID integer The identifier for the lead category to assign the leads to
DeliveryDetails.ClientEmail string (depricated)
DeliveryDetails.FieldSettings Array<FieldSetting> An array of field mappings for outbound delivery
DeliveryDetails.FieldSetting.DeliverySettingUID integer The identifier of the field setting
DeliveryDetails.FieldSetting.DeliveryUID integer The identifier of the delivery method
DeliveryDetails.FieldSetting.Delete bool Should the setting be removed
DeliveryDetails.FieldSetting.Format string Value format string
DeliveryDetails.FieldSetting.FieldType field_type Type of field mapping Available Values:

0 = Static Value
1 = Lead Field
2 = Special Field
3 = Custom Expr
4 = Sub-String
5 = String Concatenation
6 = Client Field
7 = Lead Source Field
8 = Evaluate Function
DeliveryDetails.FieldSetting.FieldName string Outbound name to send
DeliveryDetails.FieldSetting.Value string Value of the mapping
DeliveryDetails.FieldSetting.LeadFieldUID string Identifier of the lead field if needed
DeliveryDetails.FieldSetting.Expr string Calculated or regular expression used to generate value
DeliveryDetails.FieldSetting.hasMap bool Field setting has value mapping settings
DeliveryDetails.FieldSetting.FieldMappings Array<FieldMapping> Array of field mapping definitions
DeliveryDetails.FieldSetting.FieldMapping.DeliveryMappingUID integer Identifier for the delivery mapping
DeliveryDetails.FieldSetting.FieldMapping.Delete bool Should this mapping be removed
DeliveryDetails.FieldSetting.FieldMapping.DeliverySettingUID integer Parent delivery field setting identifier
DeliveryDetails.FieldSetting.FieldMapping.DeliveryValue string Value to be delivered
DeliveryDetails.FieldSetting.FieldMapping.FieldValue string Value located on the field
DeliveryDetails.DeliveryDays Array<DeliveryDay> Array of valid delivery day schedules
DeliveryDetails.DeliveryDay.DeliveryDayUID integer The identifier of the delivery day setting
DeliveryDetails.DeliveryDay.DeliveryUID integer Parent delivery detail identifier
DeliveryDetails.DeliveryDay.WeekDay integer Day of the week Available Values

0 = Sunday
1 = Monday
2 = Tuesday
3 = Wednesday
4 = Thursday
5 = Friday
6 = Saturday
DeliveryDetails.DeliveryDay.StaticDate date For use on a static date
DeliveryDetails.DeliveryDay.StartTime date Start time of the day or date provided
DeliveryDetails.DeliveryDay.EndTime date End time of the day or date provided
DeliveryDetails.DeliveryDay.Allow bool Should delivery be allowed

Request

GET /v1/delivery/[ClientUID]/accounts/[ClientAccountUID] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

{
    "ClientAccountUID": 0,
    "ClientUID": 0,
    "DeliveryUID": 0,
    "Price": 0,
    "HourMax": 0,
    "DayMax": 0,
    "MonthMax": 0,
    "WeekMax": 0,
    "useOrder": true,
    "Status": 0,
    "DeliveryDelay": 0,
    "Description": "",
    "RedirectURL": "",
    "AutomationEnabled": true,
    "AlternatePosting": 0,
    "AccountType": 0,
    "AgentName": "",
    "AgentPhone": "",
    "Criteria": [
      {
        "ClientCriteriaUID": 0,
        "LeadFieldUID": 0,
        "Type": "FieldValue",
        "Expression": "",
        "Operator": "Equal",
        "Value": ""
      }
    ],
    "DeliveryDetails": {
      "ClientDeliveryUID": 0,
      "ClientUID": 0,
      "Type": 0,
      "Name": "",
      "Status": true,
      "DateAdded": "2020-08-25T14:23:40.877Z",
      "inTesting": true,
      "LeadTypeUID": 0,
      "XML": "",
      "EmailTemplate": "",
      "EmailSubject": "",
      "FTPUser": "",
      "FTPPassword": "",
      "FTPPath": "",
      "EmailAddress": "",
      "useRegEx": true,
      "ResponseSearch": "",
      "DeliveryAddress": "",
      "SMTPServer": "",
      "SMTPAuth": true,
      "SMTPUsername": "",
      "SMTPPassword": "",
      "fAddress": "",
      "tAddress": "",
      "EmailNotify": true,
      "NotifyCC": "",
      "NotifyBCC": "",
      "NotifyEmail": "",
      "LeadCatUID": 0,
      "ClientEmail": "",
      "FieldSettings": [
        {
          "DeliverySettingUID": 0,
          "DeliveryUID": 0,
          "Delete": true,
          "Format": "",
          "FieldType": 0,
          "FieldName": "",
          "Value": "",
          "LeadFieldUID": 0,
          "Expr": "",
          "hasMap": true,
          "FieldMappings": [
            {
              "DeliveryMappingUID": 0,
              "Delete": true,
              "DeliverySettingUID": 0,
              "DeliveryValue": "",
              "FieldValue": ""
            }
          ]
        }
      ],
      "DeliveryDays": [
        {
          "DeliveryDayUID": 0,
          "DeliveryUID": 0,
          "WeekDay": 0,
          "StaticDate": "2020-08-25T14:23:40.877Z",
          "StartTime": "2020-08-25T14:23:40.877Z",
          "EndTime": "2020-08-25T14:23:40.877Z",
          "Allow": true
        }
      ]
    }
}

PUT Create or Modify Delivery Account

This method provides the ability to create or modify a delivery account.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
ClientUID integer url segment required The identifier of the client being updated
ClientAccountUID unique identifier body required Identifier of client delivery account, Send 0 for a new delivery account
ClientUID integer body required Identifier for the client
DeliveryUID integer body required Identiifer for the delivery method
Price double body required The assigned default price
HourMax int body required The maximum amount of leads that can be delivered within a 60 minute period. Value of -1 means no maximum
DayMax int body required The maximum amount of leads that can be delivered within the current day. Value of -1 means no maximum
MonthMax int body required The maximum amount of leads that can be delivered within the current month. Value of -1 means no maximum
WeekMax int body required The maximum amount of leads that can be delivered within the current week. Value of -1 means no maximum
useOrder bool body required Should an open order be required to receive leads against this account
Status account_status body required The current status, Available Values:

9 = Closed
10 = Suspended
11 = OnHold
12 = Open
DeliveryDelay integer body required The amount in seconds to delay delivery of a lead
Description string body required Name of account
RedirectURL string body required The redirect URL the lead should be directed to (if any)
AutomationEnabled bool body required Does the account receive leads through delivery automation
AlternatePosting Integer body required Identifier of the alternate posting method
AccountType account_type body required The type of leads this account is set to receive, Available Values:

0 = General
1 = Redirect
2 = Live Call
3 = 800 IVR
AgentName string body required The name of the agent targeted in the transfer
AgentPhone string body required The phone number the lead should be transferred to
Criteria Array<Criteria> body An array of lead field criteria for filtering leads during scanning
Criteria.ClientCriteriaUID integer body required The identifier of the criteria item
Criteria.LeadFieldUID integer body required The identifier of the lead field
Criteria.Type criteria_type body required The type of fitler to apply, Available Values:

FieldValue
Expression
Function
Criteria.Expression string body required The regular expression or calculated expression for the criteria
Criteria.Operator string body required The check operator to apply to the value of the lead, Available Values:

Equal
NotEqual
Greater
Less
GreaterOrEqual
LessOrEqual
Between
In
NotIn
DateCompare
Distance_Compare
Contains
Doesnt_Contain
Criteria.Value string body required The value of the criteria to be checked against the lead

Request

PUT /v1/delivery/[ClientUID]/accounts/ HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

{
  "ClientAccountUID": 0,
  "ClientUID": 0,
  "DeliveryUID": 0,
  "Price": 0,
  "HourMax": 0,
  "DayMax": 0,
  "MonthMax": 0,
  "WeekMax": 0,
  "useOrder": true,
  "Status": 0,
  "DeliveryDelay": 0,
  "Description": "",
  "RedirectURL": "",
  "AutomationEnabled": true,
  "AlternatePosting": 0,
  "AccountType": 0,
  "AgentName": "",
  "AgentPhone": "",
  "Criteria": [
    {
      "ClientCriteriaUID": 0,
      "LeadFieldUID": 0,
      "Type": "FieldValue",
      "Expression": "",
      "Operator": "Equal",
      "Value": ""
    }
  ]
}

Response

123456

PUT Update Delivery Quantity Maxes

This method provides the ability to update the quantity maxes on a delivery account.

Request Parameters

Parameter Type Position Required Description
api_key string header required Authentication token
ClientUID integer url segment required The identifier of the client being updated
DeliveryAccountUID integer url segment required Identifier of client delivery account
HourMax integer body optional The amount of leads that can be received in a 60 minute period.
Send 0 for no maximum or exclude to not modify the value
DailyMax integer body optional The amount of leads that can be received in 1 calendar day.
Send 0 for no maximum or exclude to not modify the value
WeeklyMax integer body optional The amount of leads that can be received in 1 calendar week.
Send 0 for no maximum or exclude to not modify the value
MonthlyMax integer body optional The amount of leads that can be received in 1 calendar month.
Send 0 for no maximum or exclude to not modify the value

Request

PUT /v1/delivery/[ClientUID]/accounts/[DeliveryAccountUID]/maxes HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

{
  "HourMax": 0,
  "DailyMax": 0,
  "WeeklyMax": 0,
  "MonthlyMax": 0
}

Response

true | false

Delivery Methods

For the following methods, refer to the IDeliveryMethods interface when using the .NET SDK.

PATCH Set Default Mappings

This method updates a delivery method and sets the mappings based on the lead type assigned.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
DeliveryUID integer url segment required The identifier of the delivery method

Request

PATCH /v1/delivery/methods/mappings/setdefault/[DeliveryUID] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

true

PUT Create or Modify Delivery Method

This method creates or modifies a delivery method for the specified client.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
ClientUID integer url segment required The identifier of the client being modified
ClientDeliveryUID integer body required The identifier for the delivery method
ClientUID integer body required The identifier for the client
Type delivery_type body required The type of delivery, Available Values:

0 = HTTP POST
1 = HTTP GET
2 = XML / JSON
3 = SalesExec
4 = FTP
5 = E-Mail
6 = CSV Attachment
7 = SOAP
8 = Internal System
9 = PING/POST
10 = Batch Email File Delivery
11 = SMS Notification
Name string body required The name of the delivery method
Status bool body required Is the delivery enabled
DateAdded date body required The date the delivery was created (Pacific Time)
inTesting bool body required Is the delivery currently in testing. This will force the delivery to use test values if available
LeadTypeUID integer body required The identifier of the lead type assigned to this delivery
XML string body required The XML or JSON schema
EmailTemplate string body required The template of the outbound email to be sent
EmailSubject string body required The template of the outbound email subject to be sent
FTPUser string body required The username used during FTP delivery
FTPPassword string body required The password used during FTP delivery
FTPPath string body required The file path used during FTP delivery
EmailAddress string body required The To address used when sending outbound email
useRegEx bool body required When scanning response from external systems, should the system use a regular expression
ResponseSearch string body required The expression or text to search for in the response from an external system
DeliveryAddress string body required The URL that an outbound request should be sent to
SMTPServer string body required The SMTP server to use when sending outbound email
SMTPAuth bool body required Does the SMTP server require authentication
SMTPUsername string body required Username to use when authenticating with SMTP
SMTPPassword string body required Password to use when authenticating with SMTP
fAddress string body required The from address applied to outbound emails
tAddress string body required The To address applied to outbound emails
EmailNotify bool body required After delivery, should a notification email be sent (depricated)
NotifyCC string body required The copy to field for outbound emails
NotifyBCC string body required The blinkd copy field for outbound emails
NotifyEmail string body required The email to send the notification email to (depricated)
LeadCatUID integer body required The identifier for the lead category to assign the leads to
ClientEmail string body required (depricated)
Settings Array<Setting> body An array of field mappings for outbound delivery
Setting.DeliverySettingUID integer body required The identifier of the field setting
Setting.DeliveryUID integer body required The identifier of the delivery method
Setting.Delete bool body required Should the setting be removed
Setting.Format string body required Value format string
Setting.FieldType field_type body required Type of field mapping, Available Values:

0 = Static Value
1 = Lead Field
2 = Special Field
3 = Custom Expr
4 = Sub-String
5 = String Concatenation
6 = Client Field
7 = Lead Source Field
8 = Evaluate Function
Setting.FieldName string body required Outbound name to send
Setting.Value string body required Value of the mapping
Setting.LeadFieldUID string body required Identifier of the lead field if needed
Setting.Expr string body required Calculated or regular expression used to generate value
Setting.hasMap bool body required Field setting has value mapping settings
Setting.Mappings Array<Mapping> body Array of field mapping definitions
Setting.Mapping.DeliveryMappingUID integer body required Identifier for the delivery mapping
Setting.Mapping.Delete bool body required Should this mapping be removed
Setting.Mapping.DeliverySettingUID integer body required Parent delivery field setting identifier
Setting.Mapping.DeliveryValue string body required Value to be delivered
Setting.Mapping.FieldValue string body required Value located on the field
DeliveryDays Array<DeliveryDay> body Array of valid delivery day schedules
DeliveryDay.DeliveryDayUID integer body required The identifier of the delivery day setting
DeliveryDay.DeliveryUID integer body required Parent delivery detail identifier
DeliveryDay.WeekDay integer body required Day of the week, Available Values

0 = Sunday
1 = Monday
2 = Tuesday
3 = Wednesday
4 = Thursday
5 = Friday
6 = Saturday
DeliveryDay.StaticDate date body required For use on a static date
DeliveryDay.StartTime date body required Start time of the day or date provided
DeliveryDay.EndTime date body required End time of the day or date provided
DeliveryDay.Allow bool body required Should delivery be allowed

Request

PUT /v1/delivery/[ClientUID]/methods HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

{
  "ClientDeliveryUID": 0,
  "ClientUID": 0,
  "Type": 0,
  "Name": "",
  "Status": true,
  "DateAdded": "2020-08-25T21:54:05.844Z",
  "inTesting": true,
  "LeadTypeUID": 0,
  "XML": "",
  "EmailTemplate": "",
  "EmailSubject": "",
  "FTPUser": "",
  "FTPPassword": "",
  "FTPPath": "",
  "EmailAddress": "",
  "useRegEx": true,
  "ResponseSearch": "",
  "DeliveryAddress": "",
  "SMTPServer": "",
  "SMTPAuth": true,
  "SMTPUsername": "",
  "SMTPPassword": "",
  "fAddress": "",
  "tAddress": "",
  "EmailNotify": true,
  "NotifyCC": "",
  "NotifyBCC": "",
  "NotifyEmail": "",
  "LeadCatUID": 0,
  "ClientEmail": "",
  "FieldSettings": [
    {
      "DeliverySettingUID": 0,
      "DeliveryUID": 0,
      "Delete": true,
      "Format": "",
      "FieldType": 0,
      "FieldName": "",
      "Value": "",
      "LeadFieldUID": 0,
      "Expr": "",
      "hasMap": true,
      "FieldMappings": [
        {
          "DeliveryMappingUID": 0,
          "Delete": true,
          "DeliverySettingUID": 0,
          "DeliveryValue": "",
          "FieldValue": ""
        }
      ]
    }
  ],
  "DeliveryDays": [
    {
      "DeliveryDayUID": 0,
      "DeliveryUID": 0,
      "WeekDay": 0,
      "StaticDate": "2020-08-25T21:54:05.845Z",
      "StartTime": "2020-08-25T21:54:05.845Z",
      "EndTime": "2020-08-25T21:54:05.845Z",
      "Allow": true
    }
  ]
}

Response

123456

Orders

PUT Create or Modify Order

This method provides the ability to update or create a client order.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
ClientOrderUID integer body required The identifier of the order to be updated. Send 0 when creating a new order
ClientUID integer body required The identifier of the client the order is assigned to
StartDate date body required The date and time the order will start (ISO 8601 format 'YYYY-MM-DDTHH:MM:SSZ')
EndDate date body required The date and time the order will end (ISO 8601 format 'YYYY-MM-DDTHH:MM:SSZ')
Status order_status body required Current status, Available Values:

Closed
Open
OnHold
Filled
Pending
Paused
Renewal renewal_type body required How is the order renewed when complete, Available Values:

No_Renewal
On_End
On_Qty_Fill
AutoCharge bool body required Should the order be charged automatically
Items Array<OrderItem> body required An array of items on the order
OrderItem.ClientOrderItemUID integer body required The identifier of the order item, send 0 for a new order item
OrderItem.ClientAccountUID integer body optional The delivery account ordered
OrderItem.Qty integer body required The quantity of leads ordered
OrderItem.ConstrainQuantity bool body required Limit delivery to only the quantity ordered
OrderItem.Price double body required The price amount of the leads ordered

Request

PUT /v1/orders HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

{
  "ClientOrderUID": 0,
  "ClientUID": 0,
  "StartDate": "2020-08-25T22:47:27.658Z",
  "EndDate": "2020-08-25T22:47:27.658Z",
  "Status": "Closed",
  "Renewal": "No_Renewal",
  "AutoCharge": true,
  "Items": [
    {
      "ClientOrderItemUID": 0,
      "ClientAccountUID": 0,
      "Qty": 0,
      "Price": 0,
      "ConstrainQuantity": true
    }
  ]
}

Response

123456

GET Retrieve Order Details or List

Query order list and return specific order details or a list of orders that meet the criteria supplied.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
OrderUID integer body optional The identifier of the order
OrderStatusFilter integer body optional The status of the orders to be returned

Pending
Open
Closed
OnHold
Filled
Paused
ClientUID integer body optional The identifier of the client
StartDate integer body optional The minimum start date to return (ISO 8601 format 'YYYY-MM-DDTHH:MM:SSZ')
Skip integer body required The amount of orders to skip
Take integer body required The amount of orders to return (maximum: 100)

Response Properties

Property Type Description Example Values
QueryTotal integer The total number of orders found
Count integer The number of orders returned
Skip integer The amount of orders that were skipped
Take integer The number of orders requested
Orders array Array of orders found
Order:ClientOrderUID integer The identifier of the order
Order:ClientUID integer The identifier of the client the order is assigned to
Order:StartDate date The start date of the order YYYY-MM-DDTHH:MM:SSZ
Order:EndDate date The end date of the order YYYY-MM-DDTHH:MM:SSZ
Order:Qty integer The amount of leads ordered (value will be null for dollar based orders)
Order:SentQty integer The amount of leads delivered on this order
Order:PriceTotal double The dollar amount of the order
Order:SentPriceTotal double The dollar amount of leads delivered
Order:Status string The current status of the order Pending
Open
Closed
OnHold
Filled
Paused
Order:Renewal string The renewal option assigned to the order No_Renewal
On_End
On_Qty_Fill
Order:AutoCharge bool Is the order set to auto charge on renewal
Order:Items array Array of items included in the order
Order:Items:ClientOrderItemUID integer The identifier of the order item
Order:Items:ClientAccountUID integer The identifier of the delivery account ordered (0 = any delivery account)
Order:Items:Qty integer The amount of leads ordered (will be null for dollar based orders)
Order:Items:SentQty integer The amount of leads delivered against this item
Order:Items:ConstrainQuantity bool Limit delivery to only the quantity ordered
Order:Items:Price double The dollar amount of ordered
Order:Items:SentPrice integer The dollar amount delivered against this item

Request

GET /v1/orders HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

{
    "OrderUID": null,
    "OrderStatusFilter": null,
    "ClientUID": null,
    "StartDate": null,
    "Skip": 0,
    "Take": 20
}

Response

{
    "QueryTotal": 0,
    "Count": 0,
    "Skip": 0,
    "Take": 0,
    "Orders": [
        {
            "ClientOrderUID": 0,
            "ClientUID": 0,
            "StartDate": "00-00-00T00:00:00Z",
            "EndDate": null,
            "Qty": 0,
            "SentQty": 0,
            "PriceTotal": 0.0,
            "SentPriceTotal": 0.0,
            "Status": "Open",
            "Renewal": "No_Renewal",
            "AutoCharge": false,
            "Items": [
                {
                    "ClientOrderItemUID": 0,
                    "ClientAccountUID": null,
                    "Qty": 0,
                    "SentQty": 0,
                    "ConstrainQuantity": true,
                    "Price": 0.0,
                    "SentPrice": 0.0
                }
            ]
        },
        {
        "ClientOrderUID": 0,
        "ClientUID": 0,
        "StartDate": "00-00-00T00:00:00Z",
        "EndDate": null,
        "Qty": 0,
        "SentQty": 0,
        "PriceTotal": 0.0,
        "SentPriceTotal": 0.0,
        "Status": "Open",
        "Renewal": "No_Renewal",
        "AutoCharge": false,
        "Items": [
            {
                "ClientOrderItemUID": 0,
                "ClientAccountUID": null,
                "Qty": 0,
                "SentQty": 0,
                "ConstrainQuantity": true,
                "Price": 0.0,
                "SentPrice": 0.0
            }
        ]
    }
    ]
}

PUT Create Order Payment

This method provides the ability to apply a payment to an order. Note: This method only logs a payment, it will not run a credit card or payment method. Use this method to log a payment received outside the system.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
ClientUID integer body required The identifier of the client the payment is assigned to
ClientOrderUID integer body required The identifier of the order the payment is linked to
CardTransID integer body required (depricated) Send 0
Amount double body required Amount of the payment
IsValid bool body required Was the payment valid
Response string body required Payment detail response from payment processor

Request

PUT /v1/orders/billing/payments HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

{
  "ClientUID": 0,
  "ClientOrderUID": 0,
  "CardTransUID": 0,
  "Amount": 0,
  "IsValid": true,
  "Response": ""
}

Response

No Response

POST Run Payment

Runs a payment against a client's primary payment method

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
ClientUID integer url segment required The identifier of the client the payment is being applied to
Amount double body required The amount of the payment

Response Properties

Property Type Description Example Values
ClientTranUID unique identifier Identifier of card transaction integer
ClientUID integer Identifier for the client
IsValid bool Was the payment successful
Response string The response received from the payment processor
CardNumber string The masked card number
ExpDate string The masked expire date of the card
Amount double The payment amount processed
DateRan date Date the payment was ran (Pacific Time)

Request

POST /v1/orders/[ClientUID]/billing/paymentmethods/run HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

{
  "Amount": 0
}

Response

{
  "ClientTranUID": 0,
  "ClientUID": 0,
  "IsValid": true,
  "Response": "",
  "CardNumber": "",
  "ExpDate": "",
  "Amount": 0,
  "DateRan": "2020-08-26T15:15:03.509Z"
}

PUT Create Payment Method

Runs a payment against a client's primary payment method

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
ClientUID integer url segment required The identifier of the client
CardNumber string body required Card number field
ExpMonth string body required The month the card expires (2 digits)
ExpYear string body required The year the card expires (4 digits)
Company string body required Company field
FirstName string body required First name field
LastName string body required Last name field
NameOnCard string body required Name shown on the card
BillAddress string body required Billing street address
BillCity string body required Billing city
BillState string body required Billing state
BillZip string body required Billing Zipcode

Request

PUT /v1/orders/[ClientUID]/billing/paymentmethods/add HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

{
  "CardNumber": "",
  "ExpMonth": "",
  "ExpYear": "",
  "Company": "",
  "FirstName": "",
  "LastName": "",
  "NameOnCard": "",
  "BillAddress": "",
  "BillCity": "",
  "BillState": "",
  "BillZip": ""
}

Response

No Response

Distribution Lists

For the following methods, refer to the IDistributionListsService interface when using the .NET SDK.

GET Get Distribution List Assignments for Client

This method returns the details on a distribution list as well as all assignments for the specified client

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
DistributionListUID integer url segment required The identifier of the distribution list
ClientUID integer url segment required The identifier of the client

Response Properties

Property Type Description Example Values
CustomListUID unique identifier Identifier of the distribution list integer
AccountUID integer Identifier for the account
LeadTypeUID integer Identifier for the lead type
LeadFieldUID integer Identifier of the lead field the list is associated with
Description string Name of the distribution list
FieldName string Name of the field
DefaultClient integer The identifier of the client to be used as the default location
ClientName string Name of the default client
Assigned integer Number of items that have assignments
Unassigned integer Number of items that do not have an assignment
Status integer Status of the list Available Values:
1 = Active
0 = Inactive
DependField integer The identifier of a field that the list depends on for a category, this can be something like a country if the lead field is a zip code for example
Value string The value of the dependancy field, for example, if the DependField is Country, the value could be United States to filter this list to only United States zip codes
LinkFieldText string Name of the dependancy field
Items Array<Item> Array of distribution list items
Item.CustomListItemUID integer The identifier of the distribution list item
Item.CustomListUID integer The parent identifier of the distribution list
Item.Description string The description of the item value
Item.Tag1 string The tag 1 field
Item.Tag2 string The tag 2 field
Item.AssignedClient integer The identifier of the client record assigned. Used for single assignments only
Item.AssignedClients string A pipe (|) delimited list of client identifiers that are ssigned to this item
Item.AssignedName string The name of the client assigned

Request

GET /v1/distribution/lists/[ClientUID]/[DistributionListUID] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

{
  "CustomListUID": 0,
  "AccountUID": 0,
  "LeadTypeUID": 0,
  "LeadFieldUID": 0,
  "Description": "",
  "FieldName": "",
  "DefaultClient": 0,
  "ClientName": "",
  "Assigned": 0,
  "Unassigned": 0,
  "Status": 0,
  "DependField": 0,
  "Value": "string",
  "LinkFieldText": "",
  "Items": [
    {
      "CustomListItemUID": 0,
      "CustomListUID": 0,
      "Description": "",
      "Tag1": "string",
      "Tag2": "string",
      "Value": "string",
      "AssignedClient": 0,
      "AssignedClients": "",
      "AssignedName": ""
    }
  ]
}

GET Get Distribution Lists

This method returns an array of all distribution lists

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)

Response Properties

Property Type Description Example Values
CustomListUID unique identifier Identifier of the distribution list integer
AccountUID integer Identifier for the account
LeadTypeUID integer Identifier for the lead type
LeadFieldUID integer Identifier of the lead field the list is associated with
Description string Name of the distribution list
FieldName string Name of the field
DefaultClient integer The identifier of the client to be used as the default location
ClientName string Name of the default client
Assigned integer Number of items that have assignments
Unassigned integer Number of items that do not have an assignment
Status integer Status of the list Available Values:
1 = Active
0 = Inactive
DependField integer The identifier of a field that the list depends on for a category, this can be something like a country if the lead field is a zip code for example
Value string The value of the dependancy field, for example, if the DependField is Country, the value could be United States to filter this list to only United States zip codes
LinkFieldText string Name of the dependancy field
Items Array<Item> Array of distribution list items
Item.CustomListItemUID integer The identifier of the distribution list item
Item.CustomListUID integer The parent identifier of the distribution list
Item.Description string The description of the item value
Item.Tag1 string The tag 1 field
Item.Tag2 string The tag 2 field
Item.AssignedClient integer The identifier of the client record assigned. Used for single assignments only
Item.AssignedClients string A pipe (|) delimited list of client identifiers that are ssigned to this item
Item.AssignedName string The name of the client assigned

Request

GET /v1/distribution/lists/ HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

[
    {
      "CustomListUID": 0,
      "AccountUID": 0,
      "LeadTypeUID": 0,
      "LeadFieldUID": 0,
      "Description": "",
      "FieldName": "",
      "DefaultClient": 0,
      "ClientName": "",
      "Assigned": 0,
      "Unassigned": 0,
      "Status": 0,
      "DependField": 0,
      "Value": "string",
      "LinkFieldText": "",
      "Items": [
        {
          "CustomListItemUID": 0,
          "CustomListUID": 0,
          "Description": "",
          "Tag1": "string",
          "Tag2": "string",
          "Value": "string",
          "AssignedClient": 0,
          "AssignedClients": "",
          "AssignedName": ""
        }
      ]
    },{
      "CustomListUID": 0,
      "AccountUID": 0,
      "LeadTypeUID": 0,
      "LeadFieldUID": 0,
      "Description": "",
      "FieldName": "",
      "DefaultClient": 0,
      "ClientName": "",
      "Assigned": 0,
      "Unassigned": 0,
      "Status": 0,
      "DependField": 0,
      "Value": "string",
      "LinkFieldText": "",
      "Items": [
        {
          "CustomListItemUID": 0,
          "CustomListUID": 0,
          "Description": "",
          "Tag1": "string",
          "Tag2": "string",
          "Value": "string",
          "AssignedClient": 0,
          "AssignedClients": "",
          "AssignedName": ""
        }
      ]
    }
]

DELETE Remove Distribution List Item

This method will remove an item assignment from the distribution list

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
DistributionListUID integer url-segment required Identifier of the distribution list being modified
DistributionItemUID integer url-segment required Identifier of the distribution list item being removed
ClientUID integer url-segment required Identifier of the client assignment to remove

Request

DELETE /v1/distribution/lists/[ClientUID]/[DistributionListUID]/[DistributionItemUID] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

true

PUT Create or Modify List Item

This method allows you to create or modify an existing item

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
DistributionListUID integer url segment required The identifier of the distribution list being modified
CustomListItemUID integer body required The identifier of the distribution list item, send 0 for a new item
CustomListUID integer body required The identifier of the distribution list
Description string body required Description of the list item
Tag1 string body required Tag value
Tag2 string body required Tag value
Value string body required Value of the item
AssignedClient integer body required Identifier of the assigned client, send 0 for multiple assignments
AssignedClients string body required Pipe (|) delimited array of client identifiers
HashCode string body Hash value (not used)

Request

PUT /v1/distribution/lists/[DistributionListUID] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

{
  "CustomListItemUID": 0,
  "CustomListUID": 0,
  "Description": "",
  "Tag1": "",
  "Tag2": "",
  "Value": "",
  "AssignedClient": 0,
  "AssignedClients": "",
  "HashCode": 0
}

Response

true

PATCH Assign List Item to Client

This method allows you to assign a list item to a client

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
DistributionListUID integer url segment required The identifier of the distribution list being modified
DistributionListItemUID integer url segment required The identifier of the distribution list item
ClientUID integer url segment required The identifier of the client being assigned

Request

PUT /v1/distribution/lists/[ClientUID]/[DistributionListUID]/[DistributionListItemUID] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

true

Data Validation

For the following methods, refer to the IDataValidationService interface when using the .NET SDK.

GET Get US State List

Provides a list of US states

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)

Request

GET /v1/data/validation/states HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

[
  {
    "StateUID": 0,
    "Name": "",
    "Abbr": ""
  }
]

GET Get US Zip Codes by State

Provides a list of US zip codes by state

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
State string url segment required State to filter by

Request

GET /v1/data/validation/us/zips/state/[State] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

[
  {
    "USZipUID": 0,
    "ZIP": "",
    "City": "",
    "State": "",
    "FIPS": "",
    "County": "",
    "TimeZone": "",
    "Lat": 0,
    "Long": 0
  }
]

GET Get US Zip Codes by State and County

Provides a list of US zip codes by state and county

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
State string url segment required State to filter by
County string url segment required County to filter by

Request

GET /v1/data/validation/us/zips/state/[State]/[County] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

[
  {
    "USZipUID": 0,
    "ZIP": "",
    "City": "",
    "State": "",
    "FIPS": "",
    "County": "",
    "TimeZone": "",
    "Lat": 0,
    "Long": 0
  }
]

GET Get US Zip Codes by FIPS

Provides a list of US zip codes by FIPS code

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
FIPS string url segment required State to filter by

Request

GET /v1/data/validation/us/zips/fips/[FIPS] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

[
  {
    "USZipUID": 0,
    "ZIP": "",
    "City": "",
    "State": "",
    "FIPS": "",
    "County": "",
    "TimeZone": "",
    "Lat": 0,
    "Long": 0
  }
]

GET Get US Zip Codes by Radius

Provides a list of US zip codes by radius

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
ZipCode string url segment required Center zip code
Radius double url segment required The distance around the center zip code in miles
InState double query required Should zip codes reside in the same state as the center zipcode

Request

GET /v1/data/validation/us/zips/[ZipCode]/radius/[Radius] HTTP/1.1
host: api.leadexec.net
content-type: x-www-form-urlencoded
Authorization: Bearer [access_token]

InState=true

Response

[
  {
    "USZipUID": 0,
    "ZIP": "",
    "City": "",
    "State": "",
    "FIPS": "",
    "County": "",
    "TimeZone": "",
    "Lat": 0,
    "Long": 0
  }
]

Leads

For the following methods, refer to the ILeadsService interface when using the .NET SDK.

PUT Update Lead Cache

This method will schedule a lead to have it's reporting cache refreshed

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LeadUID integer url segment required The identifier of the lead to refresh

Request

PUT /v1/leads/cache/update/[LeadUID] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

No Response

POST Search for Lead by Contact Information

This method will schedule a lead to have it's reporting cache refreshed

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LeadTypeUID integer url segment required The lead type you wish to search in
Email string body The email to search
Address string body The address to search
PrimaryPhone string body The phone to search

Response Properties

Property Type Description Example Values
DateReceived date The date the lead was received
IsValidPost bool Is the lead valid
ResponseType response_type The response type sent to source Available Values:

No_Error
System_ID_Missing
LeadType_ID_Missing
Vendor_ID_Missing
No_Account_Found
Outside_Criteria
Duplicate_Lead
Account_Disabled
Post_Over_Max
Data_Errors
ResponseDetails string Description of the response to the source
LeadIdentifier integer The lead identifier
VID integer The identifier of the lead source
AID integer The identifier of the campaign assigned
LID integer The identifier of the lead type assigned
PandingQCReview bool Is the lead pending QC review
Price double The price assigned to the lead

Request

POST /v1/leads/search/[LeadTypeUID] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

{
  "Email": "",
  "Address": "",
  "PrimaryPhone": ""
}

Response

[
  {
    "DateReceived": "2020-08-26T20:13:41.736Z",
    "IsValidPost": true,
    "ResponseType": "No_Error",
    "ResponseDetails": "",
    "LeadIdentifier": 0,
    "VID": 0,
    "AID": 0,
    "LID": 0,
    "PendingQCReview": true,
    "Price": 0
  },{
    "DateReceived": "2020-08-26T20:13:41.736Z",
    "IsValidPost": true,
    "ResponseType": "No_Error",
    "ResponseDetails": "",
    "LeadIdentifier": 0,
    "VID": 0,
    "AID": 0,
    "LID": 0,
    "PendingQCReview": true,
    "Price": 0
  }
]

GET Lead Analytics Detail

This method will return any analytics details assigned to a lead

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LeadUID integer url segment required The lead to pull

Response Properties

Property Type Description Example Values
TrackingUID integer The identifier of the analytics tracking
VisitUID string The unique identifier for the visit
EnterDate date The date and time the user entered the site (Pacific Time)
ExitDate date The date and time the user exited the site (Pacific Time)
UserAgent string User's browser User Agent
IP string IP address of the user
URL string Primary URL of the website
Host string The host part of the primary URL
EnterPage string The first page the users landed on
ExitPage string The last page the user visited
Referrer string The URL of the referring site
ReferrerHost string The host part of the referring URL
SearchEngine string Search engine name if any
SearchTerm string Search keyword if any
Browser string User's browser
OS string User's Operating System
PageViews integer The number of pages viewed
FirstVisit bool Was this the user's first visit

Request

GET /v1/leads/analytics/[LeadUID] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

{
  "TrackingUID": 0,
  "VisitUID": "",
  "EnterDate": "2020-08-26T20:13:41.743Z",
  "ExitDate": "2020-08-26T20:13:41.743Z",
  "UserAgent": "string",
  "IP": "",
  "URL": "",
  "Host": "",
  "EnterPage": "",
  "ExitPage": "",
  "Referrer": "",
  "ReferrerHost": "",
  "SearchEngine": "",
  "SearchTerm": "",
  "Browser": "",
  "OS": "",
  "PageViews": 0,
  "FirstVisit": true
}

GET Lead Analytics Detail by VisitID

This method will return any analytics details assigned to a visit ID

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
VisitID integer url segment required The visit to pull

Response Properties

Property Type Description Example Values
TrackingUID integer The identifier of the analytics tracking
VisitUID string The unique identifier for the visit
EnterDate date The date and time the user entered the site (Pacific Time)
ExitDate date The date and time the user exited the site (Pacific Time)
UserAgent string User's browser User Agent
IP string IP address of the user
URL string Primary URL of the website
Host string The host part of the primary URL
EnterPage string The first page the users landed on
ExitPage string The last page the user visited
Referrer string The URL of the referring site
ReferrerHost string The host part of the referring URL
SearchEngine string Search engine name if any
SearchTerm string Search keyword if any
Browser string User's browser
OS string User's Operating System
PageViews integer The number of pages viewed
FirstVisit bool Was this the user's first visit

Request

GET /v1/leads/analytics/visits/[VisitID] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

{
  "TrackingUID": 0,
  "VisitUID": "",
  "EnterDate": "2020-08-26T20:13:41.743Z",
  "ExitDate": "2020-08-26T20:13:41.743Z",
  "UserAgent": "string",
  "IP": "",
  "URL": "",
  "Host": "",
  "EnterPage": "",
  "ExitPage": "",
  "Referrer": "",
  "ReferrerHost": "",
  "SearchEngine": "",
  "SearchTerm": "",
  "Browser": "",
  "OS": "",
  "PageViews": 0,
  "FirstVisit": true
}

PUT Upload Attachment

This method allows the ability to upload a file attachment to a lead

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LeadUID integer url segment required The lead to assign the attachment to
FileName string body required File Name with Extension
Description string body required File Description
Base64Data string body required The file data in a Base64 array

Request

PUT /v1/leads/[LeadUID]/attachments HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

{
    "FileName": "",
    "Description": "",
    "Base64Data": ""
}

Response

true

Lead Sources

For the following methods, refer to the ILeadSourcesService interface when using the .NET SDK.

GET Check Lead Source Username

This method checks the supplied username to see if it unique

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
Username string url segment required The username to check

Request

GET /v1/leadsources/usernames/check/[Username] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

true or false

PUT Create or Modify Lead Source

This method allows you to create or modify an existing lead source

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LPVendorUID integer body required The identifier of the lead source being modified, Send 0 for new
Name string body required Name of the lead source
Address string body required Street address of the lead source
Address2 string body required Address 2 field
City string body required City field
State string body required State field
Zip string body required Zip field
Phone string body required Phone field
Fax string body required Fax field
Email string body required Email field
ReturnString string body required (deprecated)
ReturnPostURL string body required (deprecated)
SystemVendor bool body required (deprecated) Send false
Status source_status body required Available Values:

1 = Active
0 = Inactive
2 = OnHold
3 = Suspended
4 = Closed
UserName string body required Lead source username (must be unique)
Password string body required Lead source password
AdminUID integer body required (deprecated)
CherryAccountUID integer body required (deprecated)
AccountUID integer body required Your account identifier
ImageURL string body required Source image URL
DefaultReturnDay integer body required The maximum amount of days a return is accepted

Request

PUT /v1/leadsources HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

{
  "LPVendorUID": 0,
  "Name": "string",
  "Address": "string",
  "Address2": "string",
  "City": "string",
  "State": 0,
  "Zip": "string",
  "Phone": "string",
  "Fax": "string",
  "Email": "string",
  "ReturnString": "string",
  "ReturnPostURL": "string",
  "SystemVendor": true,
  "Status": 0,
  "UserName": "string",
  "Password": "string",
  "AdminUID": 0,
  "CherryAccountUID": 0,
  "AccountUID": 0,
  "ImageURL": "string",
  "DefaultReturnDay": 0
}

Response

123456

GET List Lead Sources

This method allows you to list all lead sources

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)

Response Properties

Parameter Type Description
LPVendorUID integer body required The identifier of the lead source being modified, Send 0 for new
Name string body required Name of the lead source
Address string body required Street address of the lead source
Address2 string body required Address 2 field
City string body required City field
State string body required State field
Zip string body required Zip field
Phone string body required Phone field
Fax string body required Fax field
Email string body required Email field
ReturnString string body required (deprecated)
ReturnPostURL string body required (deprecated)
SystemVendor bool body required (deprecated) Send false
Status source_status body required Available Values:

1 = Active
0 = Inactive
2 = OnHold
3 = Suspended
4 = Closed
UserName string body required Lead source username (must be unique)
Password string body required Lead source password
AdminUID integer body required (deprecated)
CherryAccountUID integer body required (deprecated)
AccountUID integer body required Your account identifier
ImageURL string body required Source image URL
DefaultReturnDay integer body required The maximum amount of days a return is accepted

Request

GET /v1/leadsources HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

[
  {
  "LPVendorUID": 0,
  "Name": "string",
  "Address": "string",
  "Address2": "string",
  "City": "string",
  "State": 0,
  "Zip": "string",
  "Phone": "string",
  "Fax": "string",
  "Email": "string",
  "ReturnString": "string",
  "ReturnPostURL": "string",
  "SystemVendor": true,
  "Status": 0,
  "UserName": "string",
  "Password": "string",
  "AdminUID": 0,
  "CherryAccountUID": 0,
  "AccountUID": 0,
  "ImageURL": "string",
  "DefaultReturnDay": 0
},
{
  "LPVendorUID": 0,
  "Name": "string",
  "Address": "string",
  "Address2": "string",
  "City": "string",
  "State": 0,
  "Zip": "string",
  "Phone": "string",
  "Fax": "string",
  "Email": "string",
  "ReturnString": "string",
  "ReturnPostURL": "string",
  "SystemVendor": true,
  "Status": 0,
  "UserName": "string",
  "Password": "string",
  "AdminUID": 0,
  "CherryAccountUID": 0,
  "AccountUID": 0,
  "ImageURL": "string",
  "DefaultReturnDay": 0
}
]

GET Lead Source Detail

This method allows you to get the details for an individual source

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
vendorUID integer url segment required Identifier of the lead source

Response Properties

Parameter Type Description
LPVendorUID integer body required The identifier of the lead source being modified, Send 0 for new
Name string body required Name of the lead source
Address string body required Street address of the lead source
Address2 string body required Address 2 field
City string body required City field
State string body required State field
Zip string body required Zip field
Phone string body required Phone field
Fax string body required Fax field
Email string body required Email field
ReturnString string body required (deprecated)
ReturnPostURL string body required (deprecated)
SystemVendor bool body required (deprecated) Send false
Status source_status body required Available Values:

1 = Active
0 = Inactive
2 = OnHold
3 = Suspended
4 = Closed
UserName string body required Lead source username (must be unique)
Password string body required Lead source password
AdminUID integer body required (deprecated)
CherryAccountUID integer body required (deprecated)
AccountUID integer body required Your account identifier
ImageURL string body required Source image URL
DefaultReturnDay integer body required The maximum amount of days a return is accepted

Request

GET /v1/leadsources/{vendorUID} HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

{
  "LPVendorUID": 0,
  "Name": "string",
  "Address": "string",
  "Address2": "string",
  "City": "string",
  "State": 0,
  "Zip": "string",
  "Phone": "string",
  "Fax": "string",
  "Email": "string",
  "ReturnString": "string",
  "ReturnPostURL": "string",
  "SystemVendor": true,
  "Status": 0,
  "UserName": "string",
  "Password": "string",
  "AdminUID": 0,
  "CherryAccountUID": 0,
  "AccountUID": 0,
  "ImageURL": "string",
  "DefaultReturnDay": 0
}

GET List Lead Source Campaigns

This method allows you to list all campaigns for a lead source

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
vendorUID integer url segment required Identifier of the lead source

Response Properties

Parameter Type Description
VendorUID integer Identifier of the lead source assigned
VendorAccountUID integer The identifier of the lead source campaign being modified, Send 0 for new
Channel int Channel of the Campaign

Web = 0, PING/POST = 1, Phone = 2, Chat = 3
AccountName string Name of the campaign
LeadTypeUID string Lead type identifier that this campaign will receive
Status campaign_status Status of the campaign, Available Values:

1 = Active 2 = Inactive 3 = Late 4 = OnHold 5 = Suspended 6 = Closed
MonthMax integer Maximum amount of leads that can be sent in for the current month, Set to null for no max
DayMax integer Maximum amount of leads that can be sent in for the current day, Set to null for no max
HourMax integer Maximum amount of leads that can be sent in a 60 minute period, Set to null for no max
Flagged bool (deprecated)
OrderSystem bool (deprecated)
ReturnDayCount integer The maximum amount of days to allow returns
ShowOnCherryPick bool (deprecated)
ClientDataVendor bool (deprecated)
countReturns bool Should returns be counted in lead quantity checks
LeadPrice double Default lead price for campaign
useQCBin bool Should this campaign use the quality control bin
MaxSell integer The maximum amount of times a lead can be sold
DupDayMax integer The amount of days the system should scan for duplicate leads
ExclusiveClientUID integer (deprecated)
LeadCatUID integer The lead category identifier leads should be assigned to
EmailVerify bool (deprecated)
AppendCityStateFromPostalCode bool Should the city and state fields be added based on zip code information
Rules Array<Criteria> Array of campaign criteria
Criteria.VendorRuleUID integer Identifier for the criteria
Criteria.VendorAccountUID integer Identifier for the campaign assigned
Criteria.LeadFieldUID integer Identifier for the lead field
Criteria.Operator criteria_operator Type of check, Available Values:

Equal, NotEqual, Greater, Less, GreaterOrEqual, LessOrEqual, Between, In, NotIn, DateCompare, Distance_Compare, Contains, Doesnt_Contain
Criteria.Value integer Value to check
Criteria.Delete bool Should the criteria item be removed
Validation validation (deprecated)
Validation.PhoneValidation integer (deprecated)
Validation.PhoneAddressValidation integer (deprecated)
Validation.EmailValidation integer (deprecated)
Validation.FullAddressValidation integer (deprecated)
Validation.CityStateZipVerification integer (deprecated)
Validation.DemographicInformation integer (deprecated)
Validation.IPAddressVerification integer (deprecated)
Validation.DNC integer (deprecated)
AllowSendResponse bool Allow this campaign to send back who the lead was delivered to when using the Return Sends lead receiver endpoint.
UseDeliveryQueue bool Queue leads to be processed by the automation system. If false, any deliveries will take place at the time the lead is received, this may delay the response to the source.
RevenueSharePercentage decimal The amount per sale that should be attributed to the cost of the lead.
RevenueShareFlatRate decimal The static amount per sale that should be attributed to the cost of the lead.

Request

GET /v1/leadsources/{vendorUID}/campaigns HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

[
  {
  "Channel": 0,
  "VendorUID": 0,
  "VendorAccountUID": 0,
  "AccountName": "",
  "LeadTypeUID": 0,
  "Status": 0,
  "MonthMax": null,
  "DayMax": null,
  "HourMax": null,
  "Flagged": true,
  "OrderSystem": true,
  "ReturnDayCount": 0,
  "ShowOnCherryPick": true,
  "ClientDataVendor": true,
  "countReturns": true,
  "LeadPrice": 0,
  "useQCBin": true,
  "MaxSell": 0,
  "DupDayMax": 0,
  "ExclusiveClientUID": 0,
  "LeadCatUID": 0,
  "EmailVerify": true,
  "AppendCityStateFromPostalCode": true,
  "Rules": [
    {
      "VendorRuleUID": 0,
      "LeadFieldUID": 0,
      "Operator": "Equal",
      "Value": "",
      "Delete": true
    }
  ],
  "Validation": {
    "PhoneValidation": 0,
    "PhoneAddressValidation": 0,
    "EmailValidation": 0,
    "FullAddressValidation": 0,
    "CityStateZipVerification": 0,
    "DemographicInformation": 0,
    "IPAddressVerification": 0,
    "DNC": 0
  },
  "AllowSendResponse": false,
  "UseDeliveryQueue": true,
  "RevenueSharePercentage": null,
  "RevenueShareFlatRate": null
},
{
  "Channel": 0,
  "VendorUID": 0,
  "VendorAccountUID": 0,
  "AccountName": "",
  "LeadTypeUID": 0,
  "Status": 0,
  "MonthMax": null,
  "DayMax": null,
  "HourMax": null,
  "Flagged": true,
  "OrderSystem": true,
  "ReturnDayCount": 0,
  "ShowOnCherryPick": true,
  "ClientDataVendor": true,
  "countReturns": true,
  "LeadPrice": 0,
  "useQCBin": true,
  "MaxSell": 0,
  "DupDayMax": 0,
  "ExclusiveClientUID": 0,
  "LeadCatUID": 0,
  "EmailVerify": true,
  "AppendCityStateFromPostalCode": true,
  "Rules": [
    {
      "VendorRuleUID": 0,
      "LeadFieldUID": 0,
      "Operator": "Equal",
      "Value": "",
      "Delete": true
    }
  ],
  "Validation": {
    "PhoneValidation": 0,
    "PhoneAddressValidation": 0,
    "EmailValidation": 0,
    "FullAddressValidation": 0,
    "CityStateZipVerification": 0,
    "DemographicInformation": 0,
    "IPAddressVerification": 0,
    "DNC": 0
  },
  "AllowSendResponse": false,
  "UseDeliveryQueue": true,
  "RevenueSharePercentage": null,
  "RevenueShareFlatRate": null
}
]

GET Lead Source Campaign Details

This method allows you to get the details for a lead source campaign

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
vendorUID integer url segment required Identifier of the lead source
campaignUID integer url segment required Identifier of the lead source campaign

Response Properties

Parameter Type Description
VendorUID integer Identifier of the lead source assigned
VendorAccountUID integer The identifier of the lead source campaign being modified, Send 0 for new
Channel int Channel of the Campaign

Web = 0, PING/POST = 1, Phone = 2, Chat = 3
AccountName string Name of the campaign
LeadTypeUID string Lead type identifier that this campaign will receive
Status campaign_status Status of the campaign, Available Values:

1 = Active 2 = Inactive 3 = Late 4 = OnHold 5 = Suspended 6 = Closed
MonthMax integer Maximum amount of leads that can be sent in for the current month, Set to null for no max
DayMax integer Maximum amount of leads that can be sent in for the current day, Set to null for no max
HourMax integer Maximum amount of leads that can be sent in a 60 minute period, Set to null for no max
Flagged bool (deprecated)
OrderSystem bool (deprecated)
ReturnDayCount integer The maximum amount of days to allow returns
ShowOnCherryPick bool (deprecated)
ClientDataVendor bool (deprecated)
countReturns bool Should returns be counted in lead quantity checks
LeadPrice double Default lead price for campaign
useQCBin bool Should this campaign use the quality control bin
MaxSell integer The maximum amount of times a lead can be sold
DupDayMax integer The amount of days the system should scan for duplicate leads
ExclusiveClientUID integer (deprecated)
LeadCatUID integer The lead category identifier leads should be assigned to
EmailVerify bool (deprecated)
AppendCityStateFromPostalCode bool Should the city and state fields be added based on zip code information
Rules Array<Criteria> Array of campaign criteria
Criteria.VendorRuleUID integer Identifier for the criteria
Criteria.VendorAccountUID integer Identifier for the campaign assigned
Criteria.LeadFieldUID integer Identifier for the lead field
Criteria.Operator criteria_operator Type of check, Available Values:

Equal, NotEqual, Greater, Less, GreaterOrEqual, LessOrEqual, Between, In, NotIn, DateCompare, Distance_Compare, Contains, Doesnt_Contain
Criteria.Value integer Value to check
Criteria.Delete bool Should the criteria item be removed
Validation validation (deprecated)
Validation.PhoneValidation integer (deprecated)
Validation.PhoneAddressValidation integer (deprecated)
Validation.EmailValidation integer (deprecated)
Validation.FullAddressValidation integer (deprecated)
Validation.CityStateZipVerification integer (deprecated)
Validation.DemographicInformation integer (deprecated)
Validation.IPAddressVerification integer (deprecated)
Validation.DNC integer (deprecated)
AllowSendResponse bool Allow this campaign to send back who the lead was delivered to when using the Return Sends lead receiver endpoint.
UseDeliveryQueue bool Queue leads to be processed by the automation system. If false, any deliveries will take place at the time the lead is received, this may delay the response to the source.
RevenueSharePercentage decimal The amount per sale that should be attributed to the cost of the lead.
RevenueShareFlatRate decimal The static amount per sale that should be attributed to the cost of the lead.

Request

GET /v1/leadsources/{vendorUID}/campaigns/{campaignUID} HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

{
  "Channel": 0,
  "VendorUID": 0,
  "VendorAccountUID": 0,
  "AccountName": "",
  "LeadTypeUID": 0,
  "Status": 0,
  "MonthMax": null,
  "DayMax": null,
  "HourMax": null,
  "Flagged": true,
  "OrderSystem": true,
  "ReturnDayCount": 0,
  "ShowOnCherryPick": true,
  "ClientDataVendor": true,
  "countReturns": true,
  "LeadPrice": 0,
  "useQCBin": true,
  "MaxSell": 0,
  "DupDayMax": 0,
  "ExclusiveClientUID": 0,
  "LeadCatUID": 0,
  "EmailVerify": true,
  "AppendCityStateFromPostalCode": true,
  "Rules": [
    {
      "VendorRuleUID": 0,
      "LeadFieldUID": 0,
      "Operator": "Equal",
      "Value": "",
      "Delete": true
    }
  ],
  "Validation": {
    "PhoneValidation": 0,
    "PhoneAddressValidation": 0,
    "EmailValidation": 0,
    "FullAddressValidation": 0,
    "CityStateZipVerification": 0,
    "DemographicInformation": 0,
    "IPAddressVerification": 0,
    "DNC": 0
  },
  "AllowSendResponse": false,
  "UseDeliveryQueue": true,
  "RevenueSharePercentage": null,
  "RevenueShareFlatRate": null
}

PUT Create or Modify Lead Source Campaign

This method allows you to create or modify an existing lead source campaign

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
VendorUID integer body required Identifier of the lead source assigned
VendorAccountUID integer body required The identifier of the lead source campaign being modified, Send 0 for new
Channel int body required Channel of the Campaign

Web = 0, PING/POST = 1, Phone = 2, Chat = 3
AccountName string body required Name of the campaign
LeadTypeUID string body required Lead type identifier that this campaign will receive
Status campaign_status body required Status of the campaign, Available Values:

1 = Active 2 = Inactive 3 = Late 4 = OnHold 5 = Suspended 6 = Closed
MonthMax integer body required Maximum amount of leads that can be sent in for the current month, Set to null for no max
DayMax integer body required Maximum amount of leads that can be sent in for the current day, Set to null for no max
HourMax integer body required Maximum amount of leads that can be sent in a 60 minute period, Set to null for no max
Flagged bool body required (deprecated)
OrderSystem bool body required (deprecated)
ReturnDayCount integer body required The maximum amount of days to allow returns
ShowOnCherryPick bool body required (deprecated)
ClientDataVendor bool body required (deprecated)
countReturns bool body required Should returns be counted in lead quantity checks
LeadPrice double body required Default lead price for campaign
useQCBin bool body required Should this campaign use the quality control bin
MaxSell integer body required The maximum amount of times a lead can be sold
DupDayMax integer body required The amount of days the system should scan for duplicate leads
ExclusiveClientUID integer body required (deprecated)
LeadCatUID integer body required The lead category identifier leads should be assigned to
EmailVerify bool body required (deprecated)
AppendCityStateFromPostalCode bool body required Should the city and state fields be added based on zip code information
Rules Array<Criteria> body required Array of campaign criteria
Criteria.VendorRuleUID integer body required Identifier for the criteria
Criteria.VendorAccountUID integer body required Identifier for the campaign assigned
Criteria.LeadFieldUID integer body required Identifier for the lead field
Criteria.Operator criteria_operator body required Type of check, Available Values:

Equal, NotEqual, Greater, Less, GreaterOrEqual, LessOrEqual, Between, In, NotIn, DateCompare, Distance_Compare, Contains, Doesnt_Contain
Criteria.Value integer body required Value to check
Criteria.Delete bool body required Should the criteria item be removed
Validation validation body required (deprecated)
Validation.PhoneValidation integer body required (deprecated)
Validation.PhoneAddressValidation integer body required (deprecated)
Validation.EmailValidation integer body required (deprecated)
Validation.FullAddressValidation integer body required (deprecated)
Validation.CityStateZipVerification integer body required (deprecated)
Validation.DemographicInformation integer body required (deprecated)
Validation.IPAddressVerification integer body required (deprecated)
Validation.DNC integer body required (deprecated)
AllowSendResponse bool body required Allow this campaign to send back who the lead was delivered to when using the Return Sends lead receiver endpoint.
UseDeliveryQueue bool body required Queue leads to be processed by the automation system. If false, any deliveries will take place at the time the lead is received, this may delay the response to the source.
RevenueSharePercentage decimal body optional The amount per sale that should be attributed to the cost of the lead.
RevenueShareFlatRate decimal body optional The static amount per sale that should be attributed to the cost of the lead.

Response Properties

Parameter Type Description
success boolean Result of the operation
message string Description of the result
identifier int The identifier of the object being created or modified

Request

PUT /v1/leadsources/campaigns HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

{
  "Channel": 0,
  "VendorUID": 0,
  "VendorAccountUID": 0,
  "AccountName": "",
  "LeadTypeUID": 0,
  "Status": 0,
  "MonthMax": null,
  "DayMax": null,
  "HourMax": null,
  "Flagged": true,
  "OrderSystem": true,
  "ReturnDayCount": 0,
  "ShowOnCherryPick": true,
  "ClientDataVendor": true,
  "countReturns": true,
  "LeadPrice": 0,
  "useQCBin": true,
  "MaxSell": 0,
  "DupDayMax": 0,
  "ExclusiveClientUID": 0,
  "LeadCatUID": 0,
  "EmailVerify": true,
  "AppendCityStateFromPostalCode": true,
  "Rules": [
    {
      "VendorRuleUID": 0,
      "LeadFieldUID": 0,
      "Operator": "Equal",
      "Value": "",
      "Delete": true
    }
  ],
  "Validation": {
    "PhoneValidation": 0,
    "PhoneAddressValidation": 0,
    "EmailValidation": 0,
    "FullAddressValidation": 0,
    "CityStateZipVerification": 0,
    "DemographicInformation": 0,
    "IPAddressVerification": 0,
    "DNC": 0
  },
  "AllowSendResponse": false,
  "UseDeliveryQueue": true,
  "RevenueSharePercentage": null,
  "RevenueShareFlatRate": null
}

Response

{
  "success": true,
  "message": "Campaign has been updated",
  "identifier": 0
}

PUT Update Category Assignment of a Campaign

This method allows you to update the lead category assignment of the specified campaign.

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LeadSourceUID integer body required The identifier of the lead source the campaign is assigned to.
CampaignUID integer body required The identifier of the campaign to update the assignment.
CategoryUID integer body required The identifier of the category to assign to. Send 0 to remove category assignment.

Request

PUT /v1/leadsources/[LeadSourceUID]/campaigns/[CampaignUID]/category HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

{
  "CategoryUID": 0
}

Response

true | false

Lead Types

For the following methods, refer to the ILeadTypesService interface when using the .NET SDK.

GET Lead Type Properties

This method will return the properties of a lead type

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LeadTypeUID integer url segment required The lead type identifier

Response Properties

Property Type Description Example Values
LeadTypeUID integer The identifier of the lead type
AccountUID string Your account identifier
InQC bool Is the lead type in quality review
Descriptor string Name of the lead type
Status bool Is the lead type enabled
DefaultDupSets string Duplicate sets
TypeUID integer Industry type

Request

GET /v1/leadtypes/[LeadTypeUID] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

{
  "LeadTypeUID": 0,
  "AccountUID": 0,
  "InQC": 0,
  "Descriptor": "",
  "Status": true,
  "DefaultDupSets": "",
  "TypeUID": 0
}

GET Lead Type For Lead

This method will return the properties of a lead type for a given lead UID

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LeadUID integer url segment required The lead identifier

Response Properties

Property Type Description Example Values
LeadTypeUID integer The identifier of the lead type
AccountUID string Your account identifier
InQC bool Is the lead type in quality review
Descriptor string Name of the lead type
Status bool Is the lead type enabled
DefaultDupSets string Duplicate sets
TypeUID integer Industry type

Request

GET /v1/leadtypes/locate/[LeadUID] HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

{
  "LeadTypeUID": 0,
  "AccountUID": 0,
  "InQC": 0,
  "Descriptor": "",
  "Status": true,
  "DefaultDupSets": "",
  "TypeUID": 0
}

GET Lead Type List

This method returns a list of all lead types

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)

Response Properties

Property Type Description Example Values
LeadTypeUID integer The identifier of the lead type
AccountUID string Your account identifier
InQC bool Is the lead type in quality review
Descriptor string Name of the lead type
Status bool Is the lead type enabled
DefaultDupSets string Duplicate sets
TypeUID integer Industry type

Request

GET /v1/leadtypes HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

[
  {
    "LeadTypeUID": 0,
    "AccountUID": 0,
    "InQC": 0,
    "Descriptor": "string",
    "Status": true,
    "DefaultDupSets": "string",
    "TypeUID": 0
  },{
    "LeadTypeUID": 0,
    "AccountUID": 0,
    "InQC": 0,
    "Descriptor": "string",
    "Status": true,
    "DefaultDupSets": "string",
    "TypeUID": 0
  }
]

GET Fields for Lead Type

This method returns a list of all lead fields within a given lead type

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LeadTypeUID integer url segment required Identifier of the lead type to pull

Response Properties

Property Type Description Example Values
LeadFieldUID integer The identifier of the lead field
LeadTypeUID string The identifier of the lead type assigned
Descriptor string Name of the field
FieldDataType data_type The data type of the field Available Values:

No_DataType
Int
Bigint
Bit
Money
Decimal
Float
DateTime
Varchar
Required bool Is a valid required
Status bool Is the field enabled
Computed bool Is the value of the field computed from other fields
ComputedExpr string The expression used to compute the value of the field
Enumerated bool Does the field have a list of possible enumerations
Validation string Regular expression used to validate the field's value
InvalidChars string Regular expression used to remove invalid characters
FmtError string The text to display when a format error is found
FormatString string The default format of the field's value throughout the system
ColSpan integer The amount of display columns this field spans in detail screens
Width integer The width of the field on detail screens
Height integer The height of the field on detail screens
SpecialBit system_field_bit The type of field the system will use this field as Available Values:

No_SpecialBit
FirstName
LastName
Email
PrimaryPhone
Address
City
State
Zip
MobilePhone
IPAddress
DirectTrackAffiliateID
DirectTrackCampaignID
ClientSendNotes
IndexDate
Address2
SubSource
ForceID
SubSourceCategory
SubCategory
StandardAddress
StandardCity
StandardState
StandardZip
Comments
Country
MobileCheck
ContactConsent
OrigFirstName
OrigLastName
OrigAddress
OrigCity
OrigState
OrigPostalCode
OrigCountry
OrigPhoneNumber
IPLat
IPLong
OrigIP
ConsentText
Status
LastAction
CurrentWorkflow
DateClosed
PipelineOneTimeFees
PipelineRecurringFees
FieldEnums Array<FieldEnum> Array containing allow enumerations
FieldEnum.LeadFieldEnumUID integer Identifier for the lead field enum
FieldEnum.LeadFieldUID integer Identifier for the lead field assigned
FieldEnum.Descriptor integer Value
FieldEnum.Priority integer Display priority in lists
FieldEnum.Delete bool Should this enumeration be removed

Request

GET /v1/leadtypes/[LeadTypeUID]/fields HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

[
  {
    "LeadFieldUID": 0,
    "LeadTypeUID": 0,
    "Descriptor": "",
    "FieldDataType": "No_DataType",
    "Required": true,
    "Status": true,
    "Computed": true,
    "ComputedExpr": "",
    "Enumerated": true,
    "Validation": "",
    "InvalidChars": "",
    "FmtError": "",
    "FormatString": "",
    "isState": true,
    "FieldDescription": "",
    "ColSpan": 0,
    "Width": 0,
    "Height": 0,
    "SpecialBit": "No_SpecialBit",
    "FieldEnums": [
      {
        "LeadFieldEnumUID": 0,
        "LeadFieldUID": 0,
        "Descriptor": "",
        "Priority": 0,
        "Delete": true
      }
    ]
  },{
    "LeadFieldUID": 0,
    "LeadTypeUID": 0,
    "Descriptor": "",
    "FieldDataType": "No_DataType",
    "Required": true,
    "Status": true,
    "Computed": true,
    "ComputedExpr": "",
    "Enumerated": true,
    "Validation": "",
    "InvalidChars": "",
    "FmtError": "",
    "FormatString": "",
    "isState": true,
    "FieldDescription": "",
    "ColSpan": 0,
    "Width": 0,
    "Height": 0,
    "SpecialBit": "No_SpecialBit",
    "FieldEnums": [
      {
        "LeadFieldEnumUID": 0,
        "LeadFieldUID": 0,
        "Descriptor": "",
        "Priority": 0,
        "Delete": true
      }
    ]
  }
]

GET Lead Categories

This method will return any lead categories assigned to the lead type

Request Parameters

Parameter Type Position Required Description
access_token string header required Authentication token (See Authentication)
LeadTypeUID integer url segment required The lead type identifier

Response Properties

Property Type Description Example Values
LeadCatUID integer The identifier of the category
Caption string The display name of the category

Request

GET /v1/leadtypes/[LeadTypeUID]/categories HTTP/1.1
host: api.leadexec.net
content-type: application/json
Authorization: Bearer [access_token]

Response

{
  "LeadCategories": [
    {
      "LeadCatUID": 0,
      "Caption": "string"
    },
    {
      "LeadCatUID": 0,
      "Caption": "string"
    }
  ]
}

.NET SDK


Getting started with the LeadExec API .NET SDK

To get started with the .NET SDK, download the latest version from nuget.org.

Install-Package LeadExec.API.Sdk

Once installed, you must create an ApiClient that will be used to interact between your project and LeadExec's API.

var apiClient = LeadExec.API.Sdk.Factories.ApiClientFactory.GenerateApiClient("[ACCOUNT_API_KEY]");

Using the ServiceFactory you can create service instances for each aspect of the API. For example, to create a IClientsService use the following.

var clientService = LeadExec.API.Sdk.Factories.ServiceFactory.InitializeService<IClientsService>(apiClient);

Each section of the API has a corresponding service interface.

IClientsService
IDeliveryService
IDeliveryAccountsService
IDeliveryMethodsService
IOrdersService
IDistributionListsService
IDataValidationService
ILeadsService
ILeadSourcesService
ILeadTypesService

The following are some code examples on how to use the SDK.


Code Examples

All code examples use the LeadExec API .NET SDK, please visit the .NET SDK Nuget page for more information.


Create Client, Delivery Account, and Delivery Method

using LeadExec.API.Sdk.Clients;
using LeadExec.API.Sdk.Clients.Enumerations;
using LeadExec.API.Sdk.Clients.Models;
using LeadExec.API.Sdk.DeliveryAccounts;
using LeadExec.API.Sdk.DeliveryAccounts.Models;
using LeadExec.API.Sdk.DeliveryMethods;
using LeadExec.API.Sdk.Factories;
using LeadExec.API.Sdk.Providers;

namespace LeadExec.API.Sdk.Examples
{
    public class LeadExecClients
    {
        private readonly IClientsService _clientService;
        private readonly IDeliveryMethodsService _deliveryMethodsService;
        private readonly IDeliveryAccountsService _deliveryAccountsService;

        public LeadExecClients(string apiKey)
        {
            var apiClient = ApiClientFactory.GenerateApiClient(apiKey);
            _clientService = ServiceFactory.InitializeService<IClientsService>(apiClient);
            _deliveryMethodService = ServiceFactory.InitializeService<IDeliveryMethodsService>(apiClient);
            _deliveryAccountsService = ServiceFactory.InitializeService<IDeliveryAccountsService>(apiClient);
        }

        public async Task GenerateNewClientAsync()
        {
            var clientUID = await CreateClientAsync();
            var clientDeliveryMethodUID = await CreateDeliveryMethodAsync(clientUID);
            var deliveryAccountUID = await CreateDeliveryAccountAsync(clientUID, clientDeliveryMethodUID);
        }

        private async Task<long> CreateClientAsync()
        {
            //Make a call to create or modify a client
            var clientUID = await _clientService.CreateOrModifyClientAsync(new CreateModifyClientRequest
            {
                Info = new ClientInfo
                {
                    //For a new client, use Identifier.New. This will set the required value
                    //to create a new client. If existing, provide the identifier of the existing client
                    ClientUID = Identifier.New,
                    //DateAdded should be expressed in Pacific Time.
                    DateAdded = DateTime.Now,
                    Notes = "Test Company",
                    OverrideReassign = true,
                    Password = "test12345",
                    Status = Clients.Enumerations.ClientStatus.New,
                    TimeOffset = -8,
                    TimeZoneName = "Pacific Standard Time",
                    Username = "SdkTestClient"
                },
                FieldData = new List<FieldValue> {
                    new FieldValue {
                        ClientFieldUID = ClientFieldNames.Company.GetValue(),
                        Value = "Example Company"
                    },
                    new FieldValue {
                        ClientFieldUID = ClientFieldNames.FirstName.GetValue(),
                        Value = "John"
                    },
                    new FieldValue {
                        ClientFieldUID = ClientFieldNames.LastName.GetValue(),
                        Value = "Doe"
                    }
                }
            });

            return clientUID;
        }

        private async Task<long> CreateDeliveryMethodAsync(long clientUID)
        {
            var deliveryMethodUID = await deliveryMethodService.CreateOrModifyAsync(new DeliveryMethods.Models.DeliveryMethod
            {
                ClientDeliveryUID = Identifier.New,
                ClientUID = clientUID,
                DeliveryDays = new List<DeliveryMethods.Models.Days>(),
                DateAdded = DateTime.Now,
                inTesting = false,
                LeadTypeUID = 1234,
                Name = "Sdk Delivery Method",
                Status = true,
                Type = DeliveryAccounts.Enumerations.DeliveryTypes.Internal
            });

            return deliveryMethodUID;
        }

        private async Task<long> CreateDeliveryAccountAsync(long clientUID, long clientDeliveryMethodUID)
        {
            var deliveryAccountUID = await deliveryAccountService.CreateOrModifyDeliveryAccountAsync(new DeliveryAccount
            {
                AccountType = DeliveryAccounts.Enumerations.DeliveryAccountType.General,
                AutomationEnabled = true,
                Status = DeliveryAccounts.Enumerations.DeliveryAccountStatus.Open,
                ClientAccountUID = Identifier.New,
                ClientUID = clientUID,
                Criteria = new List<ClientAccountCriteriaType>(),
                DayMax = QuantityMax.NoMax,
                DeliveryDelay = 0,
                DeliveryUID = clientDeliveryMethodUID,
                HourMax = QuantityMax.NoMax,
                MonthMax = QuantityMax.NoMax,
                Description = "Sdk Delivery Account",
                Price = 10.0,
                useOrder = false
            });

            return deliveryAccountUID;
        }
    }
}