_sendMessToPortal

(API version 2.0)

int _sendMessToPortal ( string kodf , string username , string pass , int caridFrom , int typemess , string text , float ew , float el , int kodmess , string datemess )

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 message (AETR)
2 - start / end message about transport routes in Spedition.
string text
message, AETR - status, typemess=2 Spedition - 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), since when status is valid.

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->_sendMessToPortal($kodf, $username, $pass, $caridFrom, $typemess, $text, $ew, $el, $kodmess, $datemess);

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 message (AETR)
2 - start / end message about transport routes in Spedition.
message, AETR - status, typemess=2 Spedition - 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), since when status is valid.

* Required field