Puedes obtener los cajeros y gerentes que has creado, con el fin de poder asignarles las transacciones que realices cuando uses la API. Obtendrás el valor usertool_id que es requerido para algunos otros métodos.
Atributo | Descripción | Tipo de Dato |
apikey | Obligatorio Clave API generada en la sección de integraciones dentro del panel. |
Text |
curl -X POST "/toolusers/get" -H "apikey: your_apikey" -d ""
$params = array();
$headers = array(
"apikey: your_apikey"
);
curl_setopt_array($ch = curl_init(), array(
CURLOPT_URL => "/toolusers/get",
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_HEADER => 0,
CURLOPT_HTTPHEADER => $headers,
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => http_build_query($params),
CURLOPT_RETURNTRANSFER => 1
));
$response = curl_exec($ch);
curl_close($ch);
echo json_encode($response);
require 'net/http'
require 'uri'
uri = URI.parse("/toolusers/get")
headers = {
"apikey": your_apikey
}
request = Net::HTTP::Post.new(uri, headers)
request.set_form_data()
req_options = {
use_ssl: uri.scheme == "https",
}
response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(request)
end
puts response.body
var request = (HttpWebRequest)WebRequest.Create("/toolusers/get");
var postData = "";
var data = Encoding.ASCII.GetBytes(postData);
Console.WriteLine(postData.ToString());
request.Method = "POST";
request.Headers["apikey"] = your_apikey;
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = data.Length;
using (var stream = request.GetRequestStream())
{
stream.Write(data, 0, data.Length);
}
var response = (HttpWebResponse)request.GetResponse();
var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd();
Console.WriteLine(responseString);
var request = require('request');
var targetURL = '/toolusers/get'
var response = request.post(
{
url: targetURL,
headers: {
"apikey": your_apikey
},
form: {
}
}, (err, res, body) => {
if(err == null){
console.log(body);
}
}
);
import requests
targetURL = "/toolusers/get"
headers = {
'apikey':your_apikey
}
data = {}
r = requests.post(url = targetURL, data = data, headers = headers)
print(r.text)
No available
No available
No available
{ "success": true, "result": [ { "usertool_id": usertool_id, "usertool_name": usertool_name, "usertool_number": usertool_number, "usertool_branch": usertool_branch, "usertool_type": usertool_type, "usertool_status": usertool_status } ], "code": "tool_users_01" }
Puedes obtener los monederos que has creado con tu usuario, con el fin de poder utilizar la API, ya que el wallet_key es un valor necesario para tus peticiones.
Atributo | Descripción | Tipo de Dato |
apikey | Obligatorio Clave API generada en la sección de integraciones dentro del panel. |
Text |
curl -X POST "/wallet/get" -H "apikey: your_apikey" -d ""
$params = array();
$headers = array(
"apikey: your_apikey"
);
curl_setopt_array($ch = curl_init(), array(
CURLOPT_URL => "/wallet/get",
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_HEADER => 0,
CURLOPT_HTTPHEADER => $headers,
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => http_build_query($params),
CURLOPT_RETURNTRANSFER => 1
));
$response = curl_exec($ch);
curl_close($ch);
echo json_encode($response);
require 'net/http'
require 'uri'
uri = URI.parse("/wallet/get")
headers = {
"apikey": your_apikey
}
request = Net::HTTP::Post.new(uri, headers)
request.set_form_data()
req_options = {
use_ssl: uri.scheme == "https",
}
response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(request)
end
puts response.body
var request = (HttpWebRequest)WebRequest.Create("/wallet/get");
var postData = "";
var data = Encoding.ASCII.GetBytes(postData);
Console.WriteLine(postData.ToString());
request.Method = "POST";
request.Headers["apikey"] = your_apikey;
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = data.Length;
using (var stream = request.GetRequestStream())
{
stream.Write(data, 0, data.Length);
}
var response = (HttpWebResponse)request.GetResponse();
var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd();
Console.WriteLine(responseString);
var request = require('request');
var targetURL = '/wallet/get'
var response = request.post(
{
url: targetURL,
headers: {
"apikey": your_apikey
},
form: {}
}, (err, res, body) => {
if(err == null){
console.log(body);
}
}
);
import requests
targetURL = "/wallet/get"
headers = {
'apikey':your_apikey
}
data = {}
r = requests.post(url = targetURL, data = data, headers = headers)
print(r.text)
No available
No available
No available
{ "success": true, "result": [ { "wallet_name": your_wallet_name, "wallet_key": your_wallet_key, "wallet_app_client": your_wallet_app_client, "wallet_app_redeem": your_wallet_app_redeem } ], "status": 200, "code": "wallets_get_01" }
Este método te permitirá dar de alta usuarios para que puedan usar tu monedero, al completarse el alta, el cliente recibirá un mensaje SMS o WhatsApp que contiene el link para ingresar a su nueva cuenta.
Atributo | Descripción | Tipo de Dato |
apikey | Obligatorio Clave API generada en la sección de integraciones dentro del panel. |
Text |
Atributo | Descripción | Tipo de Dato |
wallet_key | Obligatorio
Llave del monedero.
|
Text |
phone | Obligatorio Número a 10 digitos del cliente a registrar 4771234567 |
Text |
customer_name | Obligatorio Nombre del cliente |
Text |
usertool_id | Obligatorio Id del cajero o gerente que realiza la transacción. (Se obtiene con el método: Obtener usuarios) |
Number |
customer_birthdate | Opcional Fecha de cumpleaños del cliente, en caso que el monedero lo necesite. YYYY-MM-DD HH-MM-DD |
Text |
Código | Mensaje |
auth_01 | Usuario no autorizado |
contact_add_02, wallet_manager_03 | Llave de monedero indefinido. |
contact_add_03, wallet_manager_04 | Teléfono indefinido. |
contact_add_04 | Teléfono con formato incorrecto. |
contact_add_05, wallet_manager_05 | Nombre indefinido. |
contact_add_06, wallet_manager_06 | Usuario indefinido. |
contact_add_07, wallet_manager_07 | Monedero no existe |
wallet_manager_08, wallet_manager_13 | El usuario ya se encuentra registrado |
wallet_manager_15 | Lada no soportada |
wallet_manager_09 | Error en formato de fecha de cumpleaños |
wallet_manager_10 | Error generar el contacto nuevo |
wallet_manager_11 | Saldo insuficiente |
wallet_manager_12 | Error al actualizar el estatus del contacto |
wallet_manager_14 | Teléfono es de casa o fijo |
wallet_manager_18 | No cuentas con clientes disponibles. |
curl -X POST "/wallet/contact/add" -H "apikey: your_apikey" -d "wallet_key=your_wallet_key&phone=client_phone_number&customer_name=client_name&usertool_id=cashier_id"
$params = array(
"wallet_key" => your_wallet_key,
"phone" => client_phone_number,
"customer_name" => client_name,
"usertool_id" => cashier_id
);
$headers = array(
"apikey: your_apikey"
);
curl_setopt_array($ch = curl_init(), array(
CURLOPT_URL => "/wallet/contact/add",
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_HEADER => 0,
CURLOPT_HTTPHEADER => $headers,
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => http_build_query($params),
CURLOPT_RETURNTRANSFER => 1
));
$response = curl_exec($ch);
curl_close($ch);
echo json_encode($response);
require 'net/http'
require 'uri'
uri = URI.parse("/wallet/contact/add")
headers = {
"apikey": your_apikey
}
request = Net::HTTP::Post.new(uri, headers)
request.set_form_data(
"wallet_key" => your_wallet_key,
"phone" => client_phone_number,
"customer_name" => client_name,
"usertool_id" => cashier_id
)
req_options = {
use_ssl: uri.scheme == "https",
}
response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(request)
end
puts response.body
var request = (HttpWebRequest)WebRequest.Create("/wallet/contact/add");
var postData = "wallet_key=your_wallet_key&";
postData += "phone=client_phone_number&";
postData += "customer_name=client_name&";
postData += "usertool_id=cashier_id";
var data = Encoding.ASCII.GetBytes(postData);
Console.WriteLine(postData.ToString());
request.Method = "POST";
request.Headers["apikey"] = your_apikey;
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = data.Length;
using (var stream = request.GetRequestStream())
{
stream.Write(data, 0, data.Length);
}
var response = (HttpWebResponse)request.GetResponse();
var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd();
Console.WriteLine(responseString);
var request = require('request');
var targetURL = '/wallet/contact/add'
var response = request.post(
{
url: targetURL,
headers: {
"apikey": your_apikey
},
form: {
"wallet_key": your_wallet_key,
"phone": client_phone_number,
"customer_name": client_name,
"usertool_id": cashier_id
}
}, (err, res, body) => {
if(err == null){
console.log(body);
}
}
);
import requests
targetURL = "/wallet/contact/add"
headers = {
'apikey':your_apikey
}
data = {
'wallet_key':your_wallet_key,
'phone':client_phone_number,
'customer_name':client_name,
'usertool_id':cashier_id
}
r = requests.post(url = targetURL, data = data, headers = headers)
print(r.text)
No available
No available
No available
{ "success": true, "message": "Contacto creado correctamente.", "status": 200, "code": "contact_add_01" }
Este método te permite obtener un listado de los contactos registrados en tu monedero y sus datos. También podrás solicitar los datos de un contacto específico.
Atributo | Descripción | Tipo de Dato |
apikey | Obligatorio Clave API generada en la sección de integraciones dentro del panel. |
Text |
Atributo | Descripción | Tipo de Dato |
wallet_key | Obligatorio
Llave del monedero.
|
Text |
phone | Opcional Número a 10 digitos del cliente a consultar 4771234567 |
Text |
Código | Mensaje |
auth_01 | Usuario no autorizado |
balance_get_02, wallet_balance_get_02 | Llave de monedero indefinido. |
balance_get_03 | Teléfono con formato incorrecto. |
balance_get_04 | El contacto no se encuentra registrado en el monedero. |
curl -X POST "/wallet/contact/get" -H "apikey: your_apikey" -d "wallet_key=your_wallet_key"
$params = array(
"wallet_key" => your_wallet_key
);
$headers = array(
"apikey: your_apikey"
);
curl_setopt_array($ch = curl_init(), array(
CURLOPT_URL => "/wallet/contact/get",
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_HEADER => 0,
CURLOPT_HTTPHEADER => $headers,
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => http_build_query($params),
CURLOPT_RETURNTRANSFER => 1
));
$response = curl_exec($ch);
curl_close($ch);
echo json_encode($response);
require 'net/http'
require 'uri'
uri = URI.parse("/wallet/contact/get")
headers = {
"apikey": your_apikey
}
request = Net::HTTP::Post.new(uri, headers)
request.set_form_data(
"wallet_key" => your_wallet_key
)
req_options = {
use_ssl: uri.scheme == "https",
}
response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(request)
end
puts response.body
var request = (HttpWebRequest)WebRequest.Create("/wallet/contact/get");
var postData = "wallet_key=your_wallet_key";
var data = Encoding.ASCII.GetBytes(postData);
Console.WriteLine(postData.ToString());
request.Method = "POST";
request.Headers["apikey"] = your_apikey;
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = data.Length;
using (var stream = request.GetRequestStream())
{
stream.Write(data, 0, data.Length);
}
var response = (HttpWebResponse)request.GetResponse();
var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd();
Console.WriteLine(responseString);
var request = require('request');
var targetURL = '/wallet/contact/get'
var response = request.post(
{
url: targetURL,
headers: {
"apikey": your_apikey
},
form: {
"wallet_key": your_wallet_key
}
}, (err, res, body) => {
if(err == null){
console.log(body);
}
}
);
import requests
targetURL = "/wallet/contact/get"
headers = {
'apikey':your_apikey
}
data = {
'wallet_key':your_wallet_key
}
r = requests.post(url = targetURL, data = data, headers = headers)
print(r.text)
No available
No available
No available
{ "success": true, "result": [ { "contact_name": contact_name, "contact_phone": contact_phone, "contact_birthdate": contact_birthdate, "contact_balance": contact_balance } ] "status": 200, "code": "balance_get_01" } O en caso de buscar un contacto en específico { "success": true, "result": { "contact_name": contact_name, "contact_phone": contact_phone, "contact_birthdate": contact_birthdate, "contact_balance": contact_balance } "status": 200, "code": "balance_get_01" }
Puedes generar una nueva venta basada en el porcentaje con el que se configuró tu monedero. Ingresarás el monto total de compra del cliente y el sistema hará el cálculo del porcentaje. Utiliza este método para abonar o hacer uso del saldo en el monedero de tu cliente.
Atributo | Descripción | Tipo de Dato |
apikey | Obligatorio Clave API generada en la sección de integraciones dentro del panel. |
Text |
Atributo | Descripción | Tipo de Dato |
wallet_key | Obligatorio
Llave del monedero.
|
Text |
phone | Obligatorio Número a 10 digitos del cliente a consultar 4771234567 |
Text |
usertool_id | Obligatorio Id del cajero o gerente que realiza la transacción. (Se obtiene con el método: Obtener usuarios) |
Text |
transaction_type | Obligatorio
Tipo de transacción a realizar. 0 Agregar saldo 1 Usar saldo
|
Number |
transaction_amount | Opcional Monto de la venta, este dato es necesario si el transaction_type es 0, en caso de usar otro tipo es opcional. |
Number |
ticket | Opcional En caso de que el monedero tenga configurado el ticket, este valor es obligatorio. |
Text |
points_used | Opcional Puntos a utilizar por la venta, este dato es necesario si el transaction_type es 1, en caso de usar otro tipo este valor no es necesario. |
Number |
Código | Mensaje |
auth_01 | Usuario no autorizado |
new_sale_02, wallet_redeem_02 | Llave de monedero indefinido. |
new_sale_03 | Teléfono indefinido. |
new_sale_04 | Teléfono con formato incorrecto. |
new_sale_05, wallet_redeem_06 | Tipo de transacción indefinido. |
new_sale_06 | Monto de transacción indefinido. |
new_sale_07, wallet_redeem_03 | Monto de transacción con formato incorrecto. |
new_sale_08, wallet_redeem_07 | Puntos a utilizar con formato incorrecto. |
new_sale_09 | Id del usuario indefinido. |
new_sale_10 | Monedero no existe. |
new_sale_11, wallet_redeem_12 | Ticket indefinido. |
new_sale_12 | El contacto no se encuentra registrado en el monedero. |
new_sale_13, wallet_redeem_15 | El usuario de la herramienta no pertenece al usuario de la apikey. |
new_sale_14, wallet_redeem_16 | El usuario de la herramienta no tiene permisos sobre el monedero. |
wallet_redeem_10 | Los puntos a utilizar son mayores a los disponibles. |
wallet_redeem_13 | Saldo insuficiente |
wallet_redeem_14 | Número de teléfono se encuentra en tu blacklist. |
wallet_redeem_18 | No cuentas con canjes disponibles. |
curl -X POST "/wallet/sale" -H "apikey: your_apikey" -d "wallet_key=your_wallet_key&phone=client_phone_number&transaction_type=0&transaction_amount=1000&usertool_id=cashier_id"
$params = array(
"wallet_key" => your_wallet_key,
"phone" => client_phone_number,
"transaction_type" => 0,
"transaction_amount" => 1000,
"usertool_id" => cashier_id
);
$headers = array(
"apikey: your_apikey"
);
curl_setopt_array($ch = curl_init(), array(
CURLOPT_URL => "/wallet/sale",
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_HEADER => 0,
CURLOPT_HTTPHEADER => $headers,
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => http_build_query($params),
CURLOPT_RETURNTRANSFER => 1
));
$response = curl_exec($ch);
curl_close($ch);
echo json_encode($response);
require 'net/http'
require 'uri'
uri = URI.parse("/wallet/sale")
headers = {
"apikey": your_apikey
}
request = Net::HTTP::Post.new(uri, headers)
request.set_form_data(
"wallet_key" => your_wallet_key,
"phone" => client_phone_number,
"transaction_type" => 0,
"transaction_amount" => 1000,
"usertool_id" => cashier_id
)
req_options = {
use_ssl: uri.scheme == "https",
}
response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(request)
end
puts response.body
var request = (HttpWebRequest)WebRequest.Create("/wallet/sale");
var postData = "wallet_key=your_wallet_key&";
postData += "phone=client_phone_number&";
postData += "transaction_type=0&";
postData += "transaction_amount=1000&";
postData += "usertool_id=cashier_id";
var data = Encoding.ASCII.GetBytes(postData);
Console.WriteLine(postData.ToString());
request.Method = "POST";
request.Headers["apikey"] = your_apikey;
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = data.Length;
using (var stream = request.GetRequestStream())
{
stream.Write(data, 0, data.Length);
}
var response = (HttpWebResponse)request.GetResponse();
var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd();
Console.WriteLine(responseString);
var request = require('request');
var targetURL = '/wallet/sale'
var response = request.post(
{
url: targetURL,
headers: {
"apikey": your_apikey
},
form: {
"wallet_key": your_wallet_key,
"phone": client_phone_number,
"transaction_type": 0,
"transaction_amount": 1000,
"usertool_id": cashier_id
}
}, (err, res, body) => {
if(err == null){
console.log(body);
}
}
);
import requests
targetURL = "/wallet/sale"
headers = {
'apikey':your_apikey
}
data = {
'wallet_key':your_wallet_key,
'phone': client_phone_number,
'transaction_type': 0,
'transaction_amount': 1000,
'usertool_id': cashier_id
}
r = requests.post(url = targetURL, data = data, headers = headers)
print(r.text)
No available
No available
No available
{ "success": true, "message": "Venta creada correctamente.", "newBalance": puntos_actuales_del_contacto, "code": "new_sale_01", "status": 200 }
Utiliza este método si deseas agregar o restar saldo directamente a un cliente sin considerar un porcentaje. Este método es útil cuando se venden recargas al cliente o cuando se desea restar saldo debido a una devolución o corrección.
Atributo | Descripción | Tipo de Dato |
apikey | Obligatorio Clave API generada en la sección de integraciones dentro del panel. |
Text |
Atributo | Descripción | Tipo de Dato |
wallet_key | Obligatorio
Llave del monedero.
|
Text |
phone | Obligatorio Número a 10 digitos del cliente a consultar 4771234567 |
Text |
transaction_type | Obligatorio
Tipo de transacción a realizar. 0 Agregar saldo 1 Remover saldo
|
Number |
transaction_amount | Obligatorio Puntos a modificar. |
Number |
usertool_id | Obligatorio Id del cajero o gerente que realiza la transacción. (Se obtiene con el método: Obtener usuarios) |
Text |
Código | Mensaje |
auth_01 | Usuario no autorizado |
balance_update_02, wallet_balance_update_02 | Llave de monedero indefinido. |
balance_update_03 | Teléfono indefinido. |
balance_update_04 | Teléfono con formato incorrecto. |
balance_update_05, wallet_balance_update_04 | Tipo de transacción indefinido. |
balance_update_06 | Monto de transacción indefinido. |
balance_update_07, wallet_balance_update_05 | Monto de transacción con formato incorrecto. |
balance_update_08 | Id del usuario indefinido. |
balance_update_09 | Monedero no existe. |
balance_update_10 | El contacto no se encuentra registrado en el monedero. |
wallet_balance_update_07 | Los puntos a remover son mayores a los disponibles. |
wallet_balance_update_09 | Saldo insuficiente |
wallet_balance_update_10 | Número de teléfono se encuentra en tu blacklist. |
balance_update_11, wallet_balance_update_11 | El usuario de la herramienta no pertenece al usuario de la apikey. |
balance_update_12, wallet_balance_update_12 | El usuario de la herramienta no tiene permisos sobre el monedero. |
curl -X POST "/wallet/balance/update" -H "apikey: your_apikey" -d "wallet_key=your_wallet_key&phone=client_phone_number&transaction_type=0&transaction_amount=1000&usertool_id=cashier_id"
$params = array(
"wallet_key" => your_wallet_key,
"phone" => client_phone_number,
"transaction_type" => 0,
"transaction_amount" => 1000,
"usertool_id" => cashier_id
);
$headers = array(
"apikey: your_apikey"
);
curl_setopt_array($ch = curl_init(), array(
CURLOPT_URL => "/wallet/balance/update",
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_HEADER => 0,
CURLOPT_HTTPHEADER => $headers,
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => http_build_query($params),
CURLOPT_RETURNTRANSFER => 1
));
$response = curl_exec($ch);
curl_close($ch);
echo json_encode($response);
require 'net/http'
require 'uri'
uri = URI.parse("/wallet/balance/update")
headers = {
"apikey": your_apikey
}
request = Net::HTTP::Post.new(uri, headers)
request.set_form_data(
"wallet_key" => your_wallet_key,
"phone" => client_phone_number,
"transaction_type" => 0,
"transaction_amount" => 1000,
"usertool_id" => cashier_id
)
req_options = {
use_ssl: uri.scheme == "https",
}
response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(request)
end
puts response.body
var request = (HttpWebRequest)WebRequest.Create("/wallet/balance/update");
var postData = "wallet_key=your_wallet_key&";
postData += "phone=client_phone_number&";
postData += "transaction_type=0&";
postData += "transaction_amount=1000&";
postData += "usertool_id=cashier_id";
var data = Encoding.ASCII.GetBytes(postData);
Console.WriteLine(postData.ToString());
request.Method = "POST";
request.Headers["apikey"] = your_apikey;
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = data.Length;
using (var stream = request.GetRequestStream())
{
stream.Write(data, 0, data.Length);
}
var response = (HttpWebResponse)request.GetResponse();
var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd();
Console.WriteLine(responseString);
var request = require('request');
var targetURL = '/wallet/balance/update'
var response = request.post(
{
url: targetURL,
headers: {
"apikey": your_apikey
},
form: {
"wallet_key": your_wallet_key,
"phone": client_phone_number,
"transaction_type": 0,
"transaction_amount": 1000,
"usertool_id": cashier_id
}
}, (err, res, body) => {
if(err == null){
console.log(body);
}
}
);
import requests
targetURL = "/wallet/balance/update"
headers = {
'apikey':your_apikey
}
data = {
'wallet_key':your_wallet_key,
'phone': client_phone_number,
'transaction_type': 0,
'transaction_amount': 1000,
'usertool_id': cashier_id
}
r = requests.post(url = targetURL, data = data, headers = headers)
print(r.text)
No available
No available
No available
{ "success": true, "message": "Saldo actualizado correctamente", "newBalance": puntos_actuales_del_contacto, "code": "balance_update_01", "status": 200 }
Registra un nuevo colaborador para trabajar con tus herramientas.
Atributo | Descripción | Tipo de Dato |
apikey | Obligatorio Clave API generada en la sección de integraciones dentro del panel. |
Text |
Atributo | Descripción | Tipo de Dato |
type | Obligatorio
Rol del colaborador: cajero gerente
|
Text |
employee_name | Obligatorio Nombre del colaborador 4771234567 |
Text |
business_name | Obligatorio Nombre de la sucursal / negocio donde trabaja |
Text |
number | Obligatorio Celular del colaborador |
Number |
password | Obligatorio Contraseña con la que ingresará |
Text |
Código | Mensaje |
err_toolusers_01 | Error al procesar la petición |
err_toolusers_02 | Parámetro inválido. |
err_toolusers_03 | Ya existe un usuario con el mismo nombre o password |
err_toolusers_04 | Error al crear el usuario. |
toolusers_01 | Usuario creado con éxito. |
curl -X POST "/employee/add" -H "apikey: your_apikey" -d "type=cajero&number=employee_number&employee_name=employee_name&business_name=business_name&password=employee_password"
$params = array(
"type" => cajero,
"number" => employee_number,
"employee_name" => employee_name,
"business_name" => employee_business,
"password" => employee_password
);
$headers = array(
"apikey: your_apikey"
);
curl_setopt_array($ch = curl_init(), array(
CURLOPT_URL => "/employee/add",
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_HEADER => 0,
CURLOPT_HTTPHEADER => $headers,
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => http_build_query($params),
CURLOPT_RETURNTRANSFER => 1
));
$response = curl_exec($ch);
curl_close($ch);
echo json_encode($response);
require 'net/http'
require 'uri'
uri = URI.parse("/employee/add")
headers = {
"apikey": your_apikey
}
request = Net::HTTP::Post.new(uri, headers)
request.set_form_data(
"type" => cajero,
"number" => employee_number,
"employee_name" => employee_name,
"business_name" => employee_business,
"password" => employee_password
)
req_options = {
use_ssl: uri.scheme == "https",
}
response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(request)
end
puts response.body
var request = (HttpWebRequest)WebRequest.Create("/employee/add");
var postData = "type=cajero&";
postData += "number=employee_number&";
postData += "employee_name=employee_name&";
postData += "business_name=employee_business&";
postData += "password=employee_password";
var data = Encoding.ASCII.GetBytes(postData);
Console.WriteLine(postData.ToString());
request.Method = "POST";
request.Headers["apikey"] = your_apikey;
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = data.Length;
using (var stream = request.GetRequestStream())
{
stream.Write(data, 0, data.Length);
}
var response = (HttpWebResponse)request.GetResponse();
var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd();
Console.WriteLine(responseString);
var request = require('request');
var targetURL = '/employee/add'
var response = request.post(
{
url: targetURL,
headers: {
"apikey": your_apikey
},
form: {
"type" =:cajero,
"number" : employee_number,
"employee_name" : employee_name,
"business_name" : employee_business,
"password" : employee_password
}
}, (err, res, body) => {
if(err == null){
console.log(body);
}
}
);
import requests
targetURL = "/employee/add"
headers = {
'apikey':your_apikey
}
data = {
'type' =:cajero,
'number' : employee_number,
'employee_name' : employee_name,
'business_name' : employee_business,
'password' : employee_password
}
r = requests.post(url = targetURL, data = data, headers = headers)
print(r.text)
No available
No available
No available
{ "success": true, "message": "Usuario creado con éxito.", "collaboratorId": 8141, "status": 200, "code": "toolusers_01" }
Registra un nuevo colaborador para trabajar con tus herramientas.
Atributo | Descripción | Tipo de Dato |
apikey | Obligatorio Clave API generada en la sección de integraciones dentro del panel. |
Text |
Atributo | Descripción | Tipo de Dato |
number | Obligatorio Celular del colaborador |
Number |
Código | Mensaje |
err_toolusers_01 | Error al procesar la petición |
err_toolusers_02 | Parámetro inválido. |
err_toolusers_04 | Error al archivar el usuario. |
toolusers_01 | Se archivó correctamente el usuario. |
curl -X POST "/employee/disable" -H "apikey: your_apikey" -d "type=cajero&number=employee_number&employee_name=employee_name&business_name=business_name&password=employee_password"
$params = array(
"number" => employee_number
);
$headers = array(
"apikey: your_apikey"
);
curl_setopt_array($ch = curl_init(), array(
CURLOPT_URL => "/employee/disable",
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_HEADER => 0,
CURLOPT_HTTPHEADER => $headers,
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => http_build_query($params),
CURLOPT_RETURNTRANSFER => 1
));
$response = curl_exec($ch);
curl_close($ch);
echo json_encode($response);
require 'net/http'
require 'uri'
uri = URI.parse("/employee/disable")
headers = {
"apikey": your_apikey
}
request = Net::HTTP::Post.new(uri, headers)
request.set_form_data(
"number" => employee_number,
)
req_options = {
use_ssl: uri.scheme == "https",
}
response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(request)
end
puts response.body
var request = (HttpWebRequest)WebRequest.Create("/employee/disable");
var postData = "number=employee_number";
var data = Encoding.ASCII.GetBytes(postData);
Console.WriteLine(postData.ToString());
request.Method = "POST";
request.Headers["apikey"] = your_apikey;
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = data.Length;
using (var stream = request.GetRequestStream())
{
stream.Write(data, 0, data.Length);
}
var response = (HttpWebResponse)request.GetResponse();
var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd();
Console.WriteLine(responseString);
var request = require('request');
var targetURL = '/employee/disable'
var response = request.post(
{
url: targetURL,
headers: {
"apikey": your_apikey
},
form: {
"number" : employee_number,
}
}, (err, res, body) => {
if(err == null){
console.log(body);
}
}
);
import requests
targetURL = "/employee/disable"
headers = {
'apikey':your_apikey
}
data = {
'number' : employee_number
}
r = requests.post(url = targetURL, data = data, headers = headers)
print(r.text)
No available
No available
No available
{ "success": true, "message": "Se archivó correctamente el usuario.", "status": 200, "code": "toolusers_01" }