Make api more flexible with the data it receives.