With the Web API you can get a list of all Keypad codes for a devices via GET/smartlock/{smartlockId}/auth
and then filtering for type = 13
With this you should be able to verify if a code would currently be valid.
But be aware that you would need such an interface to be secured against (brute-force) attacks to “guess” correct entry codes for a Keypad.