This is related to how you declare the parameter types for the endpoint. If you use integer
then the parameters will be converted to integers, so in cases where a null value is being used you will get 0. The solution is to add support for both integer
and null
e.g.
'type' => ['integer', 'null'],