Add functionality to create_mapping

The SQLAlchemy makes me bleugh a little, but I guess I
will get used to it. I also presume there are more effecient
ways of doing this, but this is good enough for now
Add minor validation for creating a mapping

Use HTTP error codes with explanatory error messages everywhere