Playlists

An ordered or shuffled group of audio files played back together, such as hold music or IVR prompts.

GET /sound_playlists

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

List Playlist records.

Lists the sound playlists in your account, used for hold music and other audio prompts. Supports the standard search parameters such as pagination, sorting, and full-text search, and can be filtered to a specific list of playlist ids.

Params

Param name Description
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
  • company_id
  • name
  • order_type
  • use_predefined_playlist
  • predefined_playlist_id
  • description
  • sound_file_ids
  • 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 /sound_playlists/new

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

Build Playlist with defaults.

Builds an unsaved playlist populated with Trackdrive's default attribute values so you can preview the settings before calling create. Nothing is saved to your account.

Params

Param name Description
name
Optional Blank value allowed

Name

  • Must be a String

description
Optional Blank value allowed

Description

  • Must be a String

order_type
Optional Blank value allowed

How sound files in this playlist are picked for playback. One of sortable_order, random, or round_robin.

  • Must be one of: sortable_order, random, round_robin.

use_predefined_playlist
Optional Blank value allowed

When true, this playlist plays a built-in Trackdrive playlist instead of its own uploaded sound files.

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

predefined_playlist_id
Optional Blank value allowed

The built-in Trackdrive playlist played when use_predefined_playlist is true.

  • 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

sound_file_ids
Optional Blank value allowed

The Sound Files in this playlist, in playback order.

POST /sound_playlists

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

Create Playlist.

Creates a new sound playlist in your account with the given name, description, and playback order_type, optionally attaching its sound files and their play order via sound_file_ids, or cloning a predefined playlist's files via use_predefined_playlist/predefined_playlist_id.

Params

Param name Description
name
Optional Blank value allowed

Name

  • Must be a String

description
Optional Blank value allowed

Description

  • Must be a String

order_type
Optional Blank value allowed

How sound files in this playlist are picked for playback. One of sortable_order, random, or round_robin.

  • Must be one of: sortable_order, random, round_robin.

use_predefined_playlist
Optional Blank value allowed

When true, this playlist plays a built-in Trackdrive playlist instead of its own uploaded sound files.

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

predefined_playlist_id
Optional Blank value allowed

The built-in Trackdrive playlist played when use_predefined_playlist is true.

  • 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

sound_file_ids
Optional Blank value allowed

The Sound Files in this playlist, in playback order.

GET /sound_playlists/:id

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

Get Playlist by id.

Retrieves a single sound playlist by its Trackdrive internal ID.

PUT /sound_playlists/:id

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

Update Playlist by id.

Updates an existing playlist's name, description, or playback order_type, and can replace its sound files and their play order via sound_file_ids. Only the attributes you include are changed.

Params

Param name Description
name
Optional Blank value allowed

Name

  • Must be a String

description
Optional Blank value allowed

Description

  • Must be a String

order_type
Optional Blank value allowed

How sound files in this playlist are picked for playback. One of sortable_order, random, or round_robin.

  • Must be one of: sortable_order, random, round_robin.

use_predefined_playlist
Optional Blank value allowed

When true, this playlist plays a built-in Trackdrive playlist instead of its own uploaded sound files.

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

predefined_playlist_id
Optional Blank value allowed

The built-in Trackdrive playlist played when use_predefined_playlist is true.

  • 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

sound_file_ids
Optional Blank value allowed

The Sound Files in this playlist, in playback order.

DELETE /sound_playlists/:id

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

Destroy Playlist by id.

Permanently deletes a sound playlist by its Trackdrive internal ID. Unlike buyers and schedules, playlists are not soft-deleted, so this action cannot be undone.