PUT /api/v1/leads/:caller_id/caller_opt_out
Mark a single lead as opt-out. Opted-out leads will no longer be sent SMS, Calls, or Emails.

Supported Formats

json

Examples

curl -X PUT -d '' trackdrive.net/api/v1/leads/17193132645/caller_opt_out?lead_token=yourtoken

# GET requests are supported
curl trackdrive.net/api/v1/leads/17193132645/caller_opt_out?lead_token=yourtoken

Params

Param name
Description
lead_token
Required

The lead token is set to either the offer_lead_token you get at trackdrive.net/offers or a schedule_lead_token you get from trackdrive.net/schedules. The only difference is the use of offer_lead_token will just send data to the offer which is picked up when a call is made with the caller_id of the lead. EG: If a Call Center is transferring data before they send you a call. The schedule_lead_token will start the actions associated with the schedule.

  • Must be String


POST /api/v1/leads/:caller_id/caller_remove
Remove a single lead from a Schedule or Offer. This will prevent ANY additional actions being taken on behalf of the lead.

Supported Formats

json

Examples

curl -X POST trackdrive.net/api/v1/leads/17193132645/caller_remove?lead_token=yourtoken
curl -X DELETE trackdrive.net/api/v1/leads/17193132645/caller_remove?lead_token=yourtoken

# GET requests are supported
curl trackdrive.net/api/v1/leads/17193132645/caller_remove?lead_token=yourtoken

Params

Param name
Description
lead_token
Required

The lead token is set to either the offer_lead_token you get at trackdrive.net/offers or a schedule_lead_token you get from trackdrive.net/schedules. The only difference is the use of offer_lead_token will just send data to the offer which is picked up when a call is made with the caller_id of the lead. EG: If a Call Center is transferring data before they send you a call. The schedule_lead_token will start the actions associated with the schedule.

  • Must be String


GET /api/v1/leads
List Lead records.

Supported Formats

json

Params

Param name
Description
auth_token
Optional

Authorize requests using your token. Get it from your profile: trackdrive.net/profile/edit

  • Must be String

serializer
Optional Blank Value Allowed

This endpoint supports multiple response formats. Pass serializer=name to retrieve data in an alternate format.

  • Must be a value contained in the pick list:
    Acceptable ValueDescription
    leadLead
    lead_gridLead Grid
page
Optional

Return the next page of results.

  • Must be a number.

per_page
Optional

How many results to return per page. The default is 25.

  • Must be a number.

created_at_to
Optional

Date formatted like 2016-01-01 12:25:15 -0500

  • Must be String

created_at_from
Optional

Date formatted like 2016-01-01 12:25:15 -0500

  • Must be String

fulltext
Optional

Search for any record that matches this text

  • Must be String

time_zone
Optional

Date ranges will be parsed using this time zone.

columns
Optional
Specify the columns you would like returned by the API for a given resource. Limiting the columns can significantly increase API response time since only the requested data will be processed. columns=uuid,number,created_at

Must be any combination of:

  • id
  • type
  • created_at
  • updated_at
  • user_updated_at
  • routes_show_path
  • routes_edit_path
  • context_menu_name
  • name
  • caller_id
  • email
  • full_name
  • contact_field_type
  • expires_in
  • country
  • state_province
  • zip_postal_code
  • time_zone
  • sub_id
  • offer_id
  • schedule_id
  • status
  • human_status
  • css_status
  • has_next_action
  • opt_out
  • revenue
  • payout
  • offer_converted
  • buyer_converted
  • traffic_source_id
  • buyer_id
  • lead_import_id
  • remote_ip
  • attempted_call_id
  • connected_call_id
  • scheduled_callback_id
  • call_buyer_conversion_id
  • call_offer_conversion_id
  • sms_number_id
  • dial_number_id
  • dial_tier
  • last_action_at
  • first_action_at
  • first_queued_at
  • schedule_ended_at
  • next_action_at
  • last_call_at
  • is_live
  • schedule_trigger_type
  • blocked
  • data
  • worker_processed_at
  • Must be String

root
Optional

Pass root=false to return results without a root node and metadata.
For example:
GET /api/v1/calls?root=false will return [call1, call2, call3]
While:
GET /api/v1/calls will return {calls: [call1, call2, call3], metadata: {}}

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

created_at_label
Optional Blank Value Allowed

Dynamic Date String such as “Today” or “This Year”

  • Must be one of: Last 5 Min, Last 15 Min, Last 30 Min, Last Hour, Last 4 Hours, Last 6 Hours, Last 12 Hours, Last Day, Last 2 Days, Today, Yesterday, This Week, Last Week, This Month, Last Month, This Quarter, Last Quarter, Last 6 Months, This Year, Last Year, Custom Range.

next_action_at_to
Optional

Date formatted like 2016-01-01 12:25:15 -0500

  • Must be String

next_action_at_from
Optional

Date formatted like 2016-01-01 12:25:15 -0500

  • Must be String

offer_id
Optional

Refer to the offer api for details

schedule_id
Optional

Schedule internal id.

contact_id
Optional

Match calls that were placed by this caller.

traffic_source_id
Optional

Refer to the traffic source api for details

buyer_id
Optional

Refer to the buyer api for details

status
Optional

Match results that have this status.

  • Must be String

status_wait
Optional

Filter for leads that are waiting before performing an action.

  • Must be String

number
Optional

Number

  • Must be String

email
Optional

Email

  • Must be String

has_next_action
Optional

Has Next Action

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

buyer_converted
Optional

Buyer Converted

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

offer_converted
Optional

Offer Converted

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

either_converted
Optional

Either Converted

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

opt_out
Optional

Opt Out

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off


GET /api/v1/leads/:id
Get Lead by id.

Supported Formats

json

Params

Param name
Description
auth_token
Optional

Authorize requests using your token. Get it from your profile: trackdrive.net/profile/edit

  • Must be String


PUT /api/v1/leads/:id
Update Lead by id.

Supported Formats

json

Examples

curl -X PUT "https://trackdrive.net/api/v1/leads/17193132645?opt_out=true"

# Update leads with application/json:
curl -H "Content-Type: application/json" -X PUT -d '{"opt_out":true}' "https://trackdrive.net/api/v1/leads/17193132645"

Params

Param name
Description
auth_token
Optional

Authorize requests using your token. Get it from your profile: trackdrive.net/profile/edit

  • Must be String

contact_field_type
Optional Blank Value Allowed

Pass an ID belonging to an Agent Script & Field Type to select that Custom Contact Field Type for this call.

  • Must be String

caller_id
Optional Blank Value Allowed

The callerID for the lead. This is the number Trackdrive will dial when making outbound calls to the lead. This is also the number where Trackdrive will send SMS.

  • Must be String

blocked
Optional Blank Value Allowed

Set this to true in order to prevent this lead from calling any of your telephone numbers. This will also prevent all outbound actions from Trackdrive.

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

opt_out
Optional Blank Value Allowed

Opt Out

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

email
Optional Blank Value Allowed

Email

  • Must be String

traffic_source_id
Optional Blank Value Allowed

Traffic Source

next_action_at
Optional Blank Value Allowed

Next Action At

  • Must be a valid time: 2020-05-30 15:06:49 +0000

schedule_start
Optional Blank Value Allowed

translation missing: en.api.leads.schedule_start

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

schedule_stop
Optional Blank Value Allowed

Removes the lead from the Schedule. No further actions will be taken.

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

apply_to
Optional Blank Value Allowed

Should the data you're sending also be applied to calls associated with this lead?

  • Must be one of: calls, self.

data
Optional Blank Value Allowed

Trackdrive will convert this hash of JSON data into tokens. Inbound and Outbound calls made and received from this Lead will automatically inherit these tokens. {interest: 'kittens', source: 'google', first_name: 'John', last_name: 'Smith'} Emails and SMS also have access to these tokens, so it's possible to send email and SMS messages that substitute tokens with values, such as {{first_name}}. Example SMS: “Hello {{first_name}} {{last_name}}, thanks for you inquiry. We will be calling you in 30 seconds from {{trackdrive_number}}”

  • Must be Hash


DELETE /api/v1/leads/:id/id
Destory a lead by it's internal id.

Supported Formats

json

Params

Param name
Description
auth_token
Optional

Authorize requests using your token. Get it from your profile: trackdrive.net/profile/edit

  • Must be String


GET /api/v1/leads/reports
Get statistics on leads by category.

Supported Formats

json, csv

Examples

wget "https://[your-subdomain].trackdrive.net/api/v1/leads/reports?category=buyer_id&auth_token=[your-auth-token]"

Params

Param name
Description
category
Optional Blank Value Allowed

translation missing: en.api.leads.category

  • Must be a value contained in the pick list:
    Acceptable ValueDescription
    statusStatus
    offer_idOffer
    schedule_idSchedule
    schedule_action_idSchedule Action
    buyer_converted_schedule_action_idThe schedule action where the lead converted.
    lead_import_idLead Import
    traffic_source_idTraffic Source
    recent_call_disposition_idRecent Call Disposition
    buyer_converted_daysBuyer Converted Days
    buyer_idBuyer
    countryCountry
    stateState
    sub_idSub ID
    dial_tierDial Tier
    contact_field_typeContact Field Type
    created_at_dayThe day the lead was submitted
    created_at_monthThe month the lead was submitted
    created_at_weekThe week the lead was submitted
    created_at_five_minutesThe minute the lead was submitted
    schedule_trigger_typeSchedule Trigger Type
    zip_postal_codeZip/Postal Code
    countryCountry
    state_provinceState/Province
page
Optional

Return the next page of results.

  • Must be a number.

per_page
Optional

How many results to return per page. The default is 25.

  • Must be a number.

created_at_to
Optional

Date formatted like 2016-01-01 12:25:15 -0500

  • Must be String

created_at_from
Optional

Date formatted like 2016-01-01 12:25:15 -0500

  • Must be String

fulltext
Optional

Search for any record that matches this text

  • Must be String

time_zone
Optional

Date ranges will be parsed using this time zone.

columns
Optional
Specify the columns you would like returned by the API for a given resource. Limiting the columns can significantly increase API response time since only the requested data will be processed. columns=uuid,number,created_at

Must be any combination of:

  • id
  • type
  • created_at
  • updated_at
  • user_updated_at
  • routes_show_path
  • routes_edit_path
  • context_menu_name
  • name
  • caller_id
  • email
  • full_name
  • contact_field_type
  • expires_in
  • country
  • state_province
  • zip_postal_code
  • time_zone
  • sub_id
  • offer_id
  • schedule_id
  • status
  • human_status
  • css_status
  • has_next_action
  • opt_out
  • revenue
  • payout
  • offer_converted
  • buyer_converted
  • traffic_source_id
  • buyer_id
  • lead_import_id
  • remote_ip
  • attempted_call_id
  • connected_call_id
  • scheduled_callback_id
  • call_buyer_conversion_id
  • call_offer_conversion_id
  • sms_number_id
  • dial_number_id
  • dial_tier
  • last_action_at
  • first_action_at
  • first_queued_at
  • schedule_ended_at
  • next_action_at
  • last_call_at
  • is_live
  • schedule_trigger_type
  • blocked
  • data
  • worker_processed_at
  • Must be String

root
Optional

Pass root=false to return results without a root node and metadata.
For example:
GET /api/v1/calls?root=false will return [call1, call2, call3]
While:
GET /api/v1/calls will return {calls: [call1, call2, call3], metadata: {}}

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off