Call Times

Per-state allowed calling hours for each day of the week, used to block outbound calls outside those windows.

GET /state_business_hours

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

List State Call Time records.

List the State Call Time rules in your account, which restrict outbound calling and dialing windows by US state.

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
  • states
  • name
  • monday_open_at
  • monday_close_at
  • tuesday_open_at
  • tuesday_close_at
  • wednesday_open_at
  • wednesday_close_at
  • thursday_open_at
  • thursday_close_at
  • friday_open_at
  • friday_close_at
  • saturday_open_at
  • saturday_close_at
  • sunday_open_at
  • monday_closed
  • tuesday_closed
  • wednesday_closed
  • thursday_closed
  • friday_closed
  • saturday_closed
  • sunday_closed
  • sunday_close_at
  • template_description
  • template_tier
  • template_enabled
  • template_copy_on_company_create
  • template_id
  • is_system_template
  • 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 /state_business_hours/new

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

Build State Call Time with defaults.

Return a blank State Call Time rule populated with default attribute values, useful for building a create form.

Params

Param name Description
states
Optional Blank value allowed

States

  • Must be an array of strings. EG: ["abc123", "xzy023"]

name
Optional Blank value allowed

Name

  • Must be a String

monday_open_at
Optional Blank value allowed

Monday Open At

  • Must be a decimal number.

monday_close_at
Optional Blank value allowed

Monday Close At

  • Must be a decimal number.

tuesday_open_at
Optional Blank value allowed

Tuesday Open At

  • Must be a decimal number.

tuesday_close_at
Optional Blank value allowed

Tuesday Close At

  • Must be a decimal number.

wednesday_open_at
Optional Blank value allowed

Wednesday Open At

  • Must be a decimal number.

wednesday_close_at
Optional Blank value allowed

Wednesday Close At

  • Must be a decimal number.

thursday_open_at
Optional Blank value allowed

Thursday Open At

  • Must be a decimal number.

thursday_close_at
Optional Blank value allowed

Thursday Close At

  • Must be a decimal number.

friday_open_at
Optional Blank value allowed

Friday Open At

  • Must be a decimal number.

friday_close_at
Optional Blank value allowed

Friday Close At

  • Must be a decimal number.

saturday_open_at
Optional Blank value allowed

Saturday Open At

  • Must be a decimal number.

saturday_close_at
Optional Blank value allowed

Saturday Close At

  • Must be a decimal number.

sunday_open_at
Optional Blank value allowed

Sunday Open At

  • Must be a decimal number.

sunday_close_at
Optional Blank value allowed

Sunday Close At

  • Must be a decimal number.

monday_closed
Optional Blank value allowed

When true, outbound calls to this state are blocked all day Monday, regardless of the open/close times.

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

tuesday_closed
Optional Blank value allowed

When true, outbound calls to this state are blocked all day Tuesday, regardless of the open/close times.

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

wednesday_closed
Optional Blank value allowed

When true, outbound calls to this state are blocked all day Wednesday, regardless of the open/close times.

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

thursday_closed
Optional Blank value allowed

When true, outbound calls to this state are blocked all day Thursday, regardless of the open/close times.

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

friday_closed
Optional Blank value allowed

When true, outbound calls to this state are blocked all day Friday, regardless of the open/close times.

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

saturday_closed
Optional Blank value allowed

When true, outbound calls to this state are blocked all day Saturday, regardless of the open/close times.

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

sunday_closed
Optional Blank value allowed

When true, outbound calls to this state are blocked all day Sunday, regardless of the open/close times.

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

POST /state_business_hours

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

Create State Call Time.

Create a State Call Time rule defining the allowed calling hours for one or more states, each day of the week.

Params

Param name Description
states
Optional Blank value allowed

States

  • Must be an array of strings. EG: ["abc123", "xzy023"]

name
Optional Blank value allowed

Name

  • Must be a String

monday_open_at
Optional Blank value allowed

Monday Open At

  • Must be a decimal number.

monday_close_at
Optional Blank value allowed

Monday Close At

  • Must be a decimal number.

tuesday_open_at
Optional Blank value allowed

Tuesday Open At

  • Must be a decimal number.

tuesday_close_at
Optional Blank value allowed

Tuesday Close At

  • Must be a decimal number.

wednesday_open_at
Optional Blank value allowed

Wednesday Open At

  • Must be a decimal number.

wednesday_close_at
Optional Blank value allowed

Wednesday Close At

  • Must be a decimal number.

thursday_open_at
Optional Blank value allowed

Thursday Open At

  • Must be a decimal number.

thursday_close_at
Optional Blank value allowed

Thursday Close At

  • Must be a decimal number.

friday_open_at
Optional Blank value allowed

Friday Open At

  • Must be a decimal number.

friday_close_at
Optional Blank value allowed

Friday Close At

  • Must be a decimal number.

saturday_open_at
Optional Blank value allowed

Saturday Open At

  • Must be a decimal number.

saturday_close_at
Optional Blank value allowed

Saturday Close At

  • Must be a decimal number.

sunday_open_at
Optional Blank value allowed

Sunday Open At

  • Must be a decimal number.

sunday_close_at
Optional Blank value allowed

Sunday Close At

  • Must be a decimal number.

monday_closed
Optional Blank value allowed

When true, outbound calls to this state are blocked all day Monday, regardless of the open/close times.

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

tuesday_closed
Optional Blank value allowed

When true, outbound calls to this state are blocked all day Tuesday, regardless of the open/close times.

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

wednesday_closed
Optional Blank value allowed

When true, outbound calls to this state are blocked all day Wednesday, regardless of the open/close times.

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

thursday_closed
Optional Blank value allowed

When true, outbound calls to this state are blocked all day Thursday, regardless of the open/close times.

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

friday_closed
Optional Blank value allowed

When true, outbound calls to this state are blocked all day Friday, regardless of the open/close times.

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

saturday_closed
Optional Blank value allowed

When true, outbound calls to this state are blocked all day Saturday, regardless of the open/close times.

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

sunday_closed
Optional Blank value allowed

When true, outbound calls to this state are blocked all day Sunday, regardless of the open/close times.

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

GET /state_business_hours/:id

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

Get State Call Time by id.

Get the details of a single State Call Time rule by id.

PUT /state_business_hours/:id

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

Update State Call Time by id.

Update the states or daily open/close times on a State Call Time rule. System-provided rules (those with a template_id) cannot be modified through this endpoint.

Params

Param name Description
states
Optional Blank value allowed

States

  • Must be an array of strings. EG: ["abc123", "xzy023"]

name
Optional Blank value allowed

Name

  • Must be a String

monday_open_at
Optional Blank value allowed

Monday Open At

  • Must be a decimal number.

monday_close_at
Optional Blank value allowed

Monday Close At

  • Must be a decimal number.

tuesday_open_at
Optional Blank value allowed

Tuesday Open At

  • Must be a decimal number.

tuesday_close_at
Optional Blank value allowed

Tuesday Close At

  • Must be a decimal number.

wednesday_open_at
Optional Blank value allowed

Wednesday Open At

  • Must be a decimal number.

wednesday_close_at
Optional Blank value allowed

Wednesday Close At

  • Must be a decimal number.

thursday_open_at
Optional Blank value allowed

Thursday Open At

  • Must be a decimal number.

thursday_close_at
Optional Blank value allowed

Thursday Close At

  • Must be a decimal number.

friday_open_at
Optional Blank value allowed

Friday Open At

  • Must be a decimal number.

friday_close_at
Optional Blank value allowed

Friday Close At

  • Must be a decimal number.

saturday_open_at
Optional Blank value allowed

Saturday Open At

  • Must be a decimal number.

saturday_close_at
Optional Blank value allowed

Saturday Close At

  • Must be a decimal number.

sunday_open_at
Optional Blank value allowed

Sunday Open At

  • Must be a decimal number.

sunday_close_at
Optional Blank value allowed

Sunday Close At

  • Must be a decimal number.

monday_closed
Optional Blank value allowed

When true, outbound calls to this state are blocked all day Monday, regardless of the open/close times.

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

tuesday_closed
Optional Blank value allowed

When true, outbound calls to this state are blocked all day Tuesday, regardless of the open/close times.

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

wednesday_closed
Optional Blank value allowed

When true, outbound calls to this state are blocked all day Wednesday, regardless of the open/close times.

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

thursday_closed
Optional Blank value allowed

When true, outbound calls to this state are blocked all day Thursday, regardless of the open/close times.

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

friday_closed
Optional Blank value allowed

When true, outbound calls to this state are blocked all day Friday, regardless of the open/close times.

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

saturday_closed
Optional Blank value allowed

When true, outbound calls to this state are blocked all day Saturday, regardless of the open/close times.

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

sunday_closed
Optional Blank value allowed

When true, outbound calls to this state are blocked all day Sunday, regardless of the open/close times.

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

DELETE /state_business_hours/:id

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

Destroy State Call Time by id.

Permanently delete a State Call Time rule. System-provided rules (those with a template_id) cannot be deleted through this endpoint.