Sadad PcPos REST Service

Get Info

Decription | Get information of service.
HTTP Address | http://localhost:8000/api/getinfo
HTTPS Address | https://localhost:8001/api/getinfo
HTTP Method | Get
HTTP Header | Content-Type: application/x-www-form-urlencoded
Curl Sample | curl -H "Content-Type: application/x-www-form-urlencoded" -X GET http://localhost:8000/api/getinfo

Get Devices

Decription | Get online devices.
HTTP Address | http://localhost:8000/api/getdevices/0/0
HTTPS Address | https://localhost:8001/api/getdevices/0/0
HTTP Method | Get
HTTP Header | Content-Type: application/x-www-form-urlencoded
Curl Sample | curl -H "Content-Type: application/x-www-form-urlencoded" -X GET http://localhost:8000/api/getdevices/0/0

Get Serial Ports

Decription | Get reserved serial ports name.
HTTP Address | http://localhost:8000/api/getserialports
HTTPS Address | https://localhost:8001/api/getserialports
HTTP Method | Get
HTTP Header | Content-Type: application/x-www-form-urlencoded
Curl Sample | curl -H "Content-Type: application/x-www-form-urlencoded" -X GET http://localhost:8000/api/getserialports

Sale Transaction

Decription | Do sale transaction.
HTTP Address | http://localhost:8000/api/sale
HTTPS Address | https://localhost:8001/api/sale
HTTP Method | Post
HTTP Header | Content-Type: application/x-www-form-urlencoded
Body | {"DeviceIp":"172.24.32.212","DevicePort":"8888","ConnectionType":"Lan","MultiAccount":"1:10,2:30,4:40,6:20","DivideType":"3","Amount":"50000","RequestId":"6ADDA412-E5AA-40E0-8B26-C7C2DF8D9704","OrderId":"951236547","RetryTimeOut":"5000,5000,5000","ResponseTimeout":"180000,5000,5000"}
Curl Sample | curl -H "Content-Type: application/x-www-form-urlencoded" -X POST -d '{"DeviceIp":"172.24.32.212","DevicePort":"8888","ConnectionType":"Lan","MultiAccount":"1:10,2:30,4:40,6:20","DivideType":"3","Amount":"50000","RequestId":"6ADDA412-E5AA-40E0-8B26-C7C2DF8D9704","OrderId":"951236547","RetryTimeOut":"5000,5000,5000","ResponseTimeout":"180000,5000,5000"}' http://localhost:8000/api/sale

Abort Transaction

Decription | Abort the transaction.
HTTP Address | http://localhost:8000/api/abort
HTTPS Address | https://localhost:8001/api/abort
HTTP Method | Post
HTTP Header | Content-Type: application/x-www-form-urlencoded
Body | {"RequestId":"6ADDA412-E5AA-40E0-8B26-C7C2DF8D9704"}
Curl Sample | curl -H "Content-Type: application/x-www-form-urlencoded" -X POST -d '{"RequestId":"6ADDA412-E5AA-40E0-8B26-C7C2DF8D9704"}' http://localhost:8000/api/abort

Device Info

Decription | Get information from device or config file. The value of 'DeviceType' in request body or config file of Sadad REST service is important in this method.
HTTP Address | http://localhost:8000/api/deviceinfo
HTTPS Address | https://localhost:8001/api/deviceinfo
HTTP Method | Post
HTTP Header | Content-Type: application/x-www-form-urlencoded
Body | {"SerialPort":"COM7","ConnectionType":"Serial","DeviceType":"1","OrderId":"9512","TerminalId":"C0000301","MerchantId":"000000000000301","RequestId":"6ADDA412-E5AA-40E0-8B26-C7C2DF8D97"}
Curl Sample | curl -H "Content-Type: application/x-www-form-urlencoded" -X POST -d '{"SerialPort":"COM7","ConnectionType":"Serial","DeviceType":"1","OrderId":"9512","TerminalId":"C0000301","MerchantId":"000000000000301","RequestId":"6ADDA412-E5AA-40E0-8B26-C7C2DF8D97"}' http://localhost:8000/api/deviceinfo

Bill Payment Transaction

Decription | Do bill payment transaction.
HTTP Address | http://localhost:8000/api/billpayment
HTTPS Address | https://localhost:8001/api/billpayment
HTTP Method | Post
HTTP Header | Content-Type: application/x-www-form-urlencoded
Body | {"DeviceIp":"172.24.32.212","DevicePort":"8888","ConnectionType":"Lan","BillId":"6039628301226","PayId":"189840835","RequestId":"6ADDA412-E5AA-40E0-8B26-C7C2DF8D9704","OrderId":"951236547","RetryTimeOut":"5000,5000,5000","ResponseTimeout":"180000,5000,5000"}
Curl Sample | curl -H "Content-Type: application/x-www-form-urlencoded" -X POST -d '{"DeviceIp":"172.24.32.212","DevicePort":"8888","ConnectionType":"Lan","BillId":"6039628301226","PayId":"189840835","RequestId":"6ADDA412-E5AA-40E0-8B26-C7C2DF8D9704","OrderId":"951236547","RetryTimeOut":"5000,5000,5000","ResponseTimeout":"180000,5000,5000"}' http://localhost:8000/api/billpayment

Identified Inquiry Transaction

Decription | Do identified inquiry transaction.
HTTP Address | http://localhost:8000/api/identifiedinquiry
HTTPS Address | https://localhost:8001/api/identifiedinquiry
HTTP Method | Post
HTTP Header | Content-Type: application/x-www-form-urlencoded
Body | {"DeviceIp":"172.24.32.212","DevicePort":"8888","ConnectionType":"Lan","InquiryId":"139522000000014335","RequestId":"6ADDA412-E5AA-40E0-8B26-C7C2DF8D9704","OrderId":"951236547","RetryTimeOut":"5000,5000,5000","ResponseTimeout":"180000,5000,5000"}
Curl Sample | curl -H "Content-Type: application/x-www-form-urlencoded" -X POST -d '{"DeviceIp":"172.24.32.212","DevicePort":"8888","ConnectionType":"Lan","InquiryId":"139522000000014335","RequestId":"6ADDA412-E5AA-40E0-8B26-C7C2DF8D9704","OrderId":"951236547","RetryTimeOut":"5000,5000,5000","ResponseTimeout":"180000,5000,5000"}' http://localhost:8000/api/identifiedinquiry

Government Identified Inquiry Transaction

Decription | Do government identified inquiry transaction.
HTTP Address | http://localhost:8000/api/governmentidentifiedinquiry
HTTPS Address | https://localhost:8001/api/governmentidentifiedinquiry
HTTP Method | Post
HTTP Header | Content-Type: application/x-www-form-urlencoded
Body | {"DeviceIp":"172.24.32.212","DevicePort":"8888","ConnectionType":"Lan","InquiryId":"102110000220000121100000000000","Amount":"110000","RequestId":"6ADDA412-E5AA-40E0-8B26-C7C2DF8D9704","OrderId":"951236547","RetryTimeOut":"5000,5000,5000","ResponseTimeout":"180000,5000,5000"}
Curl Sample | curl -H "Content-Type: application/x-www-form-urlencoded" -X POST -d '{"DeviceIp":"172.24.32.212","DevicePort":"8888","ConnectionType":"Lan","InquiryId":"102110000220000121100000000000","Amount":"110000","RequestId":"6ADDA412-E5AA-40E0-8B26-C7C2DF8D9704","OrderId":"951236547","RetryTimeOut":"5000,5000,5000","ResponseTimeout":"180000,5000,5000"}' http://localhost:8000/api/governmentidentifiedinquiry

Transacation Report

Decription | Get report of last transactions.
HTTP Address | http://localhost:8000/api/transactionreport
HTTPS Address | https://localhost:8001/api/transactionreport
HTTP Method | Post
HTTP Header | Content-Type: application/x-www-form-urlencoded
Body | {"DeviceIp":"172.24.32.212","DevicePort":"8888","ConnectionType":"Lan","Count":"5","TransactionType":"1","RequestId":"6ADDA412-E5AA-40E0-8B26-C7C2DF8D9704","OrderId":"951236547","RetryTimeOut":"5000,5000,5000","ResponseTimeout":"180000,5000,5000"}
Curl Sample | curl -H "Content-Type: application/x-www-form-urlencoded" -X POST -d '{"DeviceIp":"172.24.32.212","DevicePort":"8888","ConnectionType":"Lan","Count":"5","TransactionType":"1","RequestId":"6ADDA412-E5AA-40E0-8B26-C7C2DF8D9704","OrderId":"951236547","RetryTimeOut":"5000,5000,5000","ResponseTimeout":"180000,5000,5000"}' http://localhost:8000/api/transactionreport

Get Card Info

Decription | Get hashed (SHA-256) card information.
HTTP Address | http://localhost:8000/api/cardinfo
HTTPS Address | https://localhost:8001/api/cardinfo
HTTP Method | Post
HTTP Header | Content-Type: application/x-www-form-urlencoded
Body | {"DeviceIp":"172.24.32.212","DevicePort":"8888","ConnectionType":"Lan","RequestId":"6ADDA412-E5AA-40E0-8B26-C7C2DF8D9704","OrderId":"951236547","RetryTimeOut":"5000,5000,5000","ResponseTimeout":"180000,5000,5000"}
Curl Sample | curl -H "Content-Type: application/x-www-form-urlencoded" -X POST -d '{"DeviceIp":"172.24.32.212","DevicePort":"8888","ConnectionType":"Lan","RequestId":"6ADDA412-E5AA-40E0-8B26-C7C2DF8D9704","OrderId":"951236547","RetryTimeOut":"5000,5000,5000","ResponseTimeout":"180000,5000,5000"}' http://localhost:8000/api/cardinfo

CommodityBasket Transaction

Decription | Do commodity basket transaction.
HTTP Address | http://localhost:8000/api/commoditybasket
HTTPS Address | https://localhost:8001/api/commoditybasket
HTTP Method | Post
HTTP Header | Content-Type: application/x-www-form-urlencoded
Body | {"DeviceIp":"172.24.32.212","DevicePort":"8888","ConnectionType":"Lan","RequestId":"6ADDA412-E5AA-40E0-8B26-C7C2DF8D9704","OrderId":"951236547","RetryTimeOut":"5000,5000,5000","ResponseTimeout":"180000,5000,5000"}
Curl Sample | curl -H "Content-Type: application/x-www-form-urlencoded" -X POST -d '{"DeviceIp":"172.24.32.212","DevicePort":"8888","ConnectionType":"Lan","RequestId":"6ADDA412-E5AA-40E0-8B26-C7C2DF8D9704","OrderId":"951236547","RetryTimeOut":"5000,5000,5000","ResponseTimeout":"180000,5000,5000"}' http://localhost:8000/api/commoditybasket

FoodSafety Transaction

Decription | Do food safety transaction.
HTTP Address | http://localhost:8000/api/foodsafety
HTTPS Address | https://localhost:8001/api/foodsafety
HTTP Method | Post
HTTP Header | Content-Type: application/x-www-form-urlencoded
Body | {"DeviceIp":"172.24.32.212","DevicePort":"8888","ConnectionType":"Lan","RequestId":"6ADDA412-E5AA-40E0-8B26-C7C2DF8D9704","OrderId":"951236547","RetryTimeOut":"5000,5000,5000","ResponseTimeout":"180000,5000,5000"}
Curl Sample | curl -H "Content-Type: application/x-www-form-urlencoded" -X POST -d '{"DeviceIp":"172.24.32.212","DevicePort":"8888","ConnectionType":"Lan","RequestId":"6ADDA412-E5AA-40E0-8B26-C7C2DF8D9704","OrderId":"951236547","RetryTimeOut":"5000,5000,5000","ResponseTimeout":"180000,5000,5000"}' http://localhost:8000/api/foodsafety

Restart

Decription | Restart the hosted REST service.
HTTP Address | http://localhost:8000/api/restart
HTTPS Address | https://localhost:8001/api/restart
HTTP Method | Post
HTTP Header | Content-Type: application/x-www-form-urlencoded
Body |
Curl Sample | curl -H "Content-Type: application/x-www-form-urlencoded" -X POST -d '' http://localhost:8000/api/restart