API method: GET/ locations
Go to Locations - Choose Get/Locations method
Into the “pattern” field enter city name
Into the “limitCities” field enter “-1”
Press “Try it out” button
In the response body you get the city “id”
The same way is for getting the country ID.