Offers: Contact Fields

Custom data fields attached to an offer's leads, defining what information is captured and how it's validated.

GET /contact_fields

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

List records.

Lists Contact Fields, the custom data points captured on leads for an offer. Filter by offer_id; requesting the contact_field_form serializer with an offer_id raises the default page size to 1000 so the full form can be built in one call.

Params

Param name Description
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
    contact_fieldContact Field
    contact_field_formContact Field Form
offer_id
Optional

Assign the record to this Offer.

ids
Optional

Return records matching these ids.

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

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 a String

created_at_from
Optional

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

  • Must be a String

fulltext
Optional

Search for any record that matches this text

  • Must be a 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
  • legacy_id
  • type
  • uuid
  • created_at
  • updated_at
  • deleted_at
  • user_updated_at
  • routes_show_path
  • routes_edit_path
  • external_record_id
  • offer_id
  • sortable_order
  • key
  • required
  • required_on_create
  • required_on_ping
  • token_id
  • check_buyer_filters_before_calling
  • name
  • context_menu_name
  • hint
  • value_type
  • value_formatter
  • value_expression
  • html_id
  • contact_field_value_ids
  • show_in_docs
  • show_in_tables
  • show_in_reports
  • value_decimal_min
  • value_decimal_max
  • decimal_places
  • include_blank
  • boolean_true_text
  • boolean_false_text
  • background_color
  • text_color
  • contact_field_values_type
  • check_buyer_filters_allow_blank
  • value_pattern_validation
  • check_pattern_validation
  • contact_field_values_count
  • date_picker_in_future
  • date_picker_enabled
  • show_on_manual_dialer
  • Must be a 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

GET /contact_fields/new

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

Build record with defaults.

Returns a blank Contact Field for the given offer, without saving it.

Params

Param name Description
offer_id
Optional

Assign the record to this Offer.

key
Optional

The internal token name where values are stored.

  • Must be a String

required
Optional Blank value allowed

Is this field required?

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

name
Optional Blank value allowed

The friendly human name displayed to users.

  • Must be a String

hint
Optional Blank value allowed

Display a helpful hint to users explaining the purpose of this field.

  • Must be a String

value_type
Optional Blank value allowed

Field Type

  • Must be one of: string, decimal, integer, time, boolean, expression, hidden.

decimal_places
Optional Blank value allowed

Decimal values/expressions will be rounded to this many decimal places.

  • Must be a decimal number.

value_formatter
Optional Blank value allowed

Expression Formatter

  • Must be one of: string, decimal, integer, time, boolean.

value_expression
Optional Blank value allowed

Expression

  • Must be a String

sortable_order
Optional Blank value allowed

The order in which records will be sorted. Values are sorted in ascending order; smaller values are listed first.

  • Must be a decimal number.

required_on_create
Optional Blank value allowed

Requires this field to have a value before a Lead can be created.

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

required_on_ping
Optional Blank value allowed

Requires this field to have a value before this Offer’s buyers can be pinged.

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

html_id
Optional Blank value allowed

A custom HTML id for this field’s input, used to target it with your own CSS or JavaScript.

  • Must be a String

background_color
Optional Blank value allowed

The background color used to display this field’s token, as a hex code.

  • Must be a String

text_color
Optional Blank value allowed

The text color used to display this field’s token, as a hex code.

  • Must be a String

show_in_docs
Optional Blank value allowed

Includes this field in the integration guide and posting instructions shown to your traffic sources.

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

show_in_tables
Optional Blank value allowed

Shows this field as a column in tables throughout the app.

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

show_in_reports
Optional Blank value allowed

Shows this field as an option when building reports.

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

show_on_manual_dialer
Optional Blank value allowed

Shows this field on the manual dialer screen.

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

check_buyer_filters_before_calling
Optional Blank value allowed

Considers this field’s value when applying buyer filters before calling.

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

check_buyer_filters_allow_blank
Optional Blank value allowed

Allows a blank value to pass buyer filters instead of blocking the call.

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

value_decimal_min
Optional Blank value allowed

The minimum acceptable value, used when the field type is Decimal or Integer.

  • Must be a decimal number.

value_decimal_max
Optional Blank value allowed

The maximum acceptable value, used when the field type is Decimal or Integer.

  • Must be a decimal number.

value_date_min
Optional Blank value allowed

The earliest acceptable date, used when the field type is Time.

  • Must be a String

value_date_max
Optional Blank value allowed

The latest acceptable date, used when the field type is Time.

  • Must be a String

date_picker_enabled
Optional Blank value allowed

Shows a date picker for entering this field’s value, used when the field type is Time.

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

date_picker_in_future
Optional Blank value allowed

Restricts the date picker to future dates only, used when the field type is Time.

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

boolean_true_text
Optional Blank value allowed

The label displayed for a true value, used when the field type is Boolean.

  • Must be a String

boolean_false_text
Optional Blank value allowed

The label displayed for a false value, used when the field type is Boolean.

  • Must be a String

include_blank
Optional Blank value allowed

Includes a blank option in the list of acceptable values, used when the field type is Boolean or String.

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

contact_field_values_type
Optional Blank value allowed

Where the list of acceptable values for this field comes from.

  • Must be one of: custom, countries, usa_states, canada_provinces.

check_pattern_validation
Optional Blank value allowed

Validates this field’s value against the pattern selected in value_pattern_validation.

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

value_pattern_validation
Optional Blank value allowed

The pattern this field’s value must match, used when check_pattern_validation is enabled.

  • Must be one of: date_YYYY-MM-DD, date_DD/MM/YYYY, date_DD-MM-YYYY, date_MM/DD/YYYY, date_MM-DD-YYYY, email.

POST /contact_fields

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

Create record.

Creates a Contact Field with a unique key on an offer, defining its value type (string, decimal, boolean, etc) and how it validates, transforms, and displays lead data.

Params

Param name Description
offer_id
Required

Assign the record to this Offer.

key
Required

The internal token name where values are stored.

  • Must be a String

required
Optional Blank value allowed

Is this field required?

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

name
Optional Blank value allowed

The friendly human name displayed to users.

  • Must be a String

hint
Optional Blank value allowed

Display a helpful hint to users explaining the purpose of this field.

  • Must be a String

value_type
Optional Blank value allowed

Field Type

  • Must be one of: string, decimal, integer, time, boolean, expression, hidden.

decimal_places
Optional Blank value allowed

Decimal values/expressions will be rounded to this many decimal places.

  • Must be a decimal number.

value_formatter
Optional Blank value allowed

Expression Formatter

  • Must be one of: string, decimal, integer, time, boolean.

value_expression
Optional Blank value allowed

Expression

  • Must be a String

sortable_order
Optional Blank value allowed

The order in which records will be sorted. Values are sorted in ascending order; smaller values are listed first.

  • Must be a decimal number.

required_on_create
Optional Blank value allowed

Requires this field to have a value before a Lead can be created.

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

required_on_ping
Optional Blank value allowed

Requires this field to have a value before this Offer’s buyers can be pinged.

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

html_id
Optional Blank value allowed

A custom HTML id for this field’s input, used to target it with your own CSS or JavaScript.

  • Must be a String

background_color
Optional Blank value allowed

The background color used to display this field’s token, as a hex code.

  • Must be a String

text_color
Optional Blank value allowed

The text color used to display this field’s token, as a hex code.

  • Must be a String

show_in_docs
Optional Blank value allowed

Includes this field in the integration guide and posting instructions shown to your traffic sources.

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

show_in_tables
Optional Blank value allowed

Shows this field as a column in tables throughout the app.

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

show_in_reports
Optional Blank value allowed

Shows this field as an option when building reports.

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

show_on_manual_dialer
Optional Blank value allowed

Shows this field on the manual dialer screen.

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

check_buyer_filters_before_calling
Optional Blank value allowed

Considers this field’s value when applying buyer filters before calling.

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

check_buyer_filters_allow_blank
Optional Blank value allowed

Allows a blank value to pass buyer filters instead of blocking the call.

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

value_decimal_min
Optional Blank value allowed

The minimum acceptable value, used when the field type is Decimal or Integer.

  • Must be a decimal number.

value_decimal_max
Optional Blank value allowed

The maximum acceptable value, used when the field type is Decimal or Integer.

  • Must be a decimal number.

value_date_min
Optional Blank value allowed

The earliest acceptable date, used when the field type is Time.

  • Must be a String

value_date_max
Optional Blank value allowed

The latest acceptable date, used when the field type is Time.

  • Must be a String

date_picker_enabled
Optional Blank value allowed

Shows a date picker for entering this field’s value, used when the field type is Time.

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

date_picker_in_future
Optional Blank value allowed

Restricts the date picker to future dates only, used when the field type is Time.

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

boolean_true_text
Optional Blank value allowed

The label displayed for a true value, used when the field type is Boolean.

  • Must be a String

boolean_false_text
Optional Blank value allowed

The label displayed for a false value, used when the field type is Boolean.

  • Must be a String

include_blank
Optional Blank value allowed

Includes a blank option in the list of acceptable values, used when the field type is Boolean or String.

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

contact_field_values_type
Optional Blank value allowed

Where the list of acceptable values for this field comes from.

  • Must be one of: custom, countries, usa_states, canada_provinces.

check_pattern_validation
Optional Blank value allowed

Validates this field’s value against the pattern selected in value_pattern_validation.

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

value_pattern_validation
Optional Blank value allowed

The pattern this field’s value must match, used when check_pattern_validation is enabled.

  • Must be one of: date_YYYY-MM-DD, date_DD/MM/YYYY, date_DD-MM-YYYY, date_MM/DD/YYYY, date_MM-DD-YYYY, email.

GET /contact_fields/:id

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

Get record by id.

Fetches a single Contact Field by id.

PUT /contact_fields/:id

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

Update record by id.

Updates a Contact Field's validation rules, value formatting, or display settings.

Params

Param name Description
offer_id
Optional

Assign the record to this Offer.

key
Optional

The internal token name where values are stored.

  • Must be a String

required
Optional Blank value allowed

Is this field required?

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

name
Optional Blank value allowed

The friendly human name displayed to users.

  • Must be a String

hint
Optional Blank value allowed

Display a helpful hint to users explaining the purpose of this field.

  • Must be a String

value_type
Optional Blank value allowed

Field Type

  • Must be one of: string, decimal, integer, time, boolean, expression, hidden.

decimal_places
Optional Blank value allowed

Decimal values/expressions will be rounded to this many decimal places.

  • Must be a decimal number.

value_formatter
Optional Blank value allowed

Expression Formatter

  • Must be one of: string, decimal, integer, time, boolean.

value_expression
Optional Blank value allowed

Expression

  • Must be a String

sortable_order
Optional Blank value allowed

The order in which records will be sorted. Values are sorted in ascending order; smaller values are listed first.

  • Must be a decimal number.

required_on_create
Optional Blank value allowed

Requires this field to have a value before a Lead can be created.

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

required_on_ping
Optional Blank value allowed

Requires this field to have a value before this Offer’s buyers can be pinged.

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

html_id
Optional Blank value allowed

A custom HTML id for this field’s input, used to target it with your own CSS or JavaScript.

  • Must be a String

background_color
Optional Blank value allowed

The background color used to display this field’s token, as a hex code.

  • Must be a String

text_color
Optional Blank value allowed

The text color used to display this field’s token, as a hex code.

  • Must be a String

show_in_docs
Optional Blank value allowed

Includes this field in the integration guide and posting instructions shown to your traffic sources.

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

show_in_tables
Optional Blank value allowed

Shows this field as a column in tables throughout the app.

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

show_in_reports
Optional Blank value allowed

Shows this field as an option when building reports.

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

show_on_manual_dialer
Optional Blank value allowed

Shows this field on the manual dialer screen.

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

check_buyer_filters_before_calling
Optional Blank value allowed

Considers this field’s value when applying buyer filters before calling.

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

check_buyer_filters_allow_blank
Optional Blank value allowed

Allows a blank value to pass buyer filters instead of blocking the call.

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

value_decimal_min
Optional Blank value allowed

The minimum acceptable value, used when the field type is Decimal or Integer.

  • Must be a decimal number.

value_decimal_max
Optional Blank value allowed

The maximum acceptable value, used when the field type is Decimal or Integer.

  • Must be a decimal number.

value_date_min
Optional Blank value allowed

The earliest acceptable date, used when the field type is Time.

  • Must be a String

value_date_max
Optional Blank value allowed

The latest acceptable date, used when the field type is Time.

  • Must be a String

date_picker_enabled
Optional Blank value allowed

Shows a date picker for entering this field’s value, used when the field type is Time.

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

date_picker_in_future
Optional Blank value allowed

Restricts the date picker to future dates only, used when the field type is Time.

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

boolean_true_text
Optional Blank value allowed

The label displayed for a true value, used when the field type is Boolean.

  • Must be a String

boolean_false_text
Optional Blank value allowed

The label displayed for a false value, used when the field type is Boolean.

  • Must be a String

include_blank
Optional Blank value allowed

Includes a blank option in the list of acceptable values, used when the field type is Boolean or String.

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

contact_field_values_type
Optional Blank value allowed

Where the list of acceptable values for this field comes from.

  • Must be one of: custom, countries, usa_states, canada_provinces.

check_pattern_validation
Optional Blank value allowed

Validates this field’s value against the pattern selected in value_pattern_validation.

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

value_pattern_validation
Optional Blank value allowed

The pattern this field’s value must match, used when check_pattern_validation is enabled.

  • Must be one of: date_YYYY-MM-DD, date_DD/MM/YYYY, date_DD-MM-YYYY, date_MM/DD/YYYY, date_MM-DD-YYYY, email.

DELETE /contact_fields/:id

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

Destroy record by id.

Deletes a Contact Field by id. Lead data already stored under this field is not removed.