1/batch doesn't accept urls with query params containing commas

I found that I can include query params in the 1/batch endpoint, but it seems broken when those query parameters include commas.

This works:

https://api.trello.com/1/batch?urls=%2Forganizations%2F5ae695d2060c06af972997dc%3Ffields%3Dname

and returns the org with just the id and name, but this returns errors

https://api.trello.com/1/batch?urls=%2Forganizations%2F5ae695d2060c06af972997dc%3Ffields%3Dname%2Cprefs

Routes do not exist: /1prefs

I expect this is because the urls parameter is comma-delimited. Is there a way to escape the commas? Or maybe another way to specify multiple fields?

1 Like

You need to double encode the commas in the query parameters of the URL. Using your example:

https://api.trello.com/1/batch?urls=%2Forganizations%2F5ae695d2060c06af972997dc%3Ffields%3Dname%252Cprefs

This also is returning the same error: Routes do not exist: /1prefs