> For a complete documentation index, fetch https://docs.voximplant.ai/llms.txt # GetACDState POST https://api.voximplant.com/platform_api/GetACDState Gets the current ACD queue state. Allowed roles: `Owner`, `Admin`, `Developer`. **Example request:** Get the state of the queue 1. Reference: https://docs.voximplant.ai/api-reference/management-api/reference/queues/get-acd-state ## Authentication - `Authorization` header (bearer token, required) — Voximplant Management API uses signed JWT tokens generated from your service-account private key. Pass the token in the `Authorization` header as a Bearer value: ``` Authorization: Bearer $VOXIMPLANT_TOKEN ``` See [Authorization](/api-reference/management-api/authorization) for ready-to-copy snippets in bash, Python, Node.js and Go that turn your `credentials.json` into a token. ## Request ### Query parameters - `acd_queue_id` (list of integer, optional) — The ACD queue ID list separated by semicolons (;). Use the 'all' value to select all ACD queues ## Response ### 200 Successful response - `result` (ACDStateType, optional) — The [GetACDState] function result item. ## Types ### ACDStateType The [GetACDState] function result item. - `acd_queues` (list of ACDQueueStateType, optional) — The queues' states ### ACDQueueStateType The ACD queue state. - `acd_queue_id` (integer, optional) — The ACD queue ID - `ready_operators` (list of ACDReadyOperatorStateType, optional) — List of operators with the 'READY' state that can accept a call from this queue - `ready_operators_count` (integer, optional) — Number of ready operators - `locked_operators` (list of ACDLockedOperatorStateType, optional) — List of operators with the 'READY' state that cannot accept a call from this queue. Operator cannot accept a call if they are temporarily banned, or they are servicing a call right now - `locked_operators_count` (integer, optional) — Number of locked operators - `after_service_operators` (list of ACDAfterServiceOperatorStateType, optional) — List of operators with the 'AFTER_SERVICE' state. This state is set right after a call is ended to indicate a call postprocessing - `after_service_operator_count` (integer, optional) — Number of operators with the 'AFTER SERVICE' state - `servicing_calls` (list of ACDServicingCallStateType, optional) — List of calls enqueued into this queue that are being serviced right now by operators - `waiting_calls` (list of ACDWaitingCallStateType, optional) — List of calls enqueued into this queue that are not yet serviced by operators - `acd_queue_name` (string, optional) - `ready_operator_count` (integer, optional) - `locked_operator_count` (integer, optional) ### ACDReadyOperatorStateType The ready operator state. - `user_id` (integer, optional) — The user ID of the operator - `user_name` (string, optional) — The user name of the operator - `user_display_name` (string, optional) — The display user name of the operator - `idle_duration` (integer, optional) — The idle duration in seconds. The minimum of the duration after the last hangup and the duration after the operator status changing to READY ### ACDLockedOperatorStateType The locked operator state. - `user_id` (integer, optional) — The user ID of the operator - `user_name` (string, optional) — The user name of the operator - `user_display_name` (string, optional) — The display user name of the operator - `unreached` (string, optional) — Timestamp in YYYY-MM-DD HH:mm:ss format. The UTC time when the operator becomes unavailable in 24-h format: YYYY-MM-DD HH:mm:ss - `locks` (list of ACDLock, optional) — The operator locks - `acd_calls` (list of ACDOperatorCall, optional) — The ACD operator calls - `status` (string, optional) — The operator status string. 'BANNED' string indicates temporarily banned operators. The following values are possible: READY, BANNED ### ACDAfterServiceOperatorStateType The after service operator state. - `user_id` (integer, optional) — The user ID of the operator - `user_name` (string, optional) — The user name of the operator - `user_display_name` (string, optional) — The display user name of the operator - `status` (string, optional) — The operator status string ### ACDServicingCallStateType The servicing call state. - `user_id` (integer, optional) — The user ID of the operator - `user_name` (string, optional) — The user name of the operator - `user_display_name` (string, optional) — The display user name of the operator - `priority` (integer, optional) — The request priority - `callerid` (string, optional) — The client callerid - `begin_time` (string, optional) — Timestamp in YYYY-MM-DD HH:mm:ss format. The begin time of the request in 24-h format: YYYY-MM-DD HH:mm:ss - `waiting_time` (integer, optional) — The waiting time before servicing in seconds - `acd_session_history_id` (integer, optional) — The ACD session history ID of the request ### ACDWaitingCallStateType The waiting call state. - `user_id` (integer, optional) — The user ID of the operator to try to service the request - `user_name` (string, optional) — The user name of the operator - `user_display_name` (string, optional) — The display user name of the operator - `priority` (integer, optional) — The request priority - `callerid` (string, optional) — The client callerid - `begin_time` (string, optional) — Timestamp in YYYY-MM-DD HH:mm:ss format. The begin time of the request in 24-h format: YYYY-MM-DD HH:mm:ss - `waiting_time` (integer, optional) — The waiting time in seconds - `minutes_to_submit` (integer, optional) — The predicted minutes left to start servicing - `acd_session_history_id` (integer, optional) — The ACD session history ID of the request ### ACDLock The [ACD](/api-reference/voxengine/voxengine#enqueueacdrequest) lock type. - `id` (string, optional) — The ACD lock ID - `created` (string, optional) — Timestamp in YYYY-MM-DD HH:mm:ss format. The UTC lock created time in 24-h format: YYYY-MM-DD HH:mm:ss ### ACDOperatorCall The ACD operator call type. - `acd_session_history_id` (integer, optional) — The ACD session history ID of the request - `acd_request_id` (string, optional) — The internal ACD session history ID - `acd_queue_id` (integer, optional) — The ACD queue ID - `acd_queue_name` (string, optional) — The ACD queue name - `callerid` (string, optional) — The client callerid - `begin_time` (string, optional) — Timestamp in YYYY-MM-DD HH:mm:ss format. The begin time of the request in 24-h format: YYYY-MM-DD HH:mm:ss - `submitted` (string, optional) — Timestamp in YYYY-MM-DD HH:mm:ss format. The submission time of the request in 24-h format: YYYY-MM-DD HH:mm:ss ## Examples ### Example 1 **Response** ```json { "result": { "acd_queues": [ { "acd_queue_id": 1, "ready_operators": [ { "user_id": 661885, "user_name": "op5", "user_display_name": "op 5", "idle_duration": 212 } ], "locked_operators": [ { "user_id": 661884, "user_name": "op4", "user_display_name": "op 4", "unreached": "2014-03-26 08:09:36" }, { "user_id": 661863, "user_name": "op3", "user_display_name": "op 3", "locks": [ { "id": "577b77c8565040c5bd322af65e787302", "created": "2014-03-26 07:59:58" } ] }, { "user_id": 661866, "user_name": "op6", "user_display_name": "op 6", "locks": [ { "id": "3f2d7f188c4211e58994feff819cdc9f", "created": "2014-03-26 08:07:14" } ], "acd_calls": [ { "acd_session_history_id": 192, "acd_request_id": "95d9eddf040348f3b79454bb5379f604", "acd_queue_id": 1, "acd_queue_name": "myqueue", "callerid": "79267774411", "begin_time": "2014-03-26 08:07:12" } ] }, { "user_id": 661867, "user_name": "op7", "user_display_name": "op 7", "locks": [ { "id": "b1f1809996974a0ba2cb660c730ae5c0", "created": "2014-03-26 08:08:17" } ], "acd_calls": [ { "acd_session_history_id": 195, "acd_request_id": "edd39d292e414ecebbfd237d8ba2d7f1", "acd_queue_id": 3, "acd_queue_name": "support", "callerid": "79297704410", "begin_time": "2014-03-26 08:08:15", "submitted": "2014-03-26 08:08:25" } ] } ], "after_service_operators": [], "after_service_operator_count": 0, "servicing_calls": [], "waiting_calls": [ { "user_id": 661866, "user_name": "op6", "user_display_name": "op 6", "priority": 100, "callerid": "79267774411", "begin_time": "2014-03-26 08:07:12", "waiting_time": 146, "minutes_to_submit": 0, "acd_session_history_id": 192 } ], "acd_queue_name": "myqueue", "ready_operator_count": 1, "locked_operator_count": 4 } ] } } ``` **SDK Code** ```python Example 1 import requests url = "https://api.voximplant.com/platform_api/GetACDState" headers = {"Authorization": "Bearer "} response = requests.post(url, headers=headers) print(response.json()) ``` ```javascript Example 1 const url = 'https://api.voximplant.com/platform_api/GetACDState'; const options = {method: 'POST', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Example 1 package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.voximplant.com/platform_api/GetACDState" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Example 1 require 'uri' require 'net/http' url = URI("https://api.voximplant.com/platform_api/GetACDState") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java Example 1 import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.voximplant.com/platform_api/GetACDState") .header("Authorization", "Bearer ") .asString(); ``` ```php Example 1 request('POST', 'https://api.voximplant.com/platform_api/GetACDState', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp Example 1 using RestSharp; var client = new RestClient("https://api.voximplant.com/platform_api/GetACDState"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift Example 1 import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.voximplant.com/platform_api/GetACDState")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Example 2 **Response** ```json { "result": { "acd_queues": [ { "acd_queue_id": 1, "ready_operators": [], "locked_operators": [], "after_service_operators": [], "after_service_operator_count": 0, "servicing_calls": [ { "user_id": 661866, "user_name": "op6", "user_display_name": "op 6", "priority": 100, "callerid": "79267774411", "begin_time": "2014-03-26 08:07:12", "waiting_time": 45, "acd_session_history_id": 192 } ], "waiting_calls": [ { "priority": 100, "callerid": "79851113322", "begin_time": "2014-03-26 08:14:14", "waiting_time": 78, "minutes_to_submit": 5, "acd_session_history_id": 193 } ], "ready_operator_count": 0, "locked_operator_count": 0 } ] } } ``` **SDK Code** ```python Example 2 import requests url = "https://api.voximplant.com/platform_api/GetACDState" headers = {"Authorization": "Bearer "} response = requests.post(url, headers=headers) print(response.json()) ``` ```javascript Example 2 const url = 'https://api.voximplant.com/platform_api/GetACDState'; const options = {method: 'POST', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Example 2 package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.voximplant.com/platform_api/GetACDState" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Example 2 require 'uri' require 'net/http' url = URI("https://api.voximplant.com/platform_api/GetACDState") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java Example 2 import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.voximplant.com/platform_api/GetACDState") .header("Authorization", "Bearer ") .asString(); ``` ```php Example 2 request('POST', 'https://api.voximplant.com/platform_api/GetACDState', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp Example 2 using RestSharp; var client = new RestClient("https://api.voximplant.com/platform_api/GetACDState"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift Example 2 import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.voximplant.com/platform_api/GetACDState")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```