You should be able to loop through your serial numbers and do a GET on:
"$JAMF_SERVER_URL/api/v1/computers-inventory?filter=hardware.serialNumber%3D%3D$SERIAL_NUMBER"
and narrow down on the ID from those responses: { "totalCount": 1,
"results": [ { "...