Integration
PDM calls the sale registration vis standard mechanism of real time requests. To easily distinguish request belonging sale register, their numbers starts from 1000. Be aware that only TCP connection is supported. Server does not listen on UDP.
Requests
Register on HR tax office (1000)
Input
Following menmonics are used to get information about payment:
-
WKZ - currency is ignored. Only value
BET
is taken to account. -
DTM - date and time of payment in ISO_8601 format.
-
method - See java definition file. Enumeration starts from 0.
/** Cash payment */
CASH,
/** Bank card payment */
BANK_CARD,
/** Checque payment */
CHECQUE,
/** Combination of defined payments. */
OTHER
-
TIN - ticket number
-
offline - true means: This is delayed registration of sale. The parking ticket has been issued without online code from tax office. Offline security code has been used instead.
Output
Result is JSON with JIR and ZKI. It is contained in mnemonic MRQ.
{jir:"111848e1-daf8-439a-b58d-1bd2c10bec0a",zki:"a381434f34276c62141d418d0d361de0",REQ:1000}
If registration fails there is no jir
and zki
in resulting JSON.
Result may also contain Error Code (ECR) Error Text (ECT) to inform about reason of failure.
Following error codes can be returned
-
1 - Request to tax office was successful However tax office responded by error.
-
2 - Timeout. Tax office did not answered in expected time window.
-
3 - Request to tax office failed. There may be something wrong with configuration or application itself.
-
99 - Error which does not belong to any of categories above.
See mnemonic ECT
for more information.
Maximal length of ECT
mnemonic is 300 characters.
{ECR:3,ECT:"Something very bad happened", REQ:1000}
Register on SI tax office
It works in the same way as Croatian one. It is also accessible also under REQ 1000. Sale register decides, according to configuration, on which tax office the request is routed.
The only difference it that result is returned in eor
and zoi
.
{eor:"111848e1-daf8-439a-b58d-1bd2c10bec0a",zoi:"a381434f34276c62141d418d0d361de0",REQ:1000}