Parametros Generales

Api: https://www.ventana1.com/whatsapp/api/v1.0
Metodo: POST
contentType: application/x-www-form-urlencoded; charset=UTF-8

Parametros:
user: *** Provistos en el email de bienvenida
pass: *** Provistos en el email de bienvenida
command: ver Comandos
data: datos adicionales (JSON)


Comandos


Autenticacion


Obtener Codigo QR
command: AUTH/GETQR
data: blank

Retorno: html
Si esta conectado: Already Authenticated
Si no esta conectado: devuelve html del Codigo QR

Check connected
command: AUTH/CHECK
data: blank

Retorno: txt
Si esta conectado: CONNECTED
Si no esta conectado: DISCONNECTED

Desconectar
command: AUTH/DISCONNECT
data: blank

Retorno: json

			{ "status": "success"}
			


Chats

Obtener la lista de chats
command: CHATS/GETCHATS
data: blank

retorno: application/json

					{
						"status":"success",
						"message":[
							{
								"id": {
									"server": "c.us",
									"user": "549115974xxx",
									"_serialized": "549115974xxx@c.us"
								},
								"name": "Liliana",
								"isGroup": false,
								"isReadOnly": false,
								"unreadCount": 0,
								"timestamp": 1612306616,
								"archived": false,
								"pinned": true,
								"isMuted": false,
								"muteExpiration": 0
							},
							....						
						]
					}

			

Obtener mensajes de un Chat
command: CHATS/GETCHAT
data: {"celular": Nro de celular, "limit":50}

retorno: application/json

					{
						"status":"success",
						"message":[
							....						
						]
					}

			

Enviar un mensaje de texto
command: CHATS/SEND
data: {"celular": Nro de celular, "mensaje": texto del mensaje}

retorno: application/json

					{
						"status":"success",
						"message":[
							....						
						]
					}

			

Enviar una imagen
command: CHATS/SENDIMAGE
data: {"celular": Nro de celular, "image": Imagen Base64, "caption": mensaje}

retorno: application/json

					{
						"status":"success",
						"message":[
							....						
						]
					}

			

Enviar un PDF
command: CHATS/SENDPDF
data: {"celular": Nro de celular, "pdf": pdf Base64, "caption": mensaje}

retorno: application/json

					{
						"status":"success",
						"message":[
							....						
						]
					}

			

Enviar una ubicacion
command: CHATS/SENDLOCATION
data: {"celular": Nro de celular, "latitude": latitud, "longitude": longitud, "descripcion": mensaje}

retorno: application/json

					{
						"status":"success",
						"message":[
							....						
						]
					}