Traffic Sources

The traffic sources in your account.

GET /traffic_sources

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/traffic_sources

Get traffic sources matching filters.

Search and list the traffic sources (publishers) in your account with filters, or request the CSV format for bulk export.

Supported Formats

json, csv

Params

Param name Description
page
Optional

Return the next page of results.

  • Must be a number.

created_at_to
Optional

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

  • Must be a String

created_at_from
Optional

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

  • Must be a String

order
Optional

Sort results by this field.

  • Must be one of: created_at, updated_at, first_name, last_name, company_name, numbers_count, recent_calls_count, last_call_at, calls_count, user_traffic_source_id, number_limit.

order_dir
Optional

Sort results in ascending or descending order.

  • Must be one of: asc, desc.

fulltext
Optional

Search for any record that matches this text

  • Must be a String

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
  • legacy_id
  • type
  • uuid
  • created_at
  • updated_at
  • deleted_at
  • user_updated_at
  • routes_show_path
  • routes_edit_path
  • external_record_id
  • user_traffic_source_id
  • first_name
  • last_name
  • company_name
  • company_id
  • name
  • number_limit
  • paused
  • description
  • last_call_at
  • numbers_count
  • calls_count
  • recent_calls_count
  • number_ids
  • template_description
  • template_enabled
  • template_tier
  • template_copy_on_company_create
  • outgoing_webhook_ids
  • team_ids
  • record_token_additional_id
  • record_token_additional_data_count
  • record_token_additional_data
  • Must be a String

GET /traffic_sources/new

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/traffic_sources/new

Build Traffic Source with defaults.

Return a blank traffic source populated with default attribute values, useful for building a create form.

POST /traffic_sources

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/traffic_sources

Create Traffic Source.

Create a traffic source. You must supply a first name, last name, or company name; at least one is required to identify the traffic source.

Params

Param name Description
user_traffic_source_id
Optional

Your own unique identifier for the Traffic Source, also known as an AFID.

  • Must be a String

first_name
Optional

The first name for the Traffic Source’s contact.

  • Must be a String

last_name
Optional

The last name for the Traffic Source’s contact.

  • Must be a String

company_name
Optional

The company name for the Traffic Source’s contact.

  • Must be a String

description
Optional Blank value allowed

A free-text note about this Traffic Source, stored alongside it and returned in the API response.

  • Must be a String

number_limit
Optional

How many numbers can team members purchase for this Traffic Source?

  • Must be a decimal number.

record_token_additional_list
Optional Blank value allowed

Assign additional tokens that will be applied to leads and calls by passing a comma separated string of key:value pairs.

  • Must be a valid list of tokens. Example tokens:
    buyer_interest:loan,another_token:value
grant_team_offer_id
Optional Blank value allowed

Give this Traffic Source access to this Offer.

revoke_team_offer_id
Optional Blank value allowed

Remove access to this Offer for this Traffic Source.

generate_team
Optional

Grant access to this Traffic Source, and calls that it publishes.

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

team_users_emails
Optional Blank value allowed

The selected users will receive an email invitation to collaborate on your company.

  • Must be an array of emails. EG: ["john-smith@gmail.com", "example@domain.com"]

team_offer_ids
Optional Blank value allowed

Team members will be able to buy numbers for these offers, and view calls published to them by their Traffic Source.

  • Must be a valid array of integers. Each integer ID must be a valid foreign key reference to an Offer. Refer to: /api/docs/1.0/offers

GET /traffic_sources/:id

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/traffic_sources/:id

Get Traffic Source by id.

Get the details of a single traffic source by id.

PUT /traffic_sources/:id

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/traffic_sources/:id

Update Traffic Source by id.

Update a traffic source, including its name, number limit, or team access settings.

Params

Param name Description
user_traffic_source_id
Optional

Your own unique identifier for the Traffic Source, also known as an AFID.

  • Must be a String

first_name
Optional

The first name for the Traffic Source’s contact.

  • Must be a String

last_name
Optional

The last name for the Traffic Source’s contact.

  • Must be a String

company_name
Optional

The company name for the Traffic Source’s contact.

  • Must be a String

description
Optional Blank value allowed

A free-text note about this Traffic Source, stored alongside it and returned in the API response.

  • Must be a String

number_limit
Optional

How many numbers can team members purchase for this Traffic Source?

  • Must be a decimal number.

record_token_additional_list
Optional Blank value allowed

Assign additional tokens that will be applied to leads and calls by passing a comma separated string of key:value pairs.

  • Must be a valid list of tokens. Example tokens:
    buyer_interest:loan,another_token:value
grant_team_offer_id
Optional Blank value allowed

Give this Traffic Source access to this Offer.

revoke_team_offer_id
Optional Blank value allowed

Remove access to this Offer for this Traffic Source.

generate_team
Optional

Grant access to this Traffic Source, and calls that it publishes.

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

team_users_emails
Optional Blank value allowed

The selected users will receive an email invitation to collaborate on your company.

  • Must be an array of emails. EG: ["john-smith@gmail.com", "example@domain.com"]

team_offer_ids
Optional Blank value allowed

Team members will be able to buy numbers for these offers, and view calls published to them by their Traffic Source.

  • Must be a valid array of integers. Each integer ID must be a valid foreign key reference to an Offer. Refer to: /api/docs/1.0/offers

paused
Optional

Pause or unpause.

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

DELETE /traffic_sources/:id

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/traffic_sources/:id

Destroy Traffic Source by id.

Permanently delete a traffic source.