Skip to main content

Edit City

API operation: Open the endpoint in Scalar

Use PUT /countries/{country}/cities/{city} to update one city within a country. The current public operation is City.update.

Access is restricted to role levels 0 and 1. country_id is taken from the route, and the city must belong to that country. Update fields include name, administrator_id, and enabled.

Legacy SDK example​

const response = await ordering.countries(countryId).cities(cityId).save(changes)

Confirm the SDK package and version before using this historical example.

OpenAPI reference​

Operation: PUT /countries/{country}/cities/{city}

Path parameters

NameTypeRequiredDescription
countryintegerYes—
cityintegerYes—

Request body fields

NameTypeRequired
administrator_idinteger | nullNo
country_idintegerNo
enabledbooleanNo
nameanyNo

Responses

CodeDescription
200OK (Envelope)
400Bad Request (ErrorResponse)
401Unauthorized
404Not Found
429Too Many Requests (ErrorResponse)
500Internal Server Error (ErrorResponse)
503Service Unavailable (ErrorResponse)
Open this operation in the API reference