For getType you can do el.data('type')
For sending the query string it will be better if you use data:
can.ajax({
url: pathname,
data: {
type: getType
},
...
});
This will create a proper query string. Make sure that getType has the right value (by doing console.log(getType)) and this should work.