{"openapi":"3.0.0","info":{"description":"General response codes:\n * `200` - OK\n * `401` - Unauthorized (missed Authorization header / token expired)\n * `403` - Forbidden\n * `404` - Not found\n * `422` - Validation error (missed or bad request parameters)\n * `429` - Too Many Requests (endpoint rate limit reached, try again later)\n * `500` - Internal Server Error (something bad happened)\n * `503` - Service Unavailable (app is under maintenance mode or external service is down)\n\nRequired headers for each request:\n * `Accept: application/json`\n * `Content-Type: application/json`\n\nAuthorization header:\n * `Authorization: Bearer {token}`\n","version":"1.0.0-oas3","title":"1551 API"},"tags":[{"name":"Auth","description":"Auth related endpoints"},{"name":"User","description":"User related endpoints"},{"name":"Dictionaries","description":"Dictionaries related endpoints"},{"name":"Tickets","description":"Tickets related endpoints"},{"name":"News","description":"News related endpoints"},{"name":"Content","description":"Content pages related endpoints"},{"name":"Addresses","description":"Addresses related endpoints"},{"name":"Notification","description":"Notification related endpoints"},{"name":"Push-token","description":"Push token related endpoints"},{"name":"Statistics","description":"Statistics related endpoints"}],"security":[{"Bearer":[]}],"paths":{"/auth/refresh":{"post":{"tags":["Auth"],"summary":"refresh token","responses":{"200":{"description":"New fresh token","content":{"*/*":{"schema":{"properties":{"access_token":{"type":"string","example":"eyJ0aXAiOiJKV1QiLCJhcGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9yaGEubG9jXC9hdXRoXC9jYWxsYmFjayIsImlhdCI6MTU0ODY4NTA1MSwiZXhwIjoxNTUxMzYzNDUxLCJuYmYiOjE1NBg2ODUwNTEsImp0aSI6IjF2alJXcDRyc0RteU1SY2MiLCJzdWIiOjEsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.Kl2gdpUJmoYhgOd4rqEb6mwoLY1LtxNpmwmb34fIFgQ"},"token_type":{"type":"string","example":"bearer"},"expires_in":{"type":"integer","example":2678400,"description":"seconds"}}}}}}}}},"/auth/logout":{"post":{"tags":["Auth"],"summary":"user logout","responses":{"200":{"description":"Successfully logged out","content":{"*/*":{"schema":{"properties":{"message":{"type":"string","example":"Successfully logged out"}}}}}}}}},"/auth/sync":{"post":{"tags":["Auth"],"summary":"sync user data with kyivId","responses":{"200":{"description":"success"}}}},"/user/profile":{"get":{"tags":["User"],"summary":"full user profile","operationId":"profile","responses":{"200":{"description":"Full user profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}}}},"put":{"tags":["User"],"summary":"Updates user's profile.","responses":{"200":{"description":"User's profile updated"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","description":"First name (cyrillic validation)"},"last_name":{"type":"string","description":"Last name (cyrillic validation)"},"middle_name":{"type":"string","description":"Patronymic (cyrillic validation)"},"email":{"type":"string","description":"Email validation"}}}}}}}},"/user/profile/fill":{"put":{"tags":["User"],"summary":"Updates user's profile with modal data.","responses":{"200":{"description":"User's profile updated"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProfileFillRequest"}]}}}}}},"/user/avatar/update":{"post":{"tags":["User"],"summary":"update user's profile","operationId":"avatar","responses":{"200":{"description":"Updates user's avatar"}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"image":{"description":"Image file to upload","type":"string","format":"binary"}},"required":["image"]}}}}}},"/user/addresses":{"get":{"tags":["User"],"summary":"User addresses list","responses":{"200":{"description":"User addresses list","content":{"*/*":{"schema":{"properties":{"addresses":{"type":"array","items":{"$ref":"#/components/schemas/Address"}}}}}}}}},"post":{"tags":["User"],"summary":"Create manual address.","responses":{"200":{"description":"Address entity created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Address"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/AddressRequest"}]}}}}}},"/user/addresses/{id}":{"get":{"tags":["User"],"summary":"User address","parameters":[{"in":"path","name":"id","required":true,"description":"Numeric ID of the address to get.","schema":{"type":"integer"}}],"responses":{"200":{"description":"User address","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Address"}}}}}},"put":{"tags":["User"],"summary":"Update manual address.","parameters":[{"in":"path","name":"id","required":true,"description":"Numeric ID of the address to update.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Address entity updated","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Address"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/AddressRequest"}]}}}}},"delete":{"tags":["User"],"summary":"Delete manual address.","parameters":[{"in":"path","name":"id","required":true,"description":"Numeric ID of the address to delete.","schema":{"type":"integer"}}],"responses":{"204":{"description":"No content"}}}},"/user/documents":{"get":{"tags":["User"],"summary":"User documents list","responses":{"200":{"description":"User documents list","content":{"*/*":{"schema":{"properties":{"documents":{"type":"array","items":{"$ref":"#/components/schemas/Document"}}}}}}}}}},"/user/documents/{id}":{"get":{"tags":["User"],"summary":"User document","parameters":[{"in":"path","name":"id","required":true,"description":"Numeric ID of the document to get.","schema":{"type":"integer"}}],"responses":{"200":{"description":"User document","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Document"}}}}}}},"/dictionaries/ticket-subjects":{"get":{"tags":["Dictionaries"],"summary":"Ticket subjects list","responses":{"200":{"description":"Ticket subjects list","content":{"*/*":{"schema":{"properties":{"ticket_subjects":{"type":"array","items":{"$ref":"#/components/schemas/TicketSubject"}}}}}}}}}},"/dictionaries/ticket-subjects/tree":{"get":{"tags":["Dictionaries"],"summary":"Ticket subjects structure for ticket creation form","responses":{"200":{"description":"Ticket subjects list","content":{"*/*":{"schema":{"properties":{"ticket_subjects":{"type":"array","items":{"$ref":"#/components/schemas/TicketSubjectTreeItem"}}}}}}}}}},"/dictionaries/ticket-statuses":{"get":{"tags":["Dictionaries"],"summary":"Ticket statuses list","responses":{"200":{"description":"Ticket statuses list","content":{"*/*":{"schema":{"properties":{"ticket_statuses":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","example":"Звернення виконано"},"label":{"type":"string","example":"Виконано"},"public_status":{"type":"boolean","example":true}}}}}}}}}}}},"/dictionaries/rate-reasons":{"get":{"tags":["Dictionaries"],"summary":"Ticket rate reasons","responses":{"200":{"description":"Ticket rate reasons","content":{"*/*":{"schema":{"properties":{"rate_reasons":{"type":"array","items":{"$ref":"#/components/schemas/TicketRateReason"}}}}}}}}}},"/dictionaries/what-can-be-reported/categories":{"get":{"tags":["Dictionaries"],"summary":"What can be reported categories list","responses":{"200":{"description":"What can be reported categories list","content":{"*/*":{"schema":{"properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/WhatCanBeReportedCategory"}}}}}}}}}},"/dictionaries/what-can-be-reported/items/{id}":{"get":{"tags":["Dictionaries"],"summary":"What can be reported category items list","parameters":[{"in":"path","name":"id","required":true,"description":"Numeric ID of the category to get items for.","schema":{"type":"integer"}}],"responses":{"200":{"description":"What can be reported category items list","content":{"*/*":{"schema":{"properties":{"category_items":{"type":"array","items":{"$ref":"#/components/schemas/WhatCanBeReported"}}}}}}}}}},"/dictionaries/news/categories":{"get":{"tags":["Dictionaries"],"summary":"News categories list","responses":{"200":{"description":"News categories list","content":{"*/*":{"schema":{"properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/NewsCategory"}}}}}}}}}},"/dictionaries/districts":{"get":{"tags":["Dictionaries"],"summary":"Districts list","responses":{"200":{"description":"Districts list","content":{"*/*":{"schema":{"properties":{"districts":{"type":"array","items":{"$ref":"#/components/schemas/District"}}}}}}}}}},"/tickets/map":{"get":{"tags":["Tickets"],"summary":"Get tickets for the Goolge map","parameters":[{"in":"query","name":"zoom","required":true,"description":"Google map zoom value","schema":{"type":"integer","minimum":0,"maximum":30}},{"in":"query","name":"min_lat","required":true,"schema":{"type":"number"}},{"in":"query","name":"max_lat","required":true,"schema":{"type":"number"}},{"in":"query","name":"min_lng","required":true,"schema":{"type":"number"}},{"in":"query","name":"max_lng","required":true,"schema":{"type":"number"}},{"$ref":"#/components/parameters/searchQueryParam"},{"$ref":"#/components/parameters/withPhotoParam"},{"$ref":"#/components/parameters/numbersParam"},{"$ref":"#/components/parameters/subjectIdsParam"},{"$ref":"#/components/parameters/statusesParam"},{"$ref":"#/components/parameters/districtsIdsParam"},{"$ref":"#/components/parameters/ticketsIdsParam"}],"responses":{"200":{"description":"Get tickets for the Goolge map","content":{"*/*":{"schema":{"properties":{"markers":{"type":"array","items":{"$ref":"#/components/schemas/Marker"}}}}}}}}}},"/tickets/search":{"get":{"tags":["Tickets"],"summary":"Search and filter tickets","parameters":[{"in":"query","name":"per_page","required":false,"description":"Amount of items per page limit(by default: 10)","schema":{"type":"integer"}},{"in":"query","name":"page","required":false,"description":"Get specified page by number","schema":{"type":"integer"}},{"in":"query","name":"own","required":false,"description":"Search only user's tickets","schema":{"type":"boolean","example":true}},{"$ref":"#/components/parameters/ticketIncludeParam"},{"$ref":"#/components/parameters/searchQueryParam"},{"$ref":"#/components/parameters/withPhotoParam"},{"$ref":"#/components/parameters/numbersParam"},{"$ref":"#/components/parameters/subjectIdsParam"},{"$ref":"#/components/parameters/statusesParam"},{"$ref":"#/components/parameters/districtsIdsParam"},{"$ref":"#/components/parameters/ticketsIdsParam"}],"responses":{"200":{"description":"Get filtered results","content":{"*/*":{"schema":{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Ticket"}},"meta":{"$ref":"#/components/schemas/Pagination"}}}}}}}}},"/tickets":{"get":{"tags":["Tickets"],"summary":"Current user's tickets list","parameters":[{"in":"query","name":"per_page","required":false,"description":"Amount of items per page limit(by default: 10)","schema":{"type":"integer"}},{"in":"query","name":"page","required":false,"description":"Get specified page by number","schema":{"type":"integer"}},{"$ref":"#/components/parameters/ticketIncludeParam"}],"responses":{"200":{"description":"Current user's tickets list","content":{"*/*":{"schema":{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Ticket"}},"meta":{"$ref":"#/components/schemas/Pagination"}}}}}}}},"post":{"tags":["Tickets"],"summary":"Create new ticket for the current user","responses":{"200":{"description":"Create new ticket for the current user","content":{"*/*":{"schema":{"properties":{"ticket":{"$ref":"#/components/schemas/Ticket"}}}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"images[]":{"description":"Array of image files","type":"string","format":"binary"},"subject_id":{"type":"integer"},"description":{"type":"string","maxLength":3000},"private":{"type":"boolean"},"street":{"type":"string","maxLength":255,"description":"If ticket subject require for address this parameter required without location_lat or location_lng"},"building":{"type":"string","maxLength":255,"description":"If ticket subject require for address this parameter required without location_lat or location_lng"},"location_lat":{"type":"number","description":"If ticket subject require for address this parameter required without street or building"},"location_lng":{"type":"number","description":"If ticket subject require for address this parameter required without street or building"},"address_lat":{"type":"number"},"address_lng":{"type":"number"},"object_id":{"type":"integer"},"district_id":{"type":"integer"}},"required":["subject_id","description"]}}}}}},"/tickets/archive":{"get":{"tags":["Tickets"],"summary":"User's tickets from archive","parameters":[{"in":"query","name":"per_page","required":false,"description":"Amount of items per page limit(by default: 10)","schema":{"type":"integer"}},{"in":"query","name":"page","required":false,"description":"Get specified page by number","schema":{"type":"integer"}},{"$ref":"#/components/parameters/ticketIncludeParam"}],"responses":{"200":{"description":"User's archive tickets list","content":{"*/*":{"schema":{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Ticket"}},"meta":{"$ref":"#/components/schemas/Pagination"}}}}}}}}},"/tickets/await":{"get":{"tags":["Tickets"],"summary":"User's tickets waiting for rate","parameters":[{"in":"query","name":"per_page","required":false,"description":"Amount of items per page limit(by default: 10)","schema":{"type":"integer"}},{"in":"query","name":"page","required":false,"description":"Get specified page by number","schema":{"type":"integer"}},{"$ref":"#/components/parameters/ticketIncludeParam"}],"responses":{"200":{"description":"User's tickets list","content":{"*/*":{"schema":{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Ticket"}},"meta":{"$ref":"#/components/schemas/Pagination"}}}}}}}}},"/tickets/{id}":{"get":{"tags":["Tickets"],"summary":"Get ticket by id","parameters":[{"in":"path","name":"id","required":true,"description":"Numeric ID of the ticket to get.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Get ticket by id","content":{"*/*":{"schema":{"properties":{"ticket":{"$ref":"#/components/schemas/Ticket"}}}}}}}},"put":{"tags":["Tickets"],"summary":"Updates ticket's description.","parameters":[{"in":"path","name":"id","required":true,"description":"Id of the ticket","schema":{"type":"integer"}}],"responses":{"201":{"description":"Returns updated ticket","content":{"*/*":{"schema":{"properties":{"ticket":{"$ref":"#/components/schemas/Ticket"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["description"],"properties":{"description":{"type":"string","example":"Some description"}}}}}}}},"/ticket-progress/{id}":{"get":{"tags":["Tickets"],"summary":"Get ticket progress by id","parameters":[{"in":"path","name":"id","required":true,"description":"Id of ticket","schema":{"type":"integer"}}],"responses":{"200":{"description":"Get ticket progress by ticket id","content":{"*/*":{"schema":{"properties":{"ticket_progress":{"type":"object","properties":{"placeholders":{"type":"array","items":{"$ref":"#/components/schemas/TicketProgressPlaceholder"}},"Травень - 2019":{"type":"array","items":{"$ref":"#/components/schemas/TicketProgress"}},"Квітень - 2019":{"type":"array","items":{"$ref":"#/components/schemas/TicketProgress"}}}},"show_buttons":{"type":"boolean","example":false}}}}}}}}},"/tickets-rate/{id}":{"get":{"tags":["Tickets"],"summary":"Get ticket rate by ticket id","parameters":[{"in":"path","name":"id","required":true,"description":"Numeric ID of the ticket.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Get ticket rate by ticket id","content":{"*/*":{"schema":{"properties":{"ticket_rate":{"$ref":"#/components/schemas/TicketRate"}}}}}}}}},"/ticket-rate":{"post":{"tags":["Tickets"],"summary":"Creates rate for the ticket.","responses":{"201":{"description":"Return created ticket rate","content":{"*/*":{"schema":{"properties":{"ticket_rate":{"$ref":"#/components/schemas/TicketRate"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ticket_id","rate"],"properties":{"ticket_id":{"type":"integer","example":4},"rate":{"type":"integer","example":2},"other_reason":{"type":"string","example":"Другая причина","maxLength":200},"rate_reason_ids":{"type":"array","example":[1,2],"items":{"type":"integer"}}}}}}}}},"/tickets/not-done/{id}":{"post":{"tags":["Tickets"],"summary":"Creates job is not done for the ticket","parameters":[{"in":"path","name":"id","required":true,"description":"Numeric ID of the ticket.","schema":{"type":"integer"}}],"responses":{"201":{"description":"Return created job not done for the ticket","content":{"*/*":{"schema":{"properties":{"job_not_done":{"$ref":"#/components/schemas/JobNotDone"}}}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"images[]":{"description":"Array of image files","type":"string","format":"binary"},"description":{"type":"string"}},"required":["description"]}}}}}},"/tickets/move-to-archive/{id}":{"post":{"tags":["Tickets"],"summary":"Moves ticket to archive","parameters":[{"in":"path","name":"id","required":true,"description":"Numeric ID of the ticket.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Ticket moved to archive"}}}},"/news":{"get":{"tags":["News"],"summary":"News list with pagination","parameters":[{"in":"query","name":"per_page","required":false,"description":"Amount of items per page limit(by default: 10)","schema":{"type":"integer"}},{"in":"query","name":"page","required":false,"description":"Get specified page by number","schema":{"type":"integer"}},{"in":"query","name":"search_query","required":false,"description":"Search query","schema":{"type":"string"}},{"in":"query","name":"category_ids","required":false,"description":"Ids separated by commas of news category","schema":{"type":"string"}},{"in":"query","name":"district_ids","required":false,"description":"district ids separated by commas","schema":{"type":"string"}},{"in":"query","name":"with-pinned","required":false,"description":"If true, news response will be prepended with one pinned news. Total news count will be equal to per_page value (pinned news and per_page - 1 number of plain news). If system hasn't a pinned news, parameter will be ignored and response will be contain per_page of plain news","schema":{"type":"boolean","example":1}}],"responses":{"200":{"description":"News list","content":{"*/*":{"schema":{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/News"}},"meta":{"$ref":"#/components/schemas/Pagination"}}}}}}}}},"/addresses/street":{"get":{"tags":["Addresses"],"summary":"Endpoint to search by street names","parameters":[{"in":"query","name":"name","required":true,"description":"Street name","schema":{"type":"string"}}],"responses":{"200":{"description":"Streets list","content":{"*/*":{"schema":{"properties":{"streets":{"type":"array","items":{"$ref":"#/components/schemas/Street"}}}}}}}}}},"/addresses/building":{"get":{"tags":["Addresses"],"summary":"Endpoint to search building on certain street","parameters":[{"in":"query","name":"street_id","required":true,"description":"Street id","schema":{"type":"integer"}},{"in":"query","name":"number","required":true,"description":"Building number on the specified street","schema":{"type":"string"}}],"responses":{"200":{"description":"Buildings on the street list","content":{"*/*":{"schema":{"properties":{"buildings":{"type":"array","items":{"$ref":"#/components/schemas/Building"}}}}}}}}}},"/news/{id}":{"get":{"tags":["News"],"summary":"News data","parameters":[{"in":"path","name":"id","required":true,"description":"Numeric ID of the news to get.","schema":{"type":"integer"}}],"responses":{"200":{"description":"News","content":{"*/*":{"schema":{"$ref":"#/components/schemas/News"}}}}}}},"/content/about-us":{"get":{"tags":["Content"],"summary":"About us pages list","parameters":[{"in":"query","name":"search_query","required":false,"description":"Search query","schema":{"type":"string"}}],"responses":{"200":{"description":"About us pages list","content":{"*/*":{"schema":{"properties":{"about_us":{"type":"array","items":{"$ref":"#/components/schemas/ContentBlock"}}}}}}}}}},"/content/before-after":{"get":{"tags":["Content"],"summary":"Before after list","responses":{"200":{"description":"Before after list","content":{"*/*":{"schema":{"properties":{"before_after":{"type":"array","items":{"$ref":"#/components/schemas/BeforeAfter"}}}}}}}}}},"/video-broadcasts/current":{"get":{"tags":["Video broadcasts"],"summary":"Cet current broadcast data","responses":{"204":{"description":"No current broadcast"},"200":{"description":"Current broadcast data","content":{"*/*":{"schema":{"$ref":"#/components/schemas/VideoBroadcast"}}}}}}},"/video-broadcasts/{id}":{"get":{"tags":["Video broadcasts"],"summary":"Cet broadcast data bu id","parameters":[{"in":"path","name":"id","required":true,"description":"Numeric ID of the broadcast to get.","schema":{"type":"integer"}}],"responses":{"404":{"description":"No broadcast with provided id found"},"200":{"description":"Broadcast data","content":{"*/*":{"schema":{"$ref":"#/components/schemas/VideoBroadcast"}}}}}}},"/video-broadcasts":{"get":{"tags":["Video broadcasts"],"summary":"Cet broadcasts data","responses":{"200":{"description":"Broadcast data array","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VideoBroadcast"}}}}}}}},"/notifications":{"get":{"tags":["Notifications"],"summary":"Get notifications list","responses":{"200":{"description":"notifications list","content":{"*/*":{"schema":{"properties":{"notifications":{"type":"object","properties":{"new_count":{"type":"integer","example":1},"new":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}},"old":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}}}}}}}}}}}},"/notifications/mark-as-read":{"post":{"tags":["Notifications"],"summary":"Mark notifications read","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"properties":{"updated_count":{"type":"integer","example":1}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"Required at leat one parameter","properties":{"ids":{"type":"array","items":{"type":"integer"},"description":"Notification ids"},"ticket_id":{"type":"integer"},"type":{"type":"string","default":"ticket_notification","enum":["ticket_notification","content_view_notification"]}},"example":{"ids":[1,2],"ticket_id":10}}}}}}},"/notifications/view-notification/{id}":{"get":{"tags":["Notifications"],"summary":"Get view notification data","parameters":[{"in":"path","name":"id","required":true,"description":"Numeric ID of the view-notification to get.","schema":{"type":"integer"}}],"responses":{"200":{"description":"view notification data","content":{"*/*":{"schema":{"required":["title","description","content"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"content":{"type":"array","items":{"oneOf":[{"type":"object","required":["type","html"],"properties":{"type":{"type":"string","enum":["text"]},"html":{"type":"string","format":"html","example":"<ul><li>test</li><li>test2</li></ul>"}}},{"type":"object","required":["type","url","link_text"],"properties":{"type":{"type":"string","enum":["link"]},"url":{"type":"string","format":"url"},"link_text":{"type":"string"}}},{"type":"object","required":["type","image_url"],"properties":{"type":{"type":"string","enum":["image"]},"image_url":{"type":"string","format":"url"}}}]}}}}}}}}}},"/push-token/attach":{"post":{"tags":["Push-token"],"summary":"Attach firebase token from user","responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"succsess":{"type":"boolean","example":true}}}}}}},"requestBody":{"$ref":"#/components/requestBodies/Body"}}},"/push-token/detach":{"post":{"tags":["Push-token"],"summary":"Detach firebase token from user","responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"succsess":{"type":"boolean","example":true}}}}}}},"requestBody":{"$ref":"#/components/requestBodies/Body"}}},"/push-token/test":{"post":{"tags":["Push-token"],"summary":"Send test notification to all attached FCM tokens","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Test"}}}}}}},"/statistics/top-questions":{"get":{"tags":["Statistics"],"summary":"Top questions list","responses":{"200":{"description":"top questions list","content":{"*/*":{"schema":{"properties":{"top_questions":{"type":"array","items":{"$ref":"#/components/schemas/TopQuestion"}}}}}}}}}},"/statistics/tickets-total":{"get":{"tags":["Statistics"],"summary":"Total tickets registered info","responses":{"200":{"description":"Total tickets registered info","content":{"*/*":{"schema":{"properties":{"tickets_total":{"type":"object","properties":{"amount":{"type":"number","example":60},"amount_previous":{"type":"number","example":3},"changes_percent":{"type":"string","example":"95.00%"}}}}}}}}}}},"/statistics/by-direction":{"get":{"tags":["Statistics"],"summary":"Info by directions","responses":{"200":{"description":"Info by directions","content":{"*/*":{"schema":{"properties":{"by_direction":{"type":"array","items":{"$ref":"#/components/schemas/StatisticsByDirection"}}}}}}}}}},"/statistics/summed-numbers":{"get":{"tags":["Statistics"],"summary":"Summed numbers info about tickets","responses":{"200":{"description":"Summed numbers info about tickets","content":{"*/*":{"schema":{"properties":{"summed_numbers":{"type":"array","items":{"$ref":"#/components/schemas/StatisticsSummedNumbers"}}}}}}}}}},"/statistics/last-month":{"get":{"tags":["Statistics"],"summary":"Last month by days","parameters":[{"in":"query","name":"filled","required":false,"description":"Fill empty dates by closest previous date value","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Last month by days","content":{"*/*":{"schema":{"properties":{"Липень":{"type":"array","items":{"$ref":"#/components/schemas/StatisticsLastMonth"}},"Серпень":{"type":"array","items":{"$ref":"#/components/schemas/StatisticsLastMonth"}}}}}}}}}},"/minimal-application-version":{"get":{"deprecated":true,"tags":["Info"],"summary":"Get minimal version for application","responses":{"200":{"description":"Minimal version value","content":{"*/*":{"schema":{"properties":{"version":{"type":"string","example":"1.1.1"}}}}}}}}},"/app-environment":{"get":{"tags":["Info"],"summary":"Get environment variables for mobile app and web","responses":{"200":{"description":"Environment variables. Data may be different for diferent app versions or for web","content":{"*/*":{"schema":{"properties":{"baseApiUri":{"type":"string","format":"uri","example":"/api"},"backendDomain":{"type":"string","example":"1551-stage-back.kyivcity.gov.ua","description":"Should be used for api requests (with uri prefix)"},"backendPort":{"type":"integer","example":3000,"description":"Field is absend by default (443 port)"},"backendScheme":{"type":"string","example":"http","description":"Field is absend by default (https)"},"deepLinkDomain":{"type":"string","example":"1551-stage-back.kyivcity.gov.ua","description":"Should be used for auth collback and social accounts connection. Must not be used for api reuqests"},"googleAnalyticsApiKey":{"type":"string","description":"For web only"},"minimalApplicationVersion":{"type":"string","example":"1.1.1","description":"For mobile only"},"updateUrl":{"type":"string","format":"url","example":"https://new.1551.gov.ua/start","description":"For mobile only. Url should be user for redirect user if current app version is less than minimal"},"appErrorScreen":{"type":"object","description":"For mobile only. If field is present, application should be blocked by error screen","properties":{"title":{"type":"string","description":"Title for error screen"},"text":{"type":"string","description":"Text for error screen"},"buttonText":{"type":"string","description":"Text for error screen button. If field is absent, button should be absent too"},"buttonUrl":{"type":"string","format":"utl","description":"Href for error screen button. If field is absent, button should be absent too"}}},"knowledgeBaseLink":{"type":"string","format":"url"},"feedbackEmail":{"type":"string","format":"email"},"feedbackSubject":{"type":"string"},"shareText":{"type":"string"},"shareLink":{"type":"string","format":"url"}}}}}}}}},"/social-links":{"get":{"tags":["Info"],"summary":"Get social links","responses":{"200":{"description":"Social links","content":{"*/*":{"schema":{"properties":{"telegram":{"type":"string"},"facebook":{"type":"string"},"youtube":{"type":"string"}}}}}}}}},"/feedback-email":{"get":{"tags":["Info"],"summary":"Get email for feedback","responses":{"200":{"description":"Email value","content":{"*/*":{"schema":{"properties":{"email":{"type":"string","example":"admin@mail.com"}}}}}}}}}},"servers":[{"url":"https://1551-stage-back.kyivcity.gov.ua/api"}],"components":{"requestBodies":{"Body":{"content":{"application/json":{"schema":{"type":"object","required":["token"],"properties":{"token":{"type":"string","example":"test_token"}}}}}}},"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"Profile":{"required":["id"],"type":"object","properties":{"id":{"type":"integer","example":1},"open_id":{"type":"integer","example":1},"first_name":{"type":"string"},"middle_name":{"type":"string"},"last_name":{"type":"string"},"birthday":{"type":"integer","format":"timestamp","example":1547123911},"gender":{"type":"integer","example":0,"description":"Genders:\n * `0` - Female\n * `1` - Male\n"},"avatar":{"type":"string","description":"link to the image"},"emails":{"type":"array","items":{"$ref":"#/components/schemas/Email"}},"phones":{"type":"array","items":{"$ref":"#/components/schemas/Phone"}},"editable":{"type":"boolean","example":true,"description":"User profile is not verified and can be updated"},"profile_requires_update":{"type":"boolean","example":true,"description":"User should have filled first_name, last_name, middle_name (with cyrillic validation) and address (with filled street or building_id) otherwise profile_requires_update is true"},"social_link_pb":{"type":"string","example":"/social/pb","description":"Present if profile_requires_update is true and user has token for social link generation"},"social_link_nbu":{"type":"string","example":"/social/nbu","description":"Present if profile_requires_update is true and user has token for social link generation"},"logout":{"type":"boolean","example":true,"description":"Present if profile_requires_update is true and user hasn't token for social link generation (e.g. token is expired)"}}},"Phone":{"required":["type","phone"],"properties":{"type":{"type":"string","example":"PRIMARY","description":"Types:\n * `PRIMARY`\n * `ADDITIONAL`\n"},"phone":{"type":"string","example":"+380501234567"}}},"Email":{"required":["type","email"],"properties":{"type":{"type":"string","example":"PRIMARY","description":"Types:\n * `PRIMARY`\n * `ADDITIONAL`\n"},"email":{"type":"string","example":"user@mail.com"}}},"Document":{"required":["id","type","series","number","issueDate","issuedBy"],"properties":{"id":{"type":"integer","example":1},"type":{"type":"string","example":"PASSPORT_INTERNAL","description":"Types:\n * `PASSPORT_INTERNAL` - Паспорт громадянина України\n * `PASSPORT_EXTERNAL` - Закордонний паспорт\n * `IDENT` - Інше посвідчення особи\n"},"series":{"type":"string"},"number":{"type":"string"},"issueDate":{"type":"integer","format":"timestamp","example":1547123911},"issuedBy":{"type":"string"},"expiryDate":{"type":"integer","format":"timestamp","example":1547123911}}},"Address":{"required":["id","type"],"properties":{"id":{"type":"integer","example":1},"type":{"type":"string","example":"FACTUAL","description":"Types:\n * `FACTUAL` - Адреса місця проживання\n * `REGISTRATION` - Адреса місця реєстрації\n * `OTHER` - Інша адреса\n"},"postcode":{"type":"string"},"country":{"type":"string"},"area":{"type":"string"},"district":{"type":"string"},"city":{"type":"string"},"street":{"type":"string"},"building":{"type":"string"},"frame":{"type":"string"},"flat":{"type":"string"},"building_id":{"type":"integer"},"editable":{"type":"boolean","description":"Only address added by user manually can be editable"}}},"CrmAddress":{"type":"object","required":["building_id"],"properties":{"city":{"type":"string","example":"Київ"},"street":{"type":"string","maxLength":255},"building":{"type":"string","maxLength":255},"building_id":{"type":"integer"},"flat":{"type":"integer","example":3,"maximum":100}}},"ComplexAddress":{"type":"object","required":["city","street","building"],"properties":{"city":{"type":"string","example":"Київ","minLength":3,"description":"validation:\n  - regex: cyrillyc/spaces/special symbols set\n  - at least one cyrillyc symbol\n"},"street":{"type":"string","maxLength":255,"minLength":3,"description":"validation:\n  - regex: cyrillyc/digits/spaces/special symbols set\n  - at least one cyrillyc symbol\n"},"building":{"type":"string","maxLength":255,"minLength":3,"description":"validation:\n  - regex: cyrillyc/digits/spaces/special symbols set\n  - at least one digit\n"},"flat":{"type":"integer","example":3,"maximum":100}}},"AddressRequest":{"oneOf":[{"$ref":"#/components/schemas/CrmAddress"},{"$ref":"#/components/schemas/ComplexAddress"}],"description":"city property is a descrtiminator for Address schema. If city is null or equals to 'Київ' address schema is CrmAddress otherwise schema is ComplexAddress"},"ProfileFillRequest":{"allOf":[{"$ref":"#/components/schemas/AddressRequest"},{"properties":{"first_name":{"type":"string","description":"First name (cyrillic validation)"},"last_name":{"type":"string","description":"Last name (cyrillic validation)"},"middle_name":{"type":"string","description":"Patronymic (cyrillic validation)"}},"required":["first_name","last_name","middle_name"]}]},"TicketSubject":{"required":["id","name","icon_url"],"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Благоустрій та земельні ресурси"},"icon_url":{"type":"string","example":"http://1551-back.systems.media/images/icons/subjects/house_comunal.png"}}},"TicketSubjectTreeItem":{"required":["name","icon_url"],"properties":{"id":{"type":"integer","example":1,"description":"Present only if item is a leaf of this tree."},"name":{"type":"string","example":"Благоустрій та земельні ресурси"},"icon_url":{"type":"string","example":"http://1551-back.systems.media/images/icons/subjects/house_comunal.png"},"ticket_description_field_type":{"type":"string","enum":["none","nullable","required"],"description":"Present only if item is a leaf of this tree. Type of \"description\" input in ticket form. None - input is absent, nullable and required determines attribute validation"},"ticket_photo_field_type":{"type":"string","enum":["none","nullable","required"],"description":"Present only if item is a leaf of this tree. Type of \"photo\" input in ticket form. None - input is absent, nullable and required determines attribute validation"},"ticket_address_field_type":{"type":"string","enum":["none","nullable","required"],"description":"Present only if item is a leaf of this tree. Type of \"address\" input in ticket form. None - input is absent, nullable and required determines attribute validation"},"ticket_geocode_field_type":{"type":"string","enum":["none","nullable","required"],"description":"Present only if item is a leaf of this tree. Type of \"geolocation\" input in ticket form. None - input is absent, nullable and required determines attribute validation"},"ticket_address_or_geocode_required":{"type":"boolean","example":true},"nested":{"type":"array","items":{"$ref":"#/components/schemas/TicketSubjectTreeItem"},"description":"Nested subjects array (same scheme). Maximum tree height is 2.","example":[{"id":5,"name":"Житлове забезпечення","icon_url":"https://1551-stage-back.kyivcity.gov.ua/images/icons/subjects/houses.png","ticket_description_field_type":"none","ticket_photo_field_type":"none","ticket_address_field_type":"required","ticket_geocode_field_type":"none","ticket_address_or_geocode_required":false}]}}},"Image":{"required":["url"],"properties":{"url":{"type":"string","example":"https://1551-back.systems.media/storage/tickets/wWl87O74KwBhhokMTaB1H4TxFJnhzyDqmc4ClVhR.jpeg"}}},"TicketRateReason":{"required":["id","name"],"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Незадовільна якість виконання"}}},"Ticket":{"required":["id","user_id","subject_id","description","status"],"properties":{"id":{"type":"integer","example":1},"user_id":{"type":"integer","example":3},"subject_id":{"type":"integer","example":2},"description":{"type":"string","maxLength":3000,"example":"Текст опису"},"status":{"type":"string","example":"На модерації"},"status_color":{"type":"string","example":"#dd9797"},"private":{"type":"boolean","example":true},"address":{"type":"string","example":"Вул. Грушевського 22"},"work_taken_by":{"type":"string","example":"КП «ГІОЦ»"},"approx_done_date":{"type":"string","example":"2019-04-25T21:00:00.000000Z"},"location_lat":{"type":"number","example":44.5},"location_lng":{"type":"number","example":55},"created_at":{"type":"string","example":"2019-04-17T14:45:26.000000Z"},"can_be_archived":{"type":"boolean","example":true,"description":"determines if ticket can be moved to archive"},"is_archived":{"type":"boolean","example":true},"subject":{"type":"array","description":"*Present only in responses","items":{"$ref":"#/components/schemas/TicketSubject"}},"rate":{"$ref":"#/components/schemas/TicketRate"},"files":{"type":"array","items":{"type":"object","required":["url","is_pdf"],"properties":{"url":{"type":"string","format":"url"},"is_pdf":{"type":"boolean","example":false}}}}}},"Marker":{"allOf":[{"properties":{"type":{"type":"string","enum":["cluster","ticket","unsplittable_cluster"]},"latitude":{"type":"number"},"longitude":{"type":"number"}}},{"discriminator":{"propertyName":"type"},"oneOf":[{"type":"object","properties":{"color":{"type":"string","example":"#fff"},"ticket_id":{"type":"integer"}}},{"type":"object","properties":{"cluster_count":{"type":"integer"}}},{"type":"object","properties":{"cluster_count":{"type":"integer"},"ticket_ids":{"type":"array","items":{"type":"integer"}}}}]}]},"TicketProgress":{"required":["id","type","ticket_id","main_text","date","sub_text","day","current","images","color"],"properties":{"id":{"type":"integer","example":1},"ticket_id":{"type":"integer","example":1},"date":{"type":"string","example":"2019-04-22T14:42:10.000000Z"},"main_text":{"type":"string","example":"Подано звернення"},"additional_text":{"description":"optional text value for some progress cases","type":"string","example":"Ваше звернення було закрито автоматично"},"sub_text":{"type":"string","example":"Not so many years ago businesses used to grunt at using illustrations in their marketing materials."},"sub_text_title":{"type":"string","enum":["Опис","Коментар модератора","Коментар виконавця"]},"type":{"type":"string","example":"DONE"},"day":{"type":"string","example":"02"},"current":{"type":"integer","enum":[0,1]},"images":{"type":"array","items":{"type":"string","example":"4/42jDfkRUwy.jpg"}},"color":{"$ref":"#/components/schemas/Color"},"rate":{"$ref":"#/components/schemas/TicketRate"},"not_done":{"type":"boolean","example":true,"description":"Present and equals to true if TicketProgress type is DONE and JobNotDone entry related to TicketProgress is present"}}},"TicketProgressPlaceholder":{"required":["main_text","sub_text","color"],"properties":{"id":{"type":"integer","example":null},"ticket_id":{"type":"integer","example":null},"main_text":{"type":"string","example":"Звернення виконано"},"sub_text":{"type":"string","example":"Той момент, якого всі чекають!"},"type":{"type":"string","example":null},"day":{"type":"string","example":null},"current":{"description":"values may vary from 0 to 1","type":"integer","example":null},"images":{"type":"array","items":{"type":"string","example":null}},"color":{"$ref":"#/components/schemas/Color"}}},"TicketRate":{"description":"Returns null if no rate","required":["rate"],"properties":{"id":{"type":"integer","example":3},"rate":{"type":"integer","example":5},"other_reason":{"oneOf":[{"type":"string","maxLength":200,"example":"Другая причина"},{"type":"string","enum":["auto_closed"]}]},"rate_reasons":{"type":"array","items":{"$ref":"#/components/schemas/TicketRateReason"}}}},"JobNotDone":{"required":["description"],"properties":{"description":{"type":"string","maxLength":255,"example":"Some description about what is not done."},"images":{"type":"array","items":{"$ref":"#/components/schemas/Image"}}}},"WhatCanBeReported":{"required":["name","link"],"properties":{"name":{"type":"string","example":"Трамваї"},"link":{"type":"string","example":"http://wiki.1551.gov.ua/pages/viewpage.action?pageId=8945837"}}},"WhatCanBeReportedCategory":{"required":["id","name"],"properties":{"id":{"type":"integer","example":2},"name":{"type":"string","example":"Транспорт"}}},"NewsCategory":{"required":["id","name"],"properties":{"id":{"type":"integer","example":2},"name":{"type":"string","example":"Преса"}}},"District":{"required":["id","name"],"properties":{"id":{"type":"integer","example":2},"name":{"type":"string","example":"Деснянський"}}},"Color":{"required":["color_id","filled"],"properties":{"color_id":{"type":"integer","example":1,"description":"Index of the color: 1 - Orange, 2 - Violet, 3 - Grey"},"filled":{"type":"integer","example":0,"description":"Can be 0 or 1 - filled or not filled"}}},"News":{"required":["id","title","date","time","main_image","category"],"properties":{"id":{"type":"integer","example":1,"description":"id of the news"},"title":{"type":"string","example":"Some title","description":"Returns title"},"body":{"type":"string","example":"<ol><li>Hello</li><li>World</li><li>!</li></ol>","description":"Return html in string"},"date":{"type":"string","example":"21.05.2019","description":"Returns date"},"time":{"type":"string","example":"19:27","description":"Returns time"},"main_image":{"type":"string","example":"https://1551-back.systems.media/storage/some_image.png","description":"Returns main image link"},"category":{"$ref":"#/components/schemas/NewsCategory"}}},"BeforeAfter":{"required":["id","image_before","image_after","date","title","address","subject_icon","subject_title"],"properties":{"id":{"type":"integer","example":1,"description":"id"},"image_before":{"type":"string","example":"https://1551-back.systems.media/storage/some_image.png","description":"Returns image what was before link"},"image_after":{"type":"string","example":"https://1551-back.systems.media/storage/some_image.png","description":"Returns image what's now link"},"title":{"type":"string","example":"Some title","description":"Returns title"},"address":{"type":"string","example":"Some address"},"date":{"type":"string","example":"21.05.2019","description":"Returns date"},"subject_icon":{"type":"string","example":"https://1551-back.systems.media/storage/some_image.png","description":"Returns subject icon link"},"subject_title":{"type":"string","example":"Some title","description":"Returns subject title"}}},"ContentBlock":{"required":["id","type","title","body"],"properties":{"id":{"type":"integer","example":1},"type":{"type":"string","example":"goals-page"},"title":{"type":"string","example":"Вакансії","description":"Title of the content page"},"body":{"type":"string","example":"<p><font face=\"Gotham Pro Regular\"><b><span style=\"font-size: 14px;\">КБУ «Контактний центр міста Києва» – це прямий зв’язок громадян з Київською міською владою.</span></b></font><br></p>"},"directors":{"type":"array","description":"Fields is present for (type) leadership-page and contacts-page","items":{"$ref":"#/components/schemas/Director"}}}},"Director":{"required":["full_name","img_url"],"properties":{"full_name":{"type":"string"},"position":{"type":"string"},"raw_description":{"type":"string","description":"contents html","example":"<p>Lorem ipsum</p>"},"img_url":{"type":"string","format":"url","description":"absolute url"},"schedule_days":{"type":"string"},"schedule_time":{"type":"string"}}},"Street":{"required":["id","name"],"properties":{"id":{"type":"integer","example":11},"name":{"type":"string","example":"Василя Симоненка вул."}}},"Notification":{"required":["id","type","text","sub_text","date"],"properties":{"id":{"type":"integer","example":11},"ticket_id":{"type":"integer","example":110},"content_view_id":{"type":"integer","example":10},"text":{"type":"string","example":"Ваше звернення №125467 виконано"},"sub_text":{"type":"string","example":"Знищення омели, амброзії та рослин - паразитів"},"date":{"type":"string","example":"26/06/2019 00:00"},"type":{"type":"string","enum":["ticket_notification","content_view_notification"]}}},"Test":{"properties":{"success":{"type":"boolean","example":true},"notification":{"type":"array","example":[{"title":"Test notification","body":"Send on 10:00:00"}],"items":{}},"data":{"type":"array","example":[{"id":"ap1_0"}],"items":{}}}},"Building":{"required":["id","number"],"properties":{"id":{"type":"integer","example":12},"number":{"type":"string","example":"17-А"},"location_lat":{"type":"number","example":50.46},"location_lng":{"type":"number","example":30.52},"object_id":{"type":"integer","example":35474},"district_id":{"type":"integer","example":7}}},"TopQuestion":{"properties":{"question":{"type":"string","example":"Не працює пасажирський ліфт"},"amount":{"type":"number","example":5},"amount_previous":{"type":"number","example":2},"changes_percent":{"type":"string","example":"100.00%"}}},"StatisticsByDirection":{"properties":{"name":{"type":"string","example":"Благоустрій"},"amount":{"type":"number","example":35}}},"StatisticsSummedNumbers":{"properties":{"name":{"type":"string","example":"Всього звернень в роботі"},"amount":{"type":"number","example":123}}},"StatisticsLastMonth":{"properties":{"day":{"type":"string","example":"03"},"in_progress":{"type":"number","example":4383},"done":{"type":"number","example":1},"overdue":{"type":"number","example":4382}}},"Pagination":{"required":["pagination"],"properties":{"pagination":{"type":"object","properties":{"total":{"type":"integer","example":222},"count":{"type":"integer","example":2},"per_page":{"type":"integer","example":2},"current_page":{"type":"integer","example":2},"total_pages":{"type":"integer","example":2},"links":{"type":"object","description":"Returns [] if only one page in total","properties":{"previous":{"type":"string","description":"Present if there is a previous page","example":"https://1551-back.systems.media/api/tickets?per_page=2&page=1"},"next":{"type":"string","description":"Present if there is a next page","example":"https://1551-back.systems.media/api/tickets?per_page=2&page=3"}}}}}}},"VideoBroadcast":{"required":["id","title","subject","speaker","url","start_at","end_at"],"properties":{"id":{"type":"integer"},"title":{"type":"string"},"subject":{"type":"string"},"speaker":{"type":"string"},"url":{"type":"string","format":"url"},"start_at":{"type":"string","format":"d.m.Y H:m"},"end_at":{"type":"string","format":"d.m.Y H:m"},"announcement_title":{"type":"string"},"announcement_image_url":{"type":"string","format":"url"},"announcement_start_at":{"type":"string","format":"d.m.Y H:m"}}}},"parameters":{"searchQueryParam":{"in":"query","name":"search_query","required":false,"description":"Text to search(currently searches in ticket title and number)","schema":{"type":"string"}},"withPhotoParam":{"in":"query","name":"with_photo","required":false,"description":"Can be 0 or 1","schema":{"type":"string"}},"numbersParam":{"in":"query","name":"numbers","required":false,"schema":{"type":"array","items":{"type":"string"}}},"subjectIdsParam":{"in":"query","name":"subject_ids","required":false,"schema":{"type":"array","items":{"type":"integer"}}},"statusesParam":{"in":"query","name":"statuses","required":false,"schema":{"type":"array","items":{"type":"string","example":"В роботі"}}},"districtsIdsParam":{"in":"query","name":"district_ids","required":false,"schema":{"type":"array","items":{"type":"integer"}}},"ticketsIdsParam":{"in":"query","name":"ticket_ids","required":false,"schema":{"type":"array","items":{"type":"integer"}}},"ticketIncludeParam":{"in":"query","name":"include","required":false,"description":"Include related entities","schema":{"type":"array","items":{"type":"string","enum":["rate","files"]}}}}}}