Web Service

Setup of web service connections to cash registers and the main system, plus reference data for external calls in POS Core.

Under Data Transfer → Web Service, the web service connections to the cash registers and to the main system are stored.

image.png Click to enlarge

Note: For web service calls, a separate BC instance with NavUserPassword authentication must be installed on the target system in each case.

Setup

General

image.png Click to enlarge

Field Description
Location The location code
Cash Register The cash register code
Type POS: Connection to the cash register (per cash-register master).
ERP: Connection to the main system (once for all cash-register masters).

Settings

image.png Click to enlarge

Field Description
Path Base path of the call URL, consisting of name/IP, ODATA port, and service name (example: http://192.168.103.137:7258/BC)
User BC user for the respective calls
Password Password of the user to be used
Company The company name to be called

Actions

Test

image.png Click to enlarge

Field Description
Base Path Is transferred from the setup
Service Name The name of the web service to be called
Function Name The name of the web service function to be called
Company Is transferred from the setup
URL Displays the complete call URL based on the values stored under Base Path, Service Name, Function Name, and Company (example: http://192.168.103.137:7258/BC/ODATAV4/BET_POS_WebInterface_Test?company=CRONUS%20DE)
User Is transferred from the setup
Password Is transferred from the setup
HTTP Status Displays the result code of the most recently executed call
Request Optional function parameters in JSON format
Response Displays the result of the most recently executed call

image.png Click to enlarge

Web Services for Calling External Systems

Vouchers

Query voucher amount

Data
URL http://<Server>:<ODataPort>/BC/ODATAV4/BET_POS_WebInterface_GetVoucherRemainingAmount?company=<Company>
Parameter voucherNo (Text, length 20)
Request {request:"{voucherNo:\"22L1BBE5GP\"}"}
Response {"timestamp":"2025-03-20T08:17:33.304Z","voucherNo":"22L1BBE5GP","remainingAmount":247.05,"hasError":false}

Issue voucher

Data
URL http://<Server>:<ODataPort>/BC/ODATAV4/BET_POS_WebInterface_IssueVoucher?company=<Company>
Parameter voucherNo (Text, length 20); orderNo (Text, length 50); amount (Decimal)
Request {request:"{voucherNo:\"23APWAF8XL\",orderNo:\"123456\",amount:\"50.01\"}"}
Response {"timestamp":"2025-03-20T08:26:15.568Z","voucherNo":"23APWAF8XL","amount":50.01,"remainingAmount":50.01,"hasError":false}

Recharge voucher

Data
URL http://<Server>:<ODataPort>/BC/ODATAV4/BET_POS_WebInterface_RechargeVoucher?company=<Company>
Parameter voucherNo (Text, length 20); orderNo (Text, length 50); amount (Decimal)
Request {request:"{voucherNo:\"23APWAF8XL\",orderNo:\"123456\",amount:\"50.01\"}"}
Response {"timestamp":"2025-03-20T08:27:12.345Z","voucherNo":"23APWAF8XL","amount":50.01,"remainingAmount":100.02,"hasError":false}

Redeem voucher

Data
URL http://<Server>:<ODataPort>/BC/ODATAV4/BET_POS_WebInterface_RedeemVoucher?company=<Company>
Parameter voucherNo (Text, length 20); orderNo (Text, length 50); amount (Decimal)
Request {request:"{voucherNo:\"23APWAF8XL\",orderNo:\"123456\",amount:\"50.00\"}"}
Response {"timestamp":"2025-03-20T08:32:23.304Z","voucherNo":"23APWAF8XL","amount":50.00,"remainingAmount":50.02,"hasError":false}

Cancel voucher

Note: The setup of the cancellation period for vouchers can be found under: Setup/Voucher.

Data
URL http://<Server>:<ODataPort>/BC/ODATAV4/BET_POS_WebInterface_CancelVoucher?company=<Company>
Parameter voucherNo (Text, length 20); Optional: orderNo (Text, length 50); Optional: amount (Decimal)
Request {request:"{voucherNo:\"23APWAF8XL\"}"}
Response {"timestamp":"2025-11-26T07:02:46.838Z","voucherNo":"GC2UHMK9BT","remainingAmount":"0","hasError":false}
Response {"timestamp":"2025-11-26T07:01:52.952Z","voucherNo":"GC2UHMK9BT","remainingAmount":"0","hasError":true,"errorMessage":"Voucher already canceled"}
Response {"timestamp":"2025-11-26T07:05:19.483Z","voucherNo":"GC2UHMK9BT","remainingAmount":"50.01","hasError":true,"errorMessage":"Voucher cannot be canceled due to timeout"}

Query open vouchers

Data
URL http://<Server>:<ODataPort>/BC/ODATAV4/BET_POS_WebInterface_GetOpenVouchers?company=<Company>
Request {request:"{locationCode:\"101\"}"}
Parameter locationCode (Text, length 10)
Response {"timestamp":"2025-03-20T09:03:23.382Z","locationCode":"101","vouchers":"No open vouchers found","hasError":false}
Response {"timestamp":"2025-03-20T09:47:28.509Z","locationCode":"101","vouchers":"[{\"voucherNo\":\"2GNSTSLRPZ\"},{\"voucherNo\":\"2YTX7SY6WC\"}]","hasError":false}