Edara API v3

Edara API v3: Districts

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

Endpoints

GET /v3/districts: Lists districts.

Operation GetDistricts · permission read:district

Query string: GetDistrictsQuery

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 district name filter.
cityId int? GreaterThan(0) .When(x => x.CityId.HasValue) Optional city identifier filter.

Responses: OK PagedResult<DistrictResponse>: Paged list of districts.

Notes


GET /v3/districts/{id}: Gets a district by id.

Operation GetDistrictById · permission read:district

Parameters

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

Responses: OK DistrictResponse: The district.

Notes


POST /v3/districts: Creates a district.

Operation CreateDistrict · permission create:district

Body: DistrictUpsertRequest

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

Responses: Created DistrictResponse: The created district.

Business errors (HTTP 409, match on errorCode):

Notes


PUT /v3/districts/{id}: Updates a district.

Operation UpdateDistrict · permission update:district

Parameters

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

Body: DistrictUpsertRequest

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

Responses: OK DistrictResponse: The updated district.

Business errors (HTTP 409, match on errorCode):

Notes


DELETE /v3/districts/{id}: Deletes a district.

Operation DeleteDistrict · permission delete:district

Parameters

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

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

Business errors (HTTP 409, match on errorCode):

Notes

Types

DistrictResponse

Response describing a district.

field type description
id int The district identifier.
name string The district name.
cityId int The city identifier.