Added better error codes for post functions.

Omitting required parameters now results in a 400 status code and descriptive error message for all post calls.