Getting location/coordinates via API

I am using the API to get the location on a card.
When I try to get the card info, I get the JSON data, but there is no location or coordinates with it.
Is there a way to get these?

Hello @ChristianLykkegaard

I am not aware of any way to get a Card’s location from the Map View using the REST API.

You can only set the location using the address, locationName and coordinates parameters via the Create a new Card and Update a Card endpoints.

Thanks for the response!

I just think it is wierd that it appears in the documentation under “Get a card” in the Response, when it is not in the json data

WAIT. I take it all back!!

I just tried getting a card with a location set. I included the fields=all parameter in my request, and the response does contain address, locationName and coordinates values:

It also contains a staticMapUrl object that contains the path to the Google map.

Maybe you just forgot to set the fields=all parameter in your request? Without that set, the location values will not be included in the response.

1 Like

Thanks! That was It. I forgot to set the fields=all parameter and now I get the location.

Thank you again for the help!

1 Like