scanCode

Explanation of the event

The scanCode event occurs whenever a code of any kind is scanned in MplusKASSA. This can be a barcode, a RFID chip or a QR code. When you subscribe to this event, you can specify filter patterns to only receive specific kind of codes. For example, only barcodes that start with 25.

scanCode A barcode is scanned

Request
This event occurs when a barcode labeled “2512345678901” is scanned at workplace 1.1.

Property Type Explanation
scanCode.scannedCode string A textual representation of the code that was scanned.
scanCode.codeType string barcode, rfid, qrcode

Response
In the response, you can show whether or not you recognized the code. But you can also make changes to the session. For example, apply an external discount.

Property Type Explanation
scanCode.recognized boolean Did you recognize the code or not?
scanCode.message text A message to show on the cashier side.
scanCode.customerMessage text A message to show on the customer side (displayed if applicable).
scanCode.relationNumber bigint Specificy to automatically load this relation into the software. The relation must already be present in the MplusKASSA administration.
lineChanges.lineId uuid The UUID of the session line that you want to change.
lineChanges.externalDiscount.discountId uuid This is a UUID you
generate and store to remember that you applied this discount.
lineChanges.externalDiscount.discountPercentage number The discount percentage that you want to apply to the line.
lineChanges.externalDiscount.discountDescription text A descriptive text for the discount.