ACAPI_ELEMENT_QUANTITY_MASK_SET is just a macro, defined in APIdefs_Elements.h header file. You're right there isn't any documentation for those macros.
Masks are for optimization, to set which member you want to retrieve, so ARCHICAD doesn't have to calculate each quantity.
The API uses ACAPI_ELEMENT_MASK_CHECK macro to check the given quantity must be calculated or not. If we look into that macro we can see that it checks whether the given member (named 'varnam') is zero or not (it's no matter what type the member has, because we cast it):
So now it's obvious that a member should be set to anything but zero to force ARCHICAD to calculate it. That's why ACAPI_ELEMENT_MASK_SET macro sets '-1' value.
Thank you for the feedback, I totally agree with you that it would be useful to have help how to use those mask handling macros! We will do our best and update the documentation with more details about this topic.