fixes #3137 - API v2 - show error if optional nested object does not exist for nested route

INCLUDES COMMITS FROM PR #978 (fixes #3017) and PR #862 (fixes #3011) and PR #952 (fixes #3018) and PR #1011 (fixes #2931)