PUT /api/Cities/{id}

Sample request:

PUT /cities/{cityId} { "name": "Budapest", "country": "Hungary", "postOffice": "11176" }

Path parameters

  • id string(uuid) Required

    The id of the city to update

Body

The data for the updated city

  • name string | null

    Name of the City

  • country string | null

    Country of the City

  • postOffice string | null

    Post Office of the City

  • Additional properties are NOT allowed

Body

The data for the updated city

  • name string | null

    Name of the City

  • country string | null

    Country of the City

  • postOffice string | null

    Post Office of the City

  • Additional properties are NOT allowed

Body

The data for the updated city

  • name string | null

    Name of the City

  • country string | null

    Country of the City

  • postOffice string | null

    Post Office of the City

  • Additional properties are NOT allowed

Responses

  • 200

    Success

  • 204

    If the city is updated

  • 400

    If the request data is invalid

  • 401

    If the user is not authenticated

  • 403

    If the user is not authorized (not an admin)

  • 404

    If the city is not found

PUT /api/Cities/{id}
curl \
 -X PUT http://api.example.com/api/Cities/{id} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"name":"string","country":"string","postOffice":"string"}'
curl \
 -X PUT http://api.example.com/api/Cities/{id} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: text/json"
curl \
 -X PUT http://api.example.com/api/Cities/{id} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/*+json"
Request example
{
  "name": "string",
  "country": "string",
  "postOffice": "string"
}
Request examples
{
  "name": "string",
  "country": "string",
  "postOffice": "string"
}
Request examples
{
  "name": "string",
  "country": "string",
  "postOffice": "string"
}