Informacje

Uwierzytelnianie wymagane
Format odpowiedzi json
Metoda HTTP GET

GET crm_outbounds/:id/records/:customer_id

Ostatnia modyfikacja 2026-05-28 13:55:29
Zwraca informacje o rekordzie w kampanii zasilanej z CRM.

URL

https://your-system-name.thulium.com/api/crm_outbounds/:id/records/:customer_id

Parametry

id

wymagany

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

wymagany

Identyfikator klienta zapisanego w CRM. Przykładowa wartość: 441

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/crm_outbounds/00001/records/441

Przykładowy response

{
    "record_id": 47,
    "phone_number": "158433367",
    "system_status": "NO_CALL",
    "status": "Do not call",
    "status_id": 6,
    "call_date": "2016-10-19 14:02",
    "create_date": "2016-10-18 12:02",
    "next_call_date": "",
    "agent_name": "",
    "agent_login": "",
    "customer_id": 441,
    "last_note": "Last note for record",
    "order": ""
}

Przykładowe wywołanie


PHP
<?php
$request = curl_init('https://your-system-name.thulium.com/api/crm_outbounds/00001/records/441');
curl_setopt($request, CURLOPT_HTTPHEADER, array('Content-Type: application/json; charset=utf-8'));
curl_setopt($request, CURLOPT_USERPWD, "api_user:api_pass");
curl_setopt($request, CURLOPT_TIMEOUT, 30);
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($request);
if ($response) {
    $httpCode = curl_getinfo($request, CURLINFO_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/crm_outbounds/00001/records/441");
        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/crm_outbounds/00001/records/441"

HTTPie
http -a api_user:api_pass GET https://your-system-name.thulium.com/api/crm_outbounds/00001/records/441 Accept:application/json