Supported Formats

json, csv

Examples

wget "https://[your-subdomain].trackdrive.net/api/v1/buyers?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.

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.

  • Must be one of: Etc/UTC, UTC, SST, HST, AKST, PST, MST, CST, EST, COT, PET, AST, VET, BOT, CLST, NST, BRST, ART, UYT, GYT, WGT, GST, AZOT, CVT, GMT, WET, CET, EET, MSK, IST, CAT, SAST, EAT, IRST, AZT, GET, AMT, AFT, YEKT, PKT, UZT, NPT, BDT, NOVT, MMT, ICT, WIB, KRAT, HKT, XJT, MYT, SGT, AWST, IRKT, ULAT, KST, JST, YAKT, ACST, ACDT, AEDT, AEST, VLAT, ChST, PGT, MAGT, SBT, NCT, FJST, PETT, MHT, NZDT, TOT, TKT, CHADT, WSDT.

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
  • name
  • number
  • paused
  • time_zone
  • user_buyer_id
  • bid_price
  • route_by_type
  • buyer_group_ids
  • token_values
  • last_call_at
  • weight
  • tier
  • timeout_seconds
  • dtmf_tones
  • concurrency_cap_limit
  • concurrency_cap_used
  • attempt_daily_used
  • attempt_hourly_used
  • attempt_monthly_used
  • attempt_total_used
  • buyer_conversion_daily_used
  • buyer_conversion_hourly_used
  • buyer_conversion_monthly_used
  • buyer_conversion_total_used
  • connection_daily_used
  • connection_hourly_used
  • connection_monthly_used
  • connection_total_used
  • earned_revenue_daily_used
  • earned_revenue_hourly_used
  • earned_revenue_monthly_used
  • earned_revenue_total_used
  • revenue_daily_used
  • revenue_hourly_used
  • revenue_monthly_used
  • revenue_total_used
  • attempt_daily_limit
  • attempt_hourly_limit
  • attempt_monthly_limit
  • attempt_total_limit
  • buyer_conversion_daily_limit
  • buyer_conversion_hourly_limit
  • buyer_conversion_monthly_limit
  • buyer_conversion_total_limit
  • connection_daily_limit
  • connection_hourly_limit
  • connection_monthly_limit
  • connection_total_limit
  • earned_revenue_daily_limit
  • earned_revenue_hourly_limit
  • earned_revenue_monthly_limit
  • earned_revenue_total_limit
  • revenue_daily_limit
  • revenue_hourly_limit
  • revenue_monthly_limit
  • revenue_total_limit
  • Must be String

order
optional

Sort results by this field.

  • Must be one of: name, paused, number, created_at, last_call_at, tier, weight, time_zone, user_buyer_id, call_limits.in_progress_count, call_limits.in_progress_used, call_limits.revenue_hourly_used, call_limits.revenue_daily_used, call_limits.revenue_monthly_used, call_limits.revenue_total_used, call_limits.earned_revenue_hourly_used, call_limits.earned_revenue_daily_used, call_limits.earned_revenue_monthly_used, call_limits.earned_revenue_total_used, call_limits.buyer_conversion_hourly_used, call_limits.buyer_conversion_daily_used, call_limits.buyer_conversion_monthly_used, call_limits.buyer_conversion_total_used, call_limits.connection_hourly_used, call_limits.connection_daily_used, call_limits.connection_monthly_used, call_limits.connection_total_used, call_limits.attempt_hourly_used, call_limits.attempt_daily_used, call_limits.attempt_monthly_used, call_limits.attempt_total_used.

order_dir
optional

Sort results in ascending or descending order.

  • Must be one of: desc, asc.


GET /api/v1/buyers/:id
Get an individual buyer 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/buyers/:id
Update an individual buyer

Supported Formats

json

Examples

curl -H "Content-Type: application/json" -X PUT -d '{"tier":"-10","name":"new name"}' https://[your-subdomain].trackdrive.net/api/v1/buyers/: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_buyer_id
optional

Your external ID for this buyer.

  • Must be String

number
optional

The DID or SIP endpoint to call. DID must be prefixed with +{country code}. Example: to dial a number in the USA, enter +1 followed by the 10 digit DID number, in UK it would be +44 followed by the DID number. To transfer a call via SIP, begin the number with 'sip:'.

  • Must be String

name
optional

The name for this buyer that will appear on menus and in logs.

  • Must be String

timeout_seconds
optional

Determines the time in seconds the call should ring. Must be at least 12 seconds. If the call is not answered within the ring timeout value or the default value of 120 s, it is canceled.

  • Must be Integer

dtmf_tones
optional

Play DTMF tones when the call is answered. This is useful when dialing a phone number and an extension. Your provider will dial the number, and when the automated system picks up, sends the DTMF tones to connect to the extension. E.g. If you want to dial the 2410 extension after the call is connected, and you want to wait for a few seconds before sending the extension, add a few leading 'w' characters. Each 'w' character waits 0.5 second before sending a digit. Each 'W' character waits 1 second before sending a digit.

  • Must be Integer

time_zone
optional

Date ranges will be parsed using this time zone.

  • Must be one of: Etc/UTC, UTC, SST, HST, AKST, PST, MST, CST, EST, COT, PET, AST, VET, BOT, CLST, NST, BRST, ART, UYT, GYT, WGT, GST, AZOT, CVT, GMT, WET, CET, EET, MSK, IST, CAT, SAST, EAT, IRST, AZT, GET, AMT, AFT, YEKT, PKT, UZT, NPT, BDT, NOVT, MMT, ICT, WIB, KRAT, HKT, XJT, MYT, SGT, AWST, IRKT, ULAT, KST, JST, YAKT, ACST, ACDT, AEDT, AEST, VLAT, ChST, PGT, MAGT, SBT, NCT, FJST, PETT, MHT, NZDT, TOT, TKT, CHADT, WSDT.

paused
optional

translation missing: en.api.buyers.paused

  • Must be one of: true, false.

record_calls
optional

Enable or Disable call recordings for this Buyer.

  • Must be one of: true, false.

use_fake_caller_id
optional

Set this to true to enable sending a fake callerID when dialling this buyer.

  • Must be one of: true, false.

route_by_type
optional

Configure how calls will be routed to this Buyer. When routing by revenue the tier will be automatically calculated by taking the revenue for the current timeframe * -1.

  • Must be one of: tier, revenue.

tier
optional

When routing by revenue the tier will not be used. Buyers with the lowest tier are considered first for calls (a tier may be negative if needed). For buyers with the same tier, the weight will then be used to calculate the % of calls the buyer gets within that tier.

  • Must be Integer

weight
optional

The Weight of this buyer will be divided by the Total Weight of all buyers at this same Tier to get the % of calls this buyer will get within this Tier. Example: 3 buyers at tier 1 with weights of 1, 4, and 10. The total weight of the buyers at Tier 1 is 15 (1 + 4 + 10 = 15). So the buyer with weight 1 gets 1/15%, buyer with weight 4 gets 4/15%, and buyer with weight 10 gets 10/15% of calls going to Tier 1 buyers.

  • Must be Integer

concurrency_cap_limit
optional

The number of concurrent calls that can be forwarded to a buyer simultaneously.

  • Must be Integer

buyer_cap_attributes
optional

translation missing: en.api.buyer_cap_attributes

  • Must be a Hash

buyer_cap_attributes[business_hours_schedule]
optional

[

{
    attempt_hourly_limit: 10,
    connection_hourly_limit: 10,
    conversion_hourly_limit: 10,
    revenue_hourly_limit: 10,
    schedule: [
        {
            day: '0',
            times: ['11:05..13:05', '14:00..15:00']
        },
        {
            day: '1',
            times: ['11:10..18:30', '19:15..23:30']
        }
    ]
}

]

  • Must be an array of any type

buyer_cap_attributes[attempt_total_limit]
optional

Attempt caps limit the number of times a buyer can be attempted in a given interval.

  • Must be Integer

buyer_cap_attributes[attempt_monthly_limit]
optional

Monthly Attempt Cap

  • Must be Integer

buyer_cap_attributes[attempt_daily_limit]
optional

Daily Attempt Cap

  • Must be Integer

buyer_cap_attributes[connection_total_limit]
optional

Connection caps limit the number of times a buyer can be connected in a given interval.

  • Must be Integer

buyer_cap_attributes[connection_monthly_limit]
optional

Monthly Connection Cap

  • Must be Integer

buyer_cap_attributes[connection_daily_limit]
optional

Daily Connection Cap

  • Must be Integer

buyer_cap_attributes[buyer_conversion_total_limit]
optional

Conversion caps limit the number of times a buyer can convert in a given interval.

  • Must be Integer

buyer_cap_attributes[buyer_conversion_monthly_limit]
optional

Monthly Conversion Cap

  • Must be Integer

buyer_cap_attributes[buyer_conversion_daily_limit]
optional

Daily Conversion Cap

  • Must be Integer

buyer_cap_attributes[revenue_total_limit]
optional

Revenue caps limit the dollar amount that can be paid by a buyer in a given interval.

  • Must be Integer

buyer_cap_attributes[revenue_monthly_limit]
optional

Monthly $ Revenue Cap

  • Must be Integer

buyer_cap_attributes[revenue_daily_limit]
optional

Daily $ Revenue Cap

  • Must be Integer

reset_total_caps
optional
  • Must be one of: true, false.


POST /api/v1/buyers
Create a buyer.

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

user_buyer_id
optional

Your external ID for this buyer.

  • Must be String

number
optional

The DID or SIP endpoint to call. DID must be prefixed with +{country code}. Example: to dial a number in the USA, enter +1 followed by the 10 digit DID number, in UK it would be +44 followed by the DID number. To transfer a call via SIP, begin the number with 'sip:'.

  • Must be String

name
optional

The name for this buyer that will appear on menus and in logs.

  • Must be String

timeout_seconds
optional

Determines the time in seconds the call should ring. Must be at least 12 seconds. If the call is not answered within the ring timeout value or the default value of 120 s, it is canceled.

  • Must be Integer

dtmf_tones
optional

Play DTMF tones when the call is answered. This is useful when dialing a phone number and an extension. Your provider will dial the number, and when the automated system picks up, sends the DTMF tones to connect to the extension. E.g. If you want to dial the 2410 extension after the call is connected, and you want to wait for a few seconds before sending the extension, add a few leading 'w' characters. Each 'w' character waits 0.5 second before sending a digit. Each 'W' character waits 1 second before sending a digit.

  • Must be Integer

time_zone
optional

Date ranges will be parsed using this time zone.

  • Must be one of: Etc/UTC, UTC, SST, HST, AKST, PST, MST, CST, EST, COT, PET, AST, VET, BOT, CLST, NST, BRST, ART, UYT, GYT, WGT, GST, AZOT, CVT, GMT, WET, CET, EET, MSK, IST, CAT, SAST, EAT, IRST, AZT, GET, AMT, AFT, YEKT, PKT, UZT, NPT, BDT, NOVT, MMT, ICT, WIB, KRAT, HKT, XJT, MYT, SGT, AWST, IRKT, ULAT, KST, JST, YAKT, ACST, ACDT, AEDT, AEST, VLAT, ChST, PGT, MAGT, SBT, NCT, FJST, PETT, MHT, NZDT, TOT, TKT, CHADT, WSDT.

paused
optional

translation missing: en.api.buyers.paused

  • Must be one of: true, false.

record_calls
optional

Enable or Disable call recordings for this Buyer.

  • Must be one of: true, false.

use_fake_caller_id
optional

Set this to true to enable sending a fake callerID when dialling this buyer.

  • Must be one of: true, false.

route_by_type
optional

Configure how calls will be routed to this Buyer. When routing by revenue the tier will be automatically calculated by taking the revenue for the current timeframe * -1.

  • Must be one of: tier, revenue.

tier
optional

When routing by revenue the tier will not be used. Buyers with the lowest tier are considered first for calls (a tier may be negative if needed). For buyers with the same tier, the weight will then be used to calculate the % of calls the buyer gets within that tier.

  • Must be Integer

weight
optional

The Weight of this buyer will be divided by the Total Weight of all buyers at this same Tier to get the % of calls this buyer will get within this Tier. Example: 3 buyers at tier 1 with weights of 1, 4, and 10. The total weight of the buyers at Tier 1 is 15 (1 + 4 + 10 = 15). So the buyer with weight 1 gets 1/15%, buyer with weight 4 gets 4/15%, and buyer with weight 10 gets 10/15% of calls going to Tier 1 buyers.

  • Must be Integer

concurrency_cap_limit
optional

The number of concurrent calls that can be forwarded to a buyer simultaneously.

  • Must be Integer

buyer_cap_attributes
optional

translation missing: en.api.buyer_cap_attributes

  • Must be a Hash

buyer_cap_attributes[business_hours_schedule]
optional

[

{
    attempt_hourly_limit: 10,
    connection_hourly_limit: 10,
    conversion_hourly_limit: 10,
    revenue_hourly_limit: 10,
    schedule: [
        {
            day: '0',
            times: ['11:05..13:05', '14:00..15:00']
        },
        {
            day: '1',
            times: ['11:10..18:30', '19:15..23:30']
        }
    ]
}

]

  • Must be an array of any type

buyer_cap_attributes[attempt_total_limit]
optional

Attempt caps limit the number of times a buyer can be attempted in a given interval.

  • Must be Integer

buyer_cap_attributes[attempt_monthly_limit]
optional

Monthly Attempt Cap

  • Must be Integer

buyer_cap_attributes[attempt_daily_limit]
optional

Daily Attempt Cap

  • Must be Integer

buyer_cap_attributes[connection_total_limit]
optional

Connection caps limit the number of times a buyer can be connected in a given interval.

  • Must be Integer

buyer_cap_attributes[connection_monthly_limit]
optional

Monthly Connection Cap

  • Must be Integer

buyer_cap_attributes[connection_daily_limit]
optional

Daily Connection Cap

  • Must be Integer

buyer_cap_attributes[buyer_conversion_total_limit]
optional

Conversion caps limit the number of times a buyer can convert in a given interval.

  • Must be Integer

buyer_cap_attributes[buyer_conversion_monthly_limit]
optional

Monthly Conversion Cap

  • Must be Integer

buyer_cap_attributes[buyer_conversion_daily_limit]
optional

Daily Conversion Cap

  • Must be Integer

buyer_cap_attributes[revenue_total_limit]
optional

Revenue caps limit the dollar amount that can be paid by a buyer in a given interval.

  • Must be Integer

buyer_cap_attributes[revenue_monthly_limit]
optional

Monthly $ Revenue Cap

  • Must be Integer

buyer_cap_attributes[revenue_daily_limit]
optional

Daily $ Revenue Cap

  • Must be Integer


DELETE /api/v1/buyers/:id
translation missing: en.api.buyers.destroy

Supported Formats

json

Examples

curl -H "Content-Type: application/json" -X DELETE "https://[your-subdomain].trackdrive.net/api/v1/buyers/: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