Edara API v3

Edara API v3: Cities

Read the guide first: authentication, paging, errors, rate limits and the shared PagedResult, BatchResult and *Reference shapes.

Endpoints

GET /v3/cities: Lists cities.

Operation GetCities · permission read:city

Query string: GetCitiesQuery

field type default validation description
offset int? 0 >= 0 Number of items to skip before returning results. Defaults to 0.
limit int? 100 1..1000 (out of range → 400) Maximum number of items to return. Defaults to 100, maximum 1000.
name string Optional city name filter.
countryId int? Optional country identifier filter.

Responses: OK PagedResult<CityResponse>: Paged list of cities.

Notes


GET /v3/cities/{id}: Gets a city by id.

Operation GetCityById · permission read:city

Parameters

name in type default description
id route int The city id.

Responses: OK CityResponse: The city.

Notes


POST /v3/cities: Creates a city.

Operation CreateCity · permission create:city

Body: CityUpsertRequest

field type default validation description
name string NotEmpty() .NotNull() .MaximumLength(100) The city name.
countryId int GreaterThan(0) The country identifier.

Responses: Created CityResponse: The created city.

Business errors (HTTP 409, match on errorCode):

Notes


PUT /v3/cities/{id}: Updates a city.

Operation UpdateCity · permission update:city

Parameters

name in type default description
id route int The city id.

Body: CityUpsertRequest

field type default validation description
name string NotEmpty() .NotNull() .MaximumLength(100) The city name.
countryId int GreaterThan(0) The country identifier.

Responses: OK CityResponse: The updated city.

Business errors (HTTP 409, match on errorCode):

Notes


DELETE /v3/cities/{id}: Deletes a city.

Operation DeleteCity · permission delete:city

Parameters

name in type default description
id route int The city id.

Responses: NoContent: (not declared; read from the method body)

Business errors (HTTP 409, match on errorCode):

Notes

Types

CityResponse

Response describing a city.

field type description
id int The city identifier.
name string The city name.
countryId int The country identifier.