_sendMessToPortal2

(API version 2.0)

int _sendMessToPortal2 ( string kodf , string username , string pass , int caridFrom , int typemess , string text , float ew , float el , int kodmess , string datemess , int iddriver [ , string spoludriver ] )

Description

Function sends message (or driver's status) from vehicle to the portal.

Categories

Parameters

string kodf
company code
string username
user name
string pass
password
int caridFrom
vehicle ID
int typemess
0 - message
1 - driver's status (AETR)
2 - start / end message about transport routes in Spedition
string text
message, AETR - status, typemess=2 fill in ID delivery
float ew
latitude (for non position message fill in 0)
float el
longitude (for non position message fill in 0)
int kodmess
AETR only, ordinary message = 0, for AETR it is numerical code of driver's status.

typemess=2 fill in: 1 - start, 2 - stop
string datemess
date and time (GMT), for when status is valid.
int iddriver
Driver's ID
string spoludriver
index of co-driver
1 - co-driver
blank or "0" - driver

Return value

int

> 0 - OK - Message ID
1 - Message was written to driver's status
0 - user not logged in
-1 - Vehicle does not exist or the user has no rights for the vehicle
-2 - Message could not be written to the database, please try again later
-4 - User does not have "user" rights or rights for sending messages

Examples

API version 2.0

$client = new SoapClient('https://api.webdispecink.cz/code/WebDispecinkServiceNet.php?wsdl');
$return = $client->_sendMessToPortal2($kodf, $username, $pass, $caridFrom, $typemess, $text, $ew, $el, $kodmess, $datemess, $iddriver, $spoludriver);

Test

To test the function, enter parameters in form below and press Try it out button.

company code
user name
password
vehicle ID
0 - message
1 - driver's status (AETR)
2 - start / end message about transport routes in Spedition
message, AETR - status, typemess=2 fill in ID delivery
latitude (for non position message fill in 0)
longitude (for non position message fill in 0)
AETR only, ordinary message = 0, for AETR it is numerical code of driver's status.

typemess=2 fill in: 1 - start, 2 - stop
date and time (GMT), for when status is valid.
Driver's ID
index of co-driver
1 - co-driver
blank or "0" - driver

* Required field