Location
The location column stores a location with longitude and latitude precision (but displayed with a text).
Check out our help center to learn more about the column: The Location Column.
You can update a location column with both a simple string and a JSON string.
Simple strings
To update a location column send the latitude, longitude and (optionally) the address of the location separated by spaces.
For example: "40.6892494 -74.0445004" or "29.9772962 31.1324955 Giza Pyramid Complex".
NOTE
The address is not verified to match the latitude/longitude. It is just used as the text to be displayed in the cell. In case no address is provided, the address will be displayed as "unknown".
The legal values for latitude are between -90.0 and 90.0 exclusive, and for longitude between -180.0 and 180.0 inclusive. If the updated values exceed those ranges, a ColumnValueException will be raised.
JSON
To update a location column send the latitude, longitude and (optionally) the address of the location.
For example: "{"lat":"29.9772962","lng":"31.1324955","address":"Giza Pyramid Complex"}".
Code example
mutation {
change_multiple_column_values(item_id:11111, board_id:22222, column_values: "{\"location3\" : {\"lat\":\"29.9772962\",\"lng\":\"31.1324955\",\"address\":\"Giza Pyramid Complex\"}}") {
id
}
}
fetch ("https://api.monday.com/v2", {
method: 'post',
headers: {
'Content-Type': 'application/json',
'Authorization' : 'YOUR_API_KEY'
},
body: JSON.stringify({
query : "mutation ($myBoardId:Int!, $myItemId:Int!, $myColumnValues:JSON!) { change_multiple_column_values(item_id:$myItemId, board_id:$myBoardId, column_values: $myColumnValues) { id } }",
variables : JSON.stringify({
myBoardId: YOUR_BOARD_ID,
myItemId: YOUR_ITEM_ID,
myColumnValues: "{\"location3\" : {\"lat\" : \"29.9772962\", \"lng\": \"31.1324955\", \"address\": \"Giza Pyramid Complex\"}}"
})
})
})
curl "https://api.monday.com/v2" \
-X POST \
-H "Content-Type:application/json" \
-H "Authorization:MY_API_KEY" \
-d '{"query":"mutation{change_multiple_column_values(item_id:162169283, board_id:162169280, column_values:\"{\\\"location3\\\" : {\\\"lat\\\" : \\\"29.9772962\\\", \\\"lng\\\" : \\\"31.1324955\\\", \\\"address\\\" : \\\"Giza Pyramid Complex\\\"}}\"){name}}"}'
Updated about 1 year ago