Skip to main content

Find City

API operation: Open the endpoint in Scalar

Use GET /countries/{country}/cities/{city} to retrieve one city within a country. The operation is City.find.

Requests may use an API key or bearer token. Role levels 0 and 1 can access this operation, which matches the city against both route identifiers. The optional params query controls the country, administrator, and options relationships.

Legacy SDK example​

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

The SDK helper name is cities(). SDK helpers can vary by version, so check the package and version you use.

OpenAPI reference​

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

Path parameters

NameTypeRequiredDescription
countryintegerYes—
cityintegerYes—

Query parameters

NameTypeRequiredDescription
paramsstringNoComma-separated list of fields. It is intersected with the model’s $fillable; an empty or invalid list returns all fields.

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