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…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

ExpandtitleClick here to see...

UserLoging JS

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

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

 

UserLoging C#

Code Block
language
c#
var client = new RestClient("https://
252
dominio.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
Agente1&password=123", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

 

UserLoging cURL

Code Block
curl -X POST \
  https://
252
dominio.ucontactcloud.com/Integra/resources/auth/UserLogin \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d 'user=
Agent1
Agente1&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
dominio.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 ExpandtitleClick here to see...

to Dialer

UploadBase JS

Code Block
language
js
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://
252
dominio.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
Campaña",
    "cant": "100",
    "username": "
Agent1
Agente1"
  }
}

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

 

UploadBase C#

Code Block
languagec#
var
var client = new RestClient("https://
252
dominio.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
Campaña&cant=100&username=
Agent1
Agente1", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

 

UploadBase cURL

Code Block
var client = new RestClient("https://
252
dominio.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
Campaña&cant=100&username=
Agent1
Agente1", 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
dominio.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
dominio.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
Agente1",
    "phone": "1001",
    "tech": "SIP",
    "context": "
incoming
agentes",
    "outqueue": "
1234
CampSaliente->",
    "destination": "
1002
240099111"
  }
}

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

 

AgentCall C#

Code Block
language
c#
var client = new RestClient("https://
252
dominio.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
1001&tech=SIP&context=
entrantes
agentes&outqueue=
1234
CampSaliente->&destination=
1002
240099111", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

 

AgentCall cURL

Code Block
curl -X POST \
  https://
252
dominio.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
1001&tech=SIP&context=
entrantes
agentes&outqueue=
1234
CampSaliente->&destination=
1002
240099111'

 

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
1001&tech=SIP&context=
entrantes
agentes&outqueue=
1234
CampSaliente->&destination=
1002
240099111");
Request request = new Request.Builder()
  .url("https://
252
dominio.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 =

Json object

Code Block
 {
  "
async
calldate" :
true
 "2018-10-11 15:00:00",   
"crossDomain":
 
true, "
               //Date to be executed
  "campaign" : "Sales->",                               //Bookmark Campaign
  "destination" : "098344484",                          //Destination of the call
  "alternatives" : "099124484:099121212",               //Alternative numbers
  "agentphone" : "1001",                                //Agent number if Progressive
  "data" : "Par1=Val1:Par2=Val2"                        //Values ​​for Flows and Forms
}

 

ScheduleDialerCall JS

Code Block
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://
252
dominio.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
dominio.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
dominio.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
2018-10-11 15:00:00",              //
Calldate
Fecha 
to
a 
be
ser 
executed
ejecutada
  "campaign" : "Ventas->",                         //
Dialer
Campaña de 
campaign
marcador
  "destination" : "098344484",                     //
Destination
Destino 
for
de 
the
la 
call
llamada
  "alternatives" : "099124484:099121212",          //
Alternative
Números 
phones
alternativos
  "agentphone" : "1001",                           //
Agent
Número de 
phone
agente 
if
si 
progressive
Progresivo
  "data" :  "Par1=Val1:Par2=Val2"                  //
Values
Valores 
for
para 
Forms
Flujos 
and
y 
Workflows
Formularios
}");
Request request = new Request.Builder()
  .url("https://
252
dominio.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
dominio.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
dominio.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
dominio.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 Blocklanguage

java
Code Block
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
Nombre campaña
  "destination": "098344484",              //
Destination
Número 
number
destino
  "dialerbase": "basetest",                 //
Name
Nombre 
of
lista 
the
del 
dialer List
discador
  "status": 1,                               // 1
if enable
: registro habilitado a ser marcado
  "data": "Par1=Val1:Par2=Val2",             // 
Params
Parametros 
for
para 
the
flujos 
workflow
y 
and
formularios
Forms
  
"alternatives": "098124484",               //
Alternatives
Números 
numbers
alternativos 
separated
separados 
by
con :
  "contact": 222,                            // Id 
Contactid
contacto
  "retries": 0,                              // 0 
as
ya que 
we
comenzamos 
are
a 
starting
marcar 
a
un 
new
nuevo 
phone
número
  "priority": 9999,                          // 
Priority
Prioridad 
to
del 
order
registro 
the
no 
records
usar 1 
is
ya 
used
que 
for
es 
schedule
para 
so
agendados, 
use
usar > 1
  "agentphone": "1001"                       // 
For
Para 
progressive
marcadores 
dialers
Progresivos
}");
Request request = new Request.Builder()
  .url("https://
252
dominio.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();

DrawiobaseUrlhttps://integra-scm.atlassian.net/wikidiagramNameAPI Callswidth401zoom1pageId241074198lbox1height621revision3