DAT-2374 add features to api

Can you use else if, instead of nested if?