State Rules
A named bundle of state-level calling rules (hours, frequency caps, holidays) applied company-wide or to specific offers.
GET /state_rule_groups
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/state_rule_groups
List State Call Rules records.
Lists State Call Rules groups, which apply state-level business hours, call limits, or holiday schedules either account-wide or to specific offers depending on rule_scope. Requires the company_preferences permission.
Params
| Param name | Description |
|---|---|
|
ids Optional |
Return records matching these ids.
|
|
page Optional |
Return the next page of results.
|
|
per_page Optional |
How many results to return per page. The default is 25.
|
|
created_at_to Optional |
Date formatted like 2016-01-01 12:25:15 -0500
|
|
created_at_from Optional |
Date formatted like 2016-01-01 12:25:15 -0500
|
|
fulltext Optional |
Search for any record that matches this text
|
|
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:
|
|
root Optional |
Pass
|
GET /state_rule_groups/new
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/state_rule_groups/new
Build State Call Rules with defaults.
Returns a blank State Call Rules group populated with default attribute values, without saving it. Requires the company_preferences permission.
Params
| Param name | Description |
|---|---|
|
rule_scope Optional Blank value allowed |
Rule Scope
|
|
offer_ids Optional Blank value allowed |
Offer Ids
|
|
name Optional Blank value allowed |
Name
|
|
description Optional Blank value allowed |
Description
|
|
state_business_hour_ids Optional Blank value allowed |
State Business Hour Ids
|
|
state_call_limit_ids Optional Blank value allowed |
State Call Limit Ids
|
|
state_holiday_ids Optional Blank value allowed |
State Holidays Ids
|
POST /state_rule_groups
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/state_rule_groups
Create State Call Rules.
Creates a State Call Rules group with a rule_scope (account-wide or restricted to specific offer_ids) and at least one of state_business_hour_ids, state_call_limit_ids, or state_holiday_ids attached. Requires the company_preferences permission.
Params
| Param name | Description |
|---|---|
|
rule_scope Optional Blank value allowed |
Rule Scope
|
|
offer_ids Optional Blank value allowed |
Offer Ids
|
|
name Optional Blank value allowed |
Name
|
|
description Optional Blank value allowed |
Description
|
|
state_business_hour_ids Optional Blank value allowed |
State Business Hour Ids
|
|
state_call_limit_ids Optional Blank value allowed |
State Call Limit Ids
|
|
state_holiday_ids Optional Blank value allowed |
State Holidays Ids
|
GET /state_rule_groups/:id
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/state_rule_groups/:id
Get State Call Rules by id.
Fetches a single State Call Rules group by id. Requires the company_preferences permission.
PUT /state_rule_groups/:id
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/state_rule_groups/:id
Update State Call Rules by id.
Updates a State Call Rules group's scope, offers, or attached business hour, call limit, or holiday rules. Requires the company_preferences permission.
Params
| Param name | Description |
|---|---|
|
rule_scope Optional Blank value allowed |
Rule Scope
|
|
offer_ids Optional Blank value allowed |
Offer Ids
|
|
name Optional Blank value allowed |
Name
|
|
description Optional Blank value allowed |
Description
|
|
state_business_hour_ids Optional Blank value allowed |
State Business Hour Ids
|
|
state_call_limit_ids Optional Blank value allowed |
State Call Limit Ids
|
|
state_holiday_ids Optional Blank value allowed |
State Holidays Ids
|
DELETE /state_rule_groups/:id
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/state_rule_groups/:id
Destroy State Call Rules by id.
Deletes a State Call Rules group by id. Requires the company_preferences permission.