Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

Remember that to use the API you need

  1. Authenticate and get a token for the session

  2. Use the token in the Header Authorization

  3. End session

See more here…

Tip

In the examples:

We will use “Basic XXXX” as APIKey

We will use "252.ucontactcloud.com" as the Relative URL


Content

Table of Contents
maxLevel1




UserLogin

Expand
titleClick here to see...


UserLoging JS
Code Block
languagejs
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://252.ucontactcloud.com/Integra/resources/auth/UserLogin",
  "method": "POST",
  "headers": {
    "cache-control": "no-cache",
    "content-type": "application/x-www-form-urlencoded"
  },
  "data": {
    "user": "Agent1",
    "password": "123"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});


UserLoging C#
Code Block
languagec#
var client = new RestClient("https://252.ucontactcloud.com/Integra/resources/auth/UserLogin");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddParameter("application/x-www-form-urlencoded", "user=Agent1&password=123", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);


UserLoging cURL
Code Block
curl -X POST \
  https://252.ucontactcloud.com/Integra/resources/auth/UserLogin \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d 'user=Agent1&password=123'


UserLoging JAVA
Code Block
languagejava
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "user=Agente1&password=123");
Request request = new Request.Builder()
  .url("https://252.ucontactcloud.com/Integra/resources/auth/UserLogin")
  .post(body)
  .addHeader("content-type", "application/x-www-form-urlencoded")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();



Upload contact list for Dialers

Expand
titleClick here to see...


UploadBase JS
Code Block
languagejs
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://252.ucontactcloud.com/Integra/resources/Dialers/uploadbase",
  "method": "POST",
  "headers": {
    "authorization": "Basic XXXX",
    "cache-control": "no-cache",
    "content-type": "application/x-www-form-urlencoded"
  },
  "data": {
    "filename": "Testing1234",
    "fileb64": "Testing12345",
    "campaign": "Campaign",
    "cant": "100",
    "username": "Agent1"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});


UploadBase C#
Code Block
languagec#
var client = new RestClient("https://252.ucontactcloud.com/Integra/resources/Dialers/uploadbase");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddHeader("cache-control", "no-cache");
request.AddHeader("authorization", "Basic XXXX");
request.AddParameter("application/x-www-form-urlencoded", "filename=Testing1234&fileb64=Testing12345&campaign=Campaign&cant=100&username=Agent1", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);


UploadBase cURL
Code Block
var client = new RestClient("https://252.ucontactcloud.com/Integra/resources/Dialers/uploadbase");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddHeader("cache-control", "no-cache");
request.AddHeader("authorization", "Basic XXXX");
request.AddParameter("application/x-www-form-urlencoded", "filename=Testing1234&fileb64=Testing12345&campaign=Campaign&cant=100&username=Agent1", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);


UploadBase JAVA
Code Block
languagejava
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "filename=Testing1234&fileb64=Testing12345&campaign=Campaña&cant=100&username=Agente1");
Request request = new Request.Builder()
  .url("https://252.ucontactcloud.com/Integra/resources/Dialers/uploadbase")
  .post(body)
  .addHeader("authorization", "Basic XXXX")
  .addHeader("cache-control", "no-cache")
  .addHeader("content-type", "application/x-www-form-urlencoded")
  .build();

Response response = client.newCall(request).execute();



Start an outgoing call

Expand
titleClick here to see...


AgentCall JS
Code Block
languagejs
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://252.ucontactcloud.com/Integra/resources/Agents/AgentCall",
  "method": "POST",
  "headers": {
    "authorization": "Basic XXXX",
    "cache-control": "no-cache",
    "content-type": "application/x-www-form-urlencoded"
  },
  "data": {
    "callerid": "77778888",
    "agent": "Agent1",
    "phone": "1001",
    "tech": "SIP",
    "context": "incoming",
    "outqueue": "1234",
    "destination": "1002"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});


AgentCall C#
Code Block
languagec#
var client = new RestClient("https://252.ucontactcloud.com/Integra/resources/Agents/AgentCall");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddHeader("cache-control", "no-cache");
request.AddHeader("authorization", "Basic XXXX");
request.AddParameter("application/x-www-form-urlencoded", "callerid=77778888&agent=Agente1&phone=1122&tech=SIP&context=entrantes&outqueue=1234&destination=1002", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);


AgentCall cURL
Code Block
curl -X POST \
  https://252.ucontactcloud.com/Integra/resources/Agents/AgentCall \
  -H 'authorization: Basic XXXX' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d 'callerid=77778888&agent=Agente1&phone=1122&tech=SIP&context=entrantes&outqueue=1234&destination=1002'


AgentCall JAVA
Code Block
languagejava
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "callerid=77778888&agent=Agente1&phone=1122&tech=SIP&context=entrantes&outqueue=1234&destination=1002");
Request request = new Request.Builder()
  .url("https://252.ucontactcloud.com/Integra/resources/Agents/AgentCall")
  .post(body)
  .addHeader("authorization", "Basic XXXX")
  .addHeader("cache-control", "no-cache")
  .addHeader("content-type", "application/x-www-form-urlencoded")
  .build();

Response response = client.newCall(request).execute();



Schedule call

Expand
titleClick here to see...


ScheduleDialerCall JS
Code Block
languagejs
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://252.ucontactcloud.com/Integra/resources/Dialers/ScheduleDialerCall",
  "method": "POST",
  "headers": {
    "authorization": "Basic XXXX",
    "cache-control": "no-cache",
    "content-type": "application/x-www-form-urlencoded"
  },
  "data": {
    "callschedule": "Testing123.json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});


ScheduleDialerCall C#
Code Block
languagec#
var client = new RestClient("https://252.ucontactcloud.com/Integra/resources/Dialers/ScheduleDialerCall");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddHeader("cache-control", "no-cache");
request.AddHeader("authorization", "Basic XXXX");
request.AddParameter("application/x-www-form-urlencoded", "callschedule=Testing123.json", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);


ScheduleDialerCall cURL
Code Block
curl -X POST \
  https://252.ucontactcloud.com/Integra/resources/Dialers/ScheduleDialerCall \
  -H 'authorization: Basic XXXX' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d callschedule=Testing123.json


ScheduleDialerCall JAVA
Code Block
languagejava
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "callschedule={
  "calldate" : "2015-10-11 15:00:00",              //Calldate to be executed
  "campaign" : "Ventas->",                         //Dialer campaign
  "destination" : "098344484",                     //Destination for the call
  "alternatives" : "099124484:099121212",          //Alternative phones
  "agentphone" : "1001",                           //Agent phone if progressive
  "data" :  "Par1=Val1:Par2=Val2"                  //Values for Forms and Workflows
}");
Request request = new Request.Builder()
  .url("https://252.ucontactcloud.com/Integra/resources/Dialers/ScheduleDialerCall")
  .post(body)
  .addHeader("authorization", "Basic XXXX")
  .addHeader("cache-control", "no-cache")
  .addHeader("content-type", "application/x-www-form-urlencoded")
  .build();

Response response = client.newCall(request).execute();



Respool call

Expand
titleClick here to see...


Respool JS
Code Block
languagejs
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://252.ucontactcloud.com/Integra/resources/Dialers/Respool",
  "method": "POST",
  "headers": {
    "authorization": "Basic XXXX",
    "cache-control": "no-cache",
    "content-type": "application/x-www-form-urlencoded"
  },
  "data": {
    "callspool": "{
  		"campaign": "Ventas->",                  //Nombre campaña
  		"destination": "098344484",              //Número destino
  		"dialerbase": "basetest",                 //Nombre lista del discador
  		"status": 1,                               // 1 registro habilitado a ser marcado
  		"data": "Par1=Val1:Par2=Val2",             // Parametros para flujos y formularios
  		"alternatives": "098124484",               // Números alternativos separados con :
  		"contact": 222,                            // Id contacto
  		"retries": 0,                              // 0 ya que comenzamos a marcar un nuevo número
  		"priority": 9999,                          // Prioridad del registro no usar 1 ya que es para agendados, usar > 1
  		"agentphone": "1001"                       // Para marcadores Progresivos
	}"
  }
}


Respool C#
Code Block
languagec#
var client = new RestClient("https://252.ucontactcloud.com/Integra/resources/Dialers/Respool");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddHeader("cache-control", "no-cache");
request.AddHeader("authorization", "Basic XXXX");
request.AddParameter("application/x-www-form-urlencoded", "callspool= 
"campaign": "Ventas->",                  //Nombre campaña
  "destination": "098344484",              //Número destino
  "dialerbase": "basetest",                 //Nombre lista del discador
  "status": 1,                               // 1 registro habilitado a ser marcado
  "data": "Par1=Val1:Par2=Val2",             // Parametros para flujos y formularios
  "alternatives": "098124484",               // Números alternativos separados con :
  "contact": 222,                            // Id contacto
  "retries": 0,                              // 0 ya que comenzamos a marcar un nuevo número
  "priority": 9999,                          // Prioridad del registro no usar 1 ya que es para agendados, usar > 1
  "agentphone": "1001"                       // Para marcadores Progresivos", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);


Respool cURL
Code Block
curl -X POST \
  https://252.ucontactcloud.com/Integra/resources/Dialers/Respool \
  -H 'authorization: Basic XXXX' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d callspool= "campaign": "Ventas->",                  //Nombre campaña
  "destination": "098344484",              //Número destino
  "dialerbase": "basetest",                 //Nombre lista del discador
  "status": 1,                               // 1 registro habilitado a ser marcado
  "data": "Par1=Val1:Par2=Val2",             // Parametros para flujos y formularios
  "alternatives": "098124484",               // Números alternativos separados con :
  "contact": 222,                            // Id contacto
  "retries": 0,                              // 0 ya que comenzamos a marcar un nuevo número
  "priority": 9999,                          // Prioridad del registro no usar 1 ya que es para agendados, usar > 1
  "agentphone": "1001"                       // Para marcadores Progresivos


Respool JAVA
Code Block
languagejava
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "callspool={
 
  "campaign": "Ventas->",                  //Name of the campaign
  "destination": "098344484",              //Destination number
  "dialerbase": "basetest",                 //Name of the dialer List
  "status": 1,                               // 1 if enable
  "data": "Par1=Val1:Par2=Val2",             // Params for the workflow and Forms
  "alternatives": "098124484",               //Alternatives numbers separated by :
  "contact": 222,                            // Contactid
  "retries": 0,                              // 0 as we are starting a new phone
  "priority": 9999,                          // Priority to order the records 1 is used for schedule so use > 1
  "agentphone": "1001"                       // For progressive dialers
}");
Request request = new Request.Builder()
  .url("https://252.ucontactcloud.com/Integra/resources/Dialers/Respool")
  .post(body)
  .addHeader("authorization", "Basic XXXX")
  .addHeader("cache-control", "no-cache")
  .addHeader("content-type", "application/x-www-form-urlencoded")
  .build();

Response response = client.newCall(request).execute();



Drawio
baseUrlhttps://integra-scm.atlassian.net/wiki
diagramNameAPI Calls
width401
zoom1
pageId241074198
lbox1
height621
revision3height621