You can get a Teltonika device serial number using the correct register number in Modbus request configuration. Here you can find a list with parameters, for example Router serial number register is 40:
Configure request for serial number on your Modbus Serial Master:
When configuring JSON format, make sure to include "Data":%a in the segment. This will include all data from requests in the message send by Data to Server, including serial number request.
If you need serial number just from a single device, another option is to manually input it in JSON segment. Check screenshots below for more details.
"request name":%r field in Data to Server is the name of the request that you have added in Services -> Modbus -> Modbus Serial Master -> Request Configuration page.