Informacje

Uwierzytelnianie wymagane
Format odpowiedzi json
Metoda HTTP GET

GET outbounds/:id/statuses

Ostatnia modyfikacja 2024-03-20 13:15:19
Zwraca listę wszystkich statusów w danej kampanii.

URL

https://your-system-name.thulium.com/api/outbounds/:id/statuses

Parametry

id

wymagany

Pięcioznakowy identyfikator kampanii. Przykładowa wartość: 00001

Uwagi

Pole system_status:
  • TO_CALL Do dzwonienia (świeżo dodane rekordy)
  • IN_PROGRESS Obrabiane
  • CALL Dzwonić
  • MY_RECORD Mój rekord
  • NO_CALL Nie dzwonić
  • ABANDONED_AFTER_N_TRIES Odrzucony po n próbach
  • CALL_NO_SOONER_THAN Kontakt nie wcześniej niż
  • CALL_PROGRESSIVE Dzwonić w trybie progressive (np. dla spadów w trybie predictive)

Przykładowy request

GET https://your-system-name.thulium.com/api/outbounds/00001/statuses

Przykładowy response

[
    {
        "system_status": "CALL",
        "status_id": "3",
        "dictionary_status_id": 2,
        "name": "Contact needed"
    },
    {
        "system_status": "NO_CALL",
        "status_id": "4",
        "dictionary_status_id": null,
        "name": "Not interested"
    }
}

Przykładowe wywołanie


PHP

<?php
$request 
curl_init('https://your-system-name.thulium.com/api/outbounds/00001/statuses');
curl_setopt($requestCURLOPT_HTTPHEADER, array('Content-Type: application/json; charset=utf-8'));
curl_setopt($requestCURLOPT_USERPWD"api_user:api_pass");
curl_setopt($requestCURLOPT_TIMEOUT30);
curl_setopt($requestCURLOPT_RETURNTRANSFERtrue);

$response curl_exec($request);
if (
$response) {
    
$httpCode curl_getinfo($requestCURLINFO_HTTP_CODE);
    if (
$httpCode == 200){
        
print_r(json_decode($response));
    } else {
        echo 
$response;
    }
} else {
    
trigger_error(curl_error($request), E_USER_WARNING);
}

curl_close($request);
JAVA

public class Example {
    public static void main(String[] args) throws Exception {
        ThuliumRestClient restClient = new ThuliumRestClient("api_user", "api_pass", true);

        ThuliumRestClient.ThuliumRestResponse response = restClient.get("https://your-system-name.thulium.com/api/outbounds/00001/statuses");
        System.out.println(response);
    }
}

CURL

curl -u api_user:api_pass -k -X GET -H "Accept: application/json" "https://your-system-name.thulium.com/api/outbounds/00001/statuses"

HTTPie

http -a api_user:api_pass GET https://your-system-name.thulium.com/api/outbounds/00001/statuses Accept:application/json