MerlinX Dyn@mite push client - by KSI
API functions:
Receive data from Dyn@mite
Input parameters:
Tour operatorCode should be passed as domain name prefix like : http://[toCode].dynamitepushclient.xksi.pl
- DATA : you can pass JSON data by variable inputEmulation POST or GET method ( for debug and testing ).
The same data you can pass via stream ( read in script using php://input )
Returns:
Serwis callback po otrzymaniu żądania będzie zwracał następujące informacje w formacie JSON:
-
Gdy dane przyjęte poprawnie :
{"status":"OK","recordsCount":31}
* status : OK ( gdy poprawnie ),
* recordsCount - ilość rekordów w tablicy otrzymanej z Dyn@mite na potrzeby weryfikacji.
-
Gdy dane nie zostały przyjęte :
{"status":"FAIL:","error":988001,"errorDescription":"Received data FAIL ."}
* status : FAIL ( błąd ),
* error - kod błędu,
* errorDescription - słowny opis błędu.
-
Każdy inny zwracany format danych niż opisany w punkcie 1 także oznacza błąd.
Example of use
Get url:
http://dynamitepushclient.xksi.pl/?inputEmulation={"bookingNr":6374,"status":"XX"}
It is recomended to send parametrs using POST method.
getFromDynamiteToQueue()
Input parameters:
- login : login ( config defined )
- password : password ( config defined )
- function : this function name
- toCode : tourOperatorCode
- date : date format YYYY-MM-DD. If empty default is today
Returns:
JSON encoded array including status info:
[ 'status' ] =>
[ 'errorCode' ] = 0
[ 'errorMsg' ] = ''
[ 'importInfo' ] = array ( ... )
or returns :
[ 'status' ] =>
[ 'errorCode' ] = 1001
[ 'errorMsg' ] = 'Error description ....'
Example of use
Get url:
http://[server]/?login=[your_login]&password=[your_password]&function=getFromDynamiteToQueue&toCode=XXXX&date=2017-01-09
It is recomended to send parametrs using POST method.
forceQueueParse()
Input parameters:
- login : login ( config defined )
- password : password ( config defined )
- function : this function name
- toCode : tourOperatorCode
Returns:
JSON encoded array including status info:
[ 'status' ] =>
[ 'errorCode' ] = 0
[ 'errorMsg' ] = ''
[ 'importInfo' ] = array ( ... )
or returns :
[ 'status' ] =>
[ 'errorCode' ] = 1001
[ 'errorMsg' ] = 'Error description ....'
Example of use
Get url:
http://[server]/?login=[your_login]&password=[your_password]&function=forceQueueParse&toCode=XXXX
It is recomended to send parametrs using POST method.
getStatus()
Input parameters:
- login : login ( config defined )
- password : password ( config defined )
- function : this function name
- toCode : tourOperatorCode
Returns:
JSON encoded array including status info:
[ 'status' ] =>
[ 'errorCode' ] = 0
[ 'errorMsg' ] = ''
[ 'queueInfo ' ] = queuiInfo
or returns :
[ 'status' ] =>
[ 'errorCode' ] = 1001
[ 'errorMsg' ] = 'Error description ....'
Example of use
Get url:
http://[server]/?login=[your_login]&password=[your_password]&function=getStatus&toCode=XXXX
It is recomended to send parametrs using POST method.