City
list
request
GET /api/v2/catalog/cities HTTP/1.1
Parameter | Description |
---|---|
|
String to search by name. EX: ?name=test |
|
response
[ "", "test", "Москва", "Псков", "Санкт-Петербург", "Сыктывкар", "Тула" ]
Path | Type | Description |
---|---|---|
|
|
Available cities for using in forms. |
create
request
POST /api/v2/general/cities HTTP/1.1
{
"name" : "Test",
"deleted" : false
}
Path | Type | Description | Constraints |
---|---|---|---|
name |
String |
city name |
Must not be blank. |
deleted |
Boolean |
is city deleted? |
Must not be null |
response
{
"name" : "Test",
"deleted" : false
}
Path | Type | Description |
---|---|---|
|
|
city name |
|
|
is city deleted? |
get
request
GET /api/v2/general/cities?name=Test HTTP/1.1
Parameter | Description |
---|---|
|
city name |
response
{
"name" : "Test",
"deleted" : false
}
Path | Type | Description |
---|---|---|
|
|
city name |
|
|
is city deleted? |
update
request
PUT /api/v2/general/cities?name=Test HTTP/1.1
{
"name" : "Test",
"deleted" : false
}
Path | Type | Description | Constraints |
---|---|---|---|
name |
String |
city name |
Must not be blank. |
deleted |
Boolean |
is city deleted? |
Must not be null |
Parameter | Description |
---|---|
|
city name |
response
HTTP/1.1 200 OK
delete
request
DELETE /api/v2/general/cities?name=Test HTTP/1.1
Parameter | Description |
---|---|
|
city name |
response
HTTP/1.1 200 OK