GET /api/v1/traffic_sources
Get traffic sources matching filters.

Supported Formats

json, csv

Examples

wget "https://[your-subdomain].trackdrive.net/api/v1/traffic_sources?page=1&order=created_at&auth_token=[your-auth-token]"

Params

Param name
Description
auth_token
optional

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

  • Must be String

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.

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
  • created_at
  • updated_at
  • user_updated_at
  • user_traffic_source_id
  • first_name
  • last_name
  • company_name
  • Must be String


POST /api/v1/traffic_sources
Create a new Traffic Source.

Supported Formats

json

Examples

curl -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.net/api/v1/traffic_sources?auth_token=[your-auth-token]

Params

Param name
Description
auth_token
optional

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

  • Must be String

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

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

  • Must be a decimal number.

grant_team_offer_id
optional

Give this Traffic Source access to this Offer.

  • Must be a decimal number.

revoke_team_offer_id
optional

Remove access to this Offer for this Traffic Source.

  • Must be a decimal number.

generate_team
optional

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

  • Must be a boolean value: true, false, 0, 1

team_users_emails
optional

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

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

team_offer_ids
optional

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

  • Must be an array of decimal values: [0, 1, 2, 3]


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

Supported Formats

json

Examples

curl -H "Content-Type: application/json" -X PUT -d '{"user_traffic_source_id":"new_user_ts_id","first_name":"new name"}' https://[your-subdomain].trackdrive.net/api/v1/traffic_sources/:id?auth_token=[your-auth-token]

Params

Param name
Description
auth_token
optional

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

  • Must be String

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

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

  • Must be a decimal number.

grant_team_offer_id
optional

Give this Traffic Source access to this Offer.

  • Must be a decimal number.

revoke_team_offer_id
optional

Remove access to this Offer for this Traffic Source.

  • Must be a decimal number.

generate_team
optional

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

  • Must be a boolean value: true, false, 0, 1

team_users_emails
optional

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

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

team_offer_ids
optional

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

  • Must be an array of decimal values: [0, 1, 2, 3]


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

Supported Formats

json

Examples

curl -H "Content-Type: application/json" -X DELETE https://[your-subdomain].trackdrive.net/api/v1/traffic_sources/:id?auth_token=[your-auth-token]

Params

Param name
Description
auth_token
optional

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

  • Must be String