GET /api/v1/traffic_sources
List Traffic Source records.

Supported Formats

json, csv

Examples

curl -H "Authorization: Basic BASE64_ENCODED_PUBLIC_KEY_AND_PRIVATE_KEY" "https://[your-subdomain].trackdrive.com/api/v1/traffic_sources?page=1&order=created_at"

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 String

created_at_from
Optional

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

  • Must be 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 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
  • Must be String


POST /api/v1/traffic_sources
Create Traffic Source.

Supported Formats

json

Examples

curl -H "Authorization: Basic BASE64_ENCODED_PUBLIC_KEY_AND_PRIVATE_KEY" -H "Content-Type: application/json" -X POST -d '{"user_traffic_source_id":"xyz","first_name":"name", "generate_team":"true", team_users_emails: ["john-smith@gmail.com"], team_offer_ids: [58923]}' https://[your-subdomain].trackdrive.com/api/v1/traffic_sources

Params

Param name
Description
user_traffic_source_id
Optional

Your external ID assigned to this traffic source.

  • Must be String

first_name
Optional

First Name

  • Must be String

last_name
Optional

First Name

  • Must be String

company_name
Optional

Company Name

  • Must be String

number_limit
Optional

Number Limit

  • Must be a decimal number.

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 recieve 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 /api/v1/traffic_sources/:id
Get Traffic Source by id.

Supported Formats

json

PUT /api/v1/traffic_sources/:id
Update Traffic Source by id.

Supported Formats

json

Examples

curl -H "Authorization: Basic BASE64_ENCODED_PUBLIC_KEY_AND_PRIVATE_KEY" -H "Content-Type: application/json" -X PUT -d '{"user_traffic_source_id":"new_user_ts_id","first_name":"new name"}' https://[your-subdomain].trackdrive.com/api/v1/traffic_sources/:id

Params

Param name
Description
user_traffic_source_id
Optional

Your external ID assigned to this traffic source.

  • Must be String

first_name
Optional

First Name

  • Must be String

last_name
Optional

First Name

  • Must be String

company_name
Optional

Company Name

  • Must be String

number_limit
Optional

Number Limit

  • Must be a decimal number.

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 recieve 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


DELETE /api/v1/traffic_sources/:id
Destroy Traffic Source by id.

Supported Formats

json

Examples

curl -H "Authorization: Basic BASE64_ENCODED_PUBLIC_KEY_AND_PRIVATE_KEY" -H "Content-Type: application/json" -X DELETE https://[your-subdomain].trackdrive.com/api/v1/traffic_sources/:id