Body
The data for the new city
-
Name of the City
-
Country of the City
-
Post Office of the City
Sample request:
POST /cities { "name": "Budapest", "country": "Hungary", "postOffice": "10543" }
curl \
-X POST http://api.example.com/api/Cities \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"string","country":"string","postOffice":"string"}'
curl \
-X POST http://api.example.com/api/Cities \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: text/json"
curl \
-X POST http://api.example.com/api/Cities \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/*+json"
{
"name": "string",
"country": "string",
"postOffice": "string"
}
{
"name": "string",
"country": "string",
"postOffice": "string"
}
{
"name": "string",
"country": "string",
"postOffice": "string"
}
{
"id": "string",
"creationDate": "2024-05-04T09:42:00+00:00",
"lastModified": "2024-05-04T09:42:00+00:00",
"name": "string",
"country": "string",
"postOffice": "string",
"numberOfHotels": 42
}
{
"id": "string",
"creationDate": "2025-05-04T09:42:00Z",
"lastModified": "2025-05-04T09:42:00Z",
"name": "string",
"country": "string",
"postOffice": "string",
"numberOfHotels": 42
}