Send a complaint
POST /v1/complaint
https://verify.tanba-ooh.kz/v1/complaint
Анықтамалықтың техникалық мәтіні ағылшын тілінде жазылған.
A form (multipart/form-data or url-encoded). Only category and text are required; code, photo (JPEG or PNG, 10 MB at most, metadata is removed) and contact are optional. website is a trap for bots and stays empty. At most 10 per client address per hour.
Аутентификация
Қажет емес. Шақыру ашық.
Сұраудың денесі
multipart/form-data
| Атауы | Түрі | Міндетті | Сипаттама | Мысал |
|---|---|---|---|---|
category | string | иә | Kind of complaint. no_permit, offensive, dangerous, other | |
text | string | иә | What the complaint says, up to 2000 characters. | "The sign hangs over the pavement and looks loose." |
code | string | Code of the structure, if known. | "ALM-0012" | |
contact | string | How to reach the sender; optional. | "name@example.org" | |
photo | string (binary) | Photo of the structure, JPEG or PNG, at most 10 MB; metadata is removed. | ||
website | string | Trap for bots; leave it empty. | "" |
Жауаптар
201 Received.
application/json
| Атауы | Түрі | Міндетті | Сипаттама | Мысал |
|---|---|---|---|---|
status | const | иә | Always received. | "received" |
Мысал
{
"status": "received"
}
text/html
Қателер
Қателер problem құжаты (application/problem+json) түрінде, тұрақты code өрісімен келеді.
| Мәртебесі | Мағынасы |
|---|---|
| 413 | An error as a problem document. |
| 415 | An error as a problem document. |
| 422 | An error as a problem document. |
| 429 | Rate limit, 10 complaints per client address per hour; see Retry-After. |
| default | An error as a problem document. |
Код мысалдары
curl
curl -X POST 'https://verify.tanba-ooh.kz/v1/complaint' \
-H 'Accept: application/json' \
-F 'category=no_permit' \
-F 'text=The sign hangs over the pavement and looks loose.' \
-F 'code=ALM-0012' \
-F 'contact=name@example.org' \
-F 'website='
Python
import requests
response = requests.post(
"https://verify.tanba-ooh.kz/v1/complaint",
headers={
"Accept": "application/json",
},
files={
"category": (None, "no_permit"),
"text": (None, "The sign hangs over the pavement and looks loose."),
"code": (None, "ALM-0012"),
"contact": (None, "name@example.org"),
"website": (None, ""),
},
)
print(response.status_code, response.text)