Advertising Optimizer Tokens

Maps an incoming URL parameter name to a tracking token, so posted data lands in the right field.

GET /token_matchers

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

List records.

Lists an offer's optimizer token matchers, which map inbound URL parameters (url_param_key) to Trackdrive tracking tokens (token_key). Filterable by offer_id, owner_id, and owner_type.

Params

Param name Description
offer_id
Optional

Filter for records that belong to this Offer.

owner_id
Optional

The ID for the record that owns this record.

  • Must be an 8-bit integer ID or a 128-bit UUID reference to an object on Trackdrive. Example ID: 289302820, Example UUID: 924c37d5-e70f-42ad-84c2-e85eb0c1bc21

owner_type
Optional

The type of record that owns this record.

  • Must be a String

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
  • token_key
  • url_param_key
  • owner_id
  • owner_type
  • 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 /token_matchers/new

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

Build record with defaults.

Builds a token matcher with default attributes without saving it.

Params

Param name Description
offer_id
Optional

Assign the record to this Offer.

owner_id
Optional

The ID for the record that owns this record.

  • Must be an 8-bit integer ID or a 128-bit UUID reference to an object on Trackdrive. Example ID: 289302820, Example UUID: 924c37d5-e70f-42ad-84c2-e85eb0c1bc21

owner_type
Optional

The type of record that owns this record.

  • Must be a String

token_key
Optional

The internal token name where values are stored.

  • Must be a String

url_param_key
Optional

This URL key will be assigned to a Trackdrive Token.

  • 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.

token_id
Optional Blank value allowed

Link directly to an existing Token by its id instead of matching by token name.

POST /token_matchers

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

Create record.

Creates a token matcher that maps a URL parameter to a Trackdrive token, so values passed in that parameter are captured for tracking and optimization.

Params

Param name Description
offer_id
Optional

Assign the record to this Offer.

owner_id
Optional

The ID for the record that owns this record.

  • Must be an 8-bit integer ID or a 128-bit UUID reference to an object on Trackdrive. Example ID: 289302820, Example UUID: 924c37d5-e70f-42ad-84c2-e85eb0c1bc21

owner_type
Optional

The type of record that owns this record.

  • Must be a String

token_key
Required

The internal token name where values are stored.

  • Must be a String

url_param_key
Required

This URL key will be assigned to a Trackdrive Token.

  • 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.

token_id
Optional Blank value allowed

Link directly to an existing Token by its id instead of matching by token name.

GET /token_matchers/:id

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

Get record by id.

Retrieves a token matcher by id.

PUT /token_matchers/:id

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

Update record by id.

Updates an existing token matcher's token_key, url_param_key, or sort order.

Params

Param name Description
offer_id
Optional Blank value allowed

Assign the record to this Offer.

owner_id
Optional Blank value allowed

The ID for the record that owns this record.

  • Must be an 8-bit integer ID or a 128-bit UUID reference to an object on Trackdrive. Example ID: 289302820, Example UUID: 924c37d5-e70f-42ad-84c2-e85eb0c1bc21

owner_type
Optional Blank value allowed

The type of record that owns this record.

  • Must be a String

token_key
Optional

The internal token name where values are stored.

  • Must be a String

url_param_key
Optional

This URL key will be assigned to a Trackdrive Token.

  • 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.

token_id
Optional Blank value allowed

Link directly to an existing Token by its id instead of matching by token name.

DELETE /token_matchers/:id

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

Destroy record by id.

Deletes a token matcher by id.