convert API params into an object rather than a string