Fix error in API get request