Build api url properly instead of concatenation