API 7 – Λογισμικό διαχείρισης αιτημάτων πολιτών

API calls & Responses

paths:  {
/{lang}/categories:  {
get:  {
tags:  [
"Categories"
],
summary: "All the root categories",
description: " Categories with negative ids are fixed
and are common for all areas/api-keys.
The fixed categories are as described below:
-1: Σημεία ενδιαφέροντος
-2: Χρήσιμα Τηλέφωνα
-3: Φαρμακεία
-4: Παρκινγκ ΑΜΕΑ
-5: Νοσοκομεία ",
operationId: "root-category-list",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "The list of category objects * <b>Test</b>",
examples:  {
application/json:  {
data:  [
{
id: -1,
image: null,
icon: null,
icon_class: "fa fa-map-marker",
name: "Σημεία Ενδιαφέροντος",
description: ""
},
{
id: -2,
image: null,
icon: null,
icon_class: "fa fa-phone",
name: "Χρήσιμα Τηλέφωνα",
description: ""
},
{
id: -3,
image: null,
icon: null,
icon_class: "fa fa-plus-square",
name: "Φαρμακεία",
description: ""
},
{
id: -5,
image: null,
icon: null,
icon_class: "fa fa-hospital-o",
name: "Νοσοκομεία",
description: ""
}
]
}
}
},
401:  {
description: "invalid api key"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/categories/{categoryId}/subcategories:  {
get:  {
tags:  [
"Categories"
],
summary: "All the subcategories of the given category",
operationId: "subcategory-list",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
$ref: "#/parameters/categoryId"
},
{
name: "include",
in: "query",
description: "comma separated list of extra
resources to include Available values:<ul>
<li><b>subcategories</b>: The subcategories
of each subcategory</li> </ul>",
required: false,
type: "array",
items:  {
type: "string",
default: "subcategories",
enum:  [
"subcategories"
]
},
collectionFormat: "csv"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "The list of subcategory objects",
examples:  {
application/json:  {
data:  [
{
id: -1,
image: null,
icon: null,
icon_class: "fa fa-map-marker",
name: "Σημεία Ενδιαφέροντος",
description: ""
},
{
id: -2,
image: null,
icon: null,
icon_class: "fa fa-phone",
name: "Χρήσιμα Τηλέφωνα",
description: ""
},
{
id: -3,
image: null,
icon: null,
icon_class: "fa fa-plus-square",
name: "Φαρμακεία",
description: ""
},
{
id: -5,
image: null,
icon: null,
icon_class: "fa fa-hospital-o",
name: "Νοσοκομεία",
description: ""
}
]
}
}
},
401:  {
description: "invalid api key"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/pages/{pageSlug}:  {
get:  {
tags:  [
"Pages"
],
summary: "The page with the given slug",
description: "The fixed slugs are: <ul> <li>
<b>contact</b>: Contact page</li> </ul>",
operationId: "page-by-slug",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
$ref: "#/parameters/pageSlug"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "The page object",
examples:  {
application/json:  {
data:  [
{
id: 12,
name: "Contact Page",
description: "<h1>Contact Page</h1>"
}
]
}
}
},
401:  {
description: "invalid api key"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/categories/{categoryId}/pois:  {
get:  {
tags:  [
"Pois"
],
summary: "All the pois (including pois of subcategories)
of the given category",
operationId: "poi-list",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
$ref: "#/parameters/categoryId"
},
{
name: "include",
in: "query",
description: "comma separated list of extra
resources to include Available values:<ul> <li><b>categories</b>:
The categories the poi belongs to</li> <li><b>categories.parent_category</b>:
The parent_category of the category,</li> </ul>",
required: false,
type: "array",
items:  {
type: "string",
default: "categories",
enum:  [
"categories",
"categories.parent_category"
]
},
collectionFormat: "csv"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "The list of poi objects",
examples:  {
application/json:  {
data:  [
{
id: 522,
category_id:  [
-3
],
image: null,
name: "Σ.Φ. ΣΑΡΙΔΑΚΗΣ Κ. & Ο. Ο.Ε.",
address: "ΛΕΥΘΕΡΑΙΟΥ 8 & ΣΜΠΩΚΟΥ:ΔΙΠΛΑ
ΑΠΟ ΑLPHA BANK ΜΑΣΤΑΜΠΑΣ - ΠΕΤΑΛΟΕΙΔΗΣ",
description: "",
contact_details:  {
phone: "2811103195",
fax: null,
site: null,
email: null
},
coordinates:  {
lat: "35.327063",
lng: "25.128417"
},
dates:  {
duty_dates:  [
{
slot: "08:30 - 23:00",
dates:  [
"2018-12-31"
]
},
{
slot: "08:30 - 21:00",
dates:  [
"2018-12-31",
"2019-01-01"
]
},
{
slot: "08:30 - 14:00 & 17:30 - 00:00",
dates:  [
"2018-12-31"
]
}
],
overnight_duty_dates:  [
{
slot: "08:30 - 22:00",
dates: [ ]
}
]
},
extended_duty_days:  [
"mon",
"wed",
"sat"
]
}
]
}
}
},
401:  {
description: "invalid api key"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/pois/{poiId}:  {
get:  {
tags:  [
"Pois"
],
summary: "Return the poi with the given id",
operationId: "poi-item",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
$ref: "#/parameters/poiId"
},
{
name: "include",
in: "query",
description: "comma separated list of extra resources to include
Available values:<ul> <li><b>categories</b>:
The categories the poi belongs to</li>
<li><b>categories.parent_category</b>:
The parent_category of the category,</li> </ul>",
required: false,
type: "array",
items:  {
type: "string",
default: "categories",
enum:  [
"categories",
"categories.parent_category"
]
},
collectionFormat: "csv"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "The list of poi objects",
examples:  {
application/json:  {
data:  {
id: 522,
category_id:  [
-3
],
image: null,
name: "Σ.Φ. ΣΑΡΙΔΑΚΗΣ Κ. & Ο. Ο.Ε.",
address: "ΛΕΥΘΕΡΑΙΟΥ 8 & ΣΜΠΩΚΟΥ:ΔΙΠΛΑ ΑΠΟ ΑLPHA
BANK ΜΑΣΤΑΜΠΑΣ - ΠΕΤΑΛΟΕΙΔΗΣ",
description: "",
contact_details:  {
phone: "2811103195",
fax: null,
site: null,
email: null
},
coordinates:  {
lat: "35.327063",
lng: "25.128417"
},
dates:  {
duty_dates:  [
{
slot: "08:30 - 23:00",
dates:  [
"2018-12-31"
]
},
{
slot: "08:30 - 21:00",
dates:  [
"2018-12-31",
"2019-01-01"
]
},
{
slot: "08:30 - 14:00 & 17:30 - 00:00",
dates:  [
"2018-12-31"
]
}
],
overnight_duty_dates:  [
{
slot: "08:30 - 22:00",
dates: [ ]
}
]
},
extended_duty_days:  [
"mon",
"wed",
"sat"
]
}
}
}
},
401:  {
description: "invalid api key"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/passwordForgot:  {
post:  {
tags:  [
"Users"
],
summary: "Reset Password",
operationId: "reset-password",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "email",
in: "formData",
description: "Email address",
required: true,
type: "string"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "successfull operation",
examples:  {
data:  {
message: "Check your email, to follow
the link that will allow you to
reset your password! Please check the SPAM folder,
if you can't find it inside your inbox!"
}
}
},
401:  {
description: "invalid api key"
},
422:  {
description: "invalid parameter values",
examples:  {
error:  {
email:  [
"The email has already been taken."
]
}
}
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/login:  {
post:  {
tags:  [
"Users"
],
summary: "Login",
operationId: "login",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "email",
in: "query",
description: "email address",
required: true,
type: "string"
},
{
name: "password",
in: "query",
description: "",
required: true,
type: "string"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "successful operation",
schema:  {
properties:  {
token:  {
type: "string"
},
user:  {
type: "object"
}
}
},
examples:  {
data:  {
token: "token_value",
user:  {
id: "6es8PKsRbf6fifXW65uoVwd4yqxhpjeJzwNzwWk2",
username: "[email protected]",
name: "Dotsoft Test User"
}
}
}
},
401:  {
description: "invalid api key"
},
422:  {
description: "invalid parameter values",
examples:  {
error:  {
email:  [
"The email field is required."
],
password:  [
"The password field is required."
]
}
}
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/eform/categories:  {
get:  {
tags:  [
"Eforms"
],
summary: "Return the whole nested tree of eform categories",
operationId: "eforms-catalog-category",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "A nested array of category objects",
examples:  {
application/json:  {
data:  [
{
id: 4,
name: "CATEGORY A",
updated_at: "2019-05-17 11:58:34",
children:  {
data: [ ]
}
},
{
id: 8,
name: "Κατηγορία Β",
updated_at: "2019-05-30 10:31:21",
children:  {
data: [ ]
}
},
{
id: 9,
name: "Κατηγορία Γ",
updated_at: "2019-05-30 10:31:33",
children:  {
data: [ ]
}
}
]
}
}
},
401:  {
description: "invalid api key"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/eform/statuses:  {
get:  {
tags:  [
"Eforms"
],
summary: "Return a list of possible statuses for an eform,
with entries in the form status_id: status_label.",
operationId: "eforms-catalog-status",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "An object with status codes (status_id)
as keys and labels (status) as objects",
examples:  {
application/json:  [
"Αδημοσίευτη",
"Δημοσιευμένη",
"Αποσυρμένη"
]
}
},
401:  {
description: "Unauthorized"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/municipalities/categories/certificates:  {
get:  {
tags:  [
"Certificates"
],
summary: "Return a list of certificate categories",
operationId: "certificate-category-index",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "An array of category objects",
examples:  {
application/json:  {
data:  [
{
id: 1,
name: "Δημοτολόγια"
},
{
id: 2,
name: "Ληξιαρχεία"
}
]
}
}
},
401:  {
description: "invalid api key"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/municipalities/categories/problems:  {
get:  {
tags:  [
"Problem Reports"
],
summary: "Return a list of problem report categories",
operationId: "certificate-problem-index",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "employee_only",
in: "query",
description: "Boolean value denoting whether you want
categories visible by employees only or not",
required: false,
type: "boolean"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "An array of category objects",
examples:  {
application/json:  {
data:  [
{
id: 3,
name: "Απορρίματα",
login_required: true
},
{
id: 4,
name: "Παιδικές Χαρές",
login_required: true
}
]
}
}
},
401:  {
description: "invalid api key"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/municipalities/certificates/{category_id}:  {
get:  {
tags:  [
"Certificates"
],
summary: "Return a list of certificates",
operationId: "certificate-index",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "category_id",
in: "path",
description: "The id of the category that we want certificates of",
required: true,
type: "integer"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "An array of certificate objects",
examples:  {
application/json:  {
data:  [
{
id: 1,
name: "Ληξιαρχική Πράξη Γεννήσεως",
description: "",
fields:  [
{
info: null,
type: "test",
group: "",
label: "Αριθμός Ταυτότητας",
required: true
}
]
}
]
}
}
},
401:  {
description: "invalid api key"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/municipalities/{certificate_id}/certificates:  {
post:  {
tags:  [
"Certificates"
],
summary: "Allow a cityzen to submit a request for a certificate",
operationId: "certificate-request-submit",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "certificate_id",
in: "query",
description: "The id of the certificate that the request is for",
required: true,
type: "integer"
},
{
name: "input",
in: "path",
description: "The json array of the fields as returned
by the according certificate endpoint. Each object in
the array should have an extra key named 'value' with
the according field value",
required: true,
type: "string"
},
{
$ref: "#/parameters/Authorization"
}
],
responses:  {
200:  {
description: "The request object",
examples:  {
application/json:  {
data:  {
id: "2017-1",
input:  {
lat: "35.339055",
lng: "25.133114200000023"
}
}
}
}
},
401:  {
description: "invalid api key"
},
422:  {
description: "Validation errors. Key is the field with
the validation error and value is an array of validation
error messages",
examples:  {
application/json:  {
error:  {
lat:  [
"A value is required for field lat.",
"lat must be a number."
]
}
}
}
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/municipalities/certificate_requests:  {
get:  {
tags:  [
"Certificates"
],
summary: "Return a list of certificate requests submitted by this registered user",
operationId: "certificate-request-user-list",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "include",
in: "query",
description: "comma separated list of extra resources to include",
type: "array",
items:  {
type: "string",
default: "certificate",
enum:  [
"owner_comments",
"certificate"
]
},
collectionFormat: "csv"
},
{
name: "status_filter",
in: "query",
description: "comma separated list of status filters
(or condition applied for multiple values)",
type: "array",
items:  {
type: "string",
enum:  [
"status_submitted",
"status_assigned",
"status_working_on",
"status_completed",
"status_archived"
]
},
collectionFormat: "csv"
},
{
$ref: "#/parameters/Authorization"
}
],
responses:  {
200:  {
description: "An array of certificate request objects",
examples:  {
application/json:  {
data:  [
{
id: "2018-1",
certificate_id: 2,
input:  [
{
id: "8yad209gf3h",
value: "ΑΒ1234"
}
],
status: "Προς διεκπεραίωση",
created_at: "2018-02-01 14:04:51",
owner_comments:  {
data: [ ]
},
certificate:  {
data:  {
id: 2,
name: "Ληξιαρχική Πράξη Γάμου",
description: "",
fields:  [
{
id: "8yad209gf3h",
info: null,
type: "text",
group: null,
label: "Αριθμός Ταυτότητας",
required: true
}
]
}
}
}
]
}
}
},
401:  {
description: "invalid user"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/municipalities/certificate_requests/{$id}:  {
get:  {
tags:  [
"Certificates"
],
summary: "Return the certificate request with the given id
submitted by this user",
operationId: "certificate-request-user-show",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "id",
in: "path",
description: "the id of the request",
type: "string"
},
{
name: "include",
in: "query",
description: "comma separated list of extra
resources to include",
type: "array",
items:  {
type: "string",
default: "certificate",
enum:  [
"owner_comments",
"certificate"
]
},
collectionFormat: "csv"
},
{
$ref: "#/parameters/Authorization"
}
],
responses:  {
200:  {
description: "The certificate request object",
examples:  {
application/json:  {
data:  {
id: "2018-1",
certificate_id: 2,
input:  [
{
id: "8yad209gf3h",
value: "ΑΒ1234"
}
],
status: "Προς διεκπεραίωση",
created_at: "2018-02-01 14:04:51",
owner_comments:  {
data: [ ]
},
certificate:  {
data:  {
id: 2,
name: "Ληξιαρχική Πράξη Γάμου",
description: "",
fields:  [
{
id: "8yad209gf3h",
info: null,
type: "text",
group: null,
label: "Αριθμός Ταυτότητας",
required: true
}
]
}
}
}
}
}
},
401:  {
description: "invalid user"
},
404:  {
description: "invalid id"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/user:  {
get:  {
tags:  [
"Users"
],
summary: "Get the user info",
operationId: "profile",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
$ref: "#/parameters/Authorization"
}
],
responses:  {
200:  {
description: "successful operation",
schema:  {
properties:  {
token:  {
type: "string"
},
user:  {
type: "object"
}
}
},
examples:  {
data:  {
message: "Check you email address,
in order to complete your registration!"
}
}
},
401:  {
description: "invalid api key"
},
422:  {
description: "invalid parameter values",
examples:  {
error:  {
email:  [
"The email has already been taken."
]
}
}
},
500:  {
description: "internal server error"
}
}
},
post:  {
tags:  [
"Users"
],
summary: "Update the user info",
operationId: "profile-update",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
$ref: "#/parameters/Authorization"
}
],
responses:  {
200:  {
description: "successful operation",
schema:  {
properties:  {
token:  {
type: "string"
},
user:  {
type: "object"
}
}
},
examples:  {
data:  {
message: "Check you email address,
in order to complete your registration!"
}
}
},
401:  {
description: "invalid api key"
},
422:  {
description: "invalid parameter values",
examples:  {
error:  {
email:  [
"The email has already been taken."
]
}
}
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/municipalities/crews/login:  {
post:  {
tags:  [
"Crew Members"
],
summary: "Login",
operationId: "crew login",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "email",
in: "formData",
description: "email address",
required: true,
type: "string"
},
{
name: "password",
in: "formData",
description: "",
required: true,
type: "string"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "successful operation",
schema:  {
properties:  {
token:  {
type: "string"
},
user:  {
type: "object"
}
}
},
examples:  {
data:  {
token: "token_value",
user:  {
id: "6es8PKsRbf6fifXW65uoVwd4yqxhpjeJzwNzwWk2",
username: "[email protected]",
name: "Dotsoft Test User"
}
}
}
},
401:  {
description: "invalid api key"
},
422:  {
description: "invalid parameter values",
examples:  {
error:  {
email:  [
"The email field is required."
],
password:  [
"The password field is required."
]
}
}
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/municipalities/employees/login:  {
post:  {
tags:  [
"Employees"
],
summary: "Login",
operationId: "employee login",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "email",
in: "formData",
description: "email address",
required: true,
type: "string"
},
{
name: "password",
in: "formData",
description: "",
required: true,
type: "string"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "successful operation",
schema:  {
properties:  {
token:  {
type: "string"
},
user:  {
type: "object"
}
}
},
examples:  {
data:  {
token: "token_value",
user:  {
id: "6es8PKsRbf6fifXW65uoVwd4yqxhpjeJzwNzwWk2",
username: "[email protected]",
name: "Dotsoft Test User"
}
}
}
},
401:  {
description: "invalid api key"
},
422:  {
description: "invalid parameter values",
examples:  {
error:  {
email:  [
"The email field is required."
],
password:  [
"The password field is required."
]
}
}
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/municipalities/infrastructures:  {
post:  {
tags:  [
"Infrastructures"
],
summary: "Anonymous submit of a new infrastructure",
operationId: "infrastructure-submit-anonymous",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "infrastructure_type_id",
in: "formData",
description: "The id of the infrastructure type",
required: true,
type: "integer"
},
{
name: "lat",
in: "formData",
description: "latitude of the infrastructure",
required: true,
type: "string"
},
{
name: "lng",
in: "formData",
description: "longitude of the infrastructure",
required: true,
type: "string"
},
{
name: "image",
in: "formData",
description: "base64 representation of an image",
required: false,
type: "string"
},
{
name: "values",
in: "formData",
description: "The json array of the fields as returned by the
according infrastructure fields endpoint. Each object in the
array should have an extra key named 'value' with the according field value",
required: true,
type: "string"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "The infrastructure object",
examples:  {
application/json:  {
data:  {
id: "2017-1",
image: "image.jpeg",
description: "Υπάρχει πρόβλημα με λακούβα στο δρόμο",
address: "Αλμπερτ Σβαιτσερ 12",
coordinates:  {
lat: "35.339055",
lng: "25.133114200000023"
}
}
}
}
},
401:  {
description: "invalid api key"
},
422:  {
description: "Validation errors. Key is the field
with the validation error and value is an array of
validation error messages",
examples:  {
application/json:  {
error:  {
lat:  [
"A value is required for field lat.",
"lat must be a number."
]
}
}
}
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/municipalities/infrastructureTypes:  {
get:  {
tags:  [
"Infrastructures"
],
summary: "Return a list of infrastructure types",
operationId: "infrastructure-index",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "An array of infrastructure objects",
examples:  {
application/json:  {
data:  [
{
id: 1,
name: "Ιστοί οδοφωτισμού και φωτιστικά σώματα",
description: "",
fields:  [
{
info: null,
type: "list",
extra:  {
multiple: false,
values:  [
"ΗΡΑΚΛΕΙΟΥ",
"ΓΟΡΓΟΛΑΪΝΗ",
"ΝΕΑΣ ΑΛΙΚΑΡΝΑΣΣΟΥ",
"ΠΑΛΙΑΝΗΣ",
"ΤΕΜΕΝΟΥΣ"
]
},
group: "",
label: " Δημοτική Ενότητα",
required: false
},
{
info: null,
type: "text",
group: null,
label: "Ονομασία οδού – πεζόδρομου – πλατείας - πάρκου",
required: false
},
{
info: null,
type: "range",
extra:  {
to: "15",
from: "1",
step: "1"
},
group: "Στοιχεία ιστού",
label: "Αριθμός φωτιστικών σωμάτων ανά ιστό",
required: false
}
]
}
]
}
}
},
401:  {
description: "invalid api key"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/municipalities/reports/fields:  {
get:  {
tags:  [
"Problem Reports"
],
summary: "Return a list of fields to be used when submitting a problem report",
description: "The superset of available fields is: <ul> <li><b>category_id (integer)
</b>:The id of the category that the report is for</li> <li><b>description (string)
</b>:The description of the problem</li> <li><b>address (string)</b>:The address
near where the problem occurred</li> <li><b>lat (string)</b>:Latitude of the
occurence</li> <li><b>lng (string)</b>:Longitude of the occurence</li> <li>
<b>image (string)</b>:base64 representation of an image of the problem of
the occurence</li> </ul>",
operationId: "problem-report-field-list",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "The list of fields. If the fields has a list of
acceptable values, then 'value_list' will be shown populated with
this values",
examples:  {
data:  [
{
field: "category_id",
required: true,
label: "Κατηγορία"
},
{
field: "description",
required: true,
label: "Περιγραφή"
},
{
field: "address",
required: false,
label: "Διεύθυνση"
},
{
field: "lat",
required: true,
label: "lat"
},
{
field: "lng",
required: true,
label: "lng"
},
{
field: "image",
required: false,
label: "Εικόνα"
}
]
}
},
401:  {
description: "invalid api key"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/municipalities/{category_id}/reports:  {
post:  {
tags:  [
"Problem Reports"
],
summary: "Allow a registered cityzen to submit a problem report. You should
send the fields returned by the fields endpoint. If some are required
and not set, you' ll get the according error response.",
operationId: "cityzen-report-submit",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "category_id",
in: "path",
description: "The id of the category that the report is for",
required: true,
type: "integer"
},
{
$ref: "#/parameters/Authorization"
}
],
responses:  {
200:  {
description: "The report object",
examples:  {
application/json:  {
data:  {
id: "2017-1",
image: "image.jpeg",
description: "Υπάρχει πρόβλημα με λακούβα στο δρόμο",
address: "Αλμπερτ Σβαιτσερ 12",
coordinates:  {
lat: "35.339055",
lng: "25.133114200000023"
}
}
}
}
},
401:  {
description: "invalid api key"
},
422:  {
description: "Validation errors. Key is the field with the
validation error and value is an array of validation error messages",
examples:  {
application/json:  {
error:  {
lat:  [
"A value is required for field lat.",
"lat must be a number."
]
}
}
}
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/municipalities/{category_id}/reports/unregistered:  {
post:  {
tags:  [
"Problem Reports"
],
summary: "Allow an unregistered cityzen to submit a problem report.
Apart from the fields described below, you should also send the fields
returned by the fields endpoint. If some are required and not set,
you' ll get the according error response.",
operationId: "unregistered-cityzen-report-submit",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "category_id",
in: "path",
description: "The id of the category that the report is for",
required: true,
type: "integer"
},
{
name: "firstname",
in: "formData",
description: "The cityzen's firstname",
required: true,
type: "string"
},
{
name: "lastname",
in: "formData",
description: "The cityzen's lastname",
required: true,
type: "string"
},
{
name: "phone",
in: "formData",
description: "The cityzen's phone number",
required: true,
type: "string"
},
{
name: "email",
in: "formData",
description: "The cityzen's email",
required: false,
type: "string"
},
{
name: "cityzen_address",
in: "formData",
description: "The cityzen's address",
required: false,
type: "string"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "The report object",
examples:  {
application/json:  {
data:  {
id: "2017-1",
image: "image.jpeg",
description: "Υπάρχει πρόβλημα με λακούβα στο δρόμο",
address: "Αλμπερτ Σβαιτσερ 12",
coordinates:  {
lat: "35.339055",
lng: "25.133114200000023"
}
}
}
}
},
401:  {
description: "invalid api key"
},
422:  {
description: "Validation errors. Key is the field with the
validation error and value is an array of validation error messages",
examples:  {
application/json:  {
error:  {
lat:  [
"A value is required for field lat.",
"lat must be a number."
]
}
}
}
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/municipalities/reports:  {
get:  {
tags:  [
"Problem Reports"
],
summary: "Return a list of problem reports submitted by this registered user",
operationId: "problem-report-user-list",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "include",
in: "query",
description: "comma separated list of extra resources to include",
type: "array",
items:  {
type: "string",
default: "owner_comments",
enum:  [
"owner_comments"
]
},
collectionFormat: "csv"
},
{
name: "status_filter",
in: "query",
description: "comma separated list of status filters (or
condition applied for multiple values)",
type: "array",
items:  {
type: "string",
enum:  [
"status_submitted",
"status_assigned",
"status_working_on",
"status_completed",
"status_archived"
]
},
collectionFormat: "csv"
},
{
$ref: "#/parameters/Authorization"
}
],
responses:  {
200:  {
description: "An array of problem report objects",
examples:  {
application/json:  {
data:  [
{
id: "2018-1",
image: "image.jpeg",
description: "Υπάρχει πρόβλημα με λακούβα στο δρόμο",
address: "Αλμπερτ Σβαιτσερ 12",
coordinates:  {
lat: "35.339055",
lng: "25.133114200000023"
},
status: "Ανατέθηκε",
owner_comments:  {
data:  [
{
comment: "OK το κοιτάμε",
created_at: "2018-02-14 10:54:53"
}
]
},
created_at: "2018-02-01 12:50:32"
},
{
id: "2018-2",
image: "image.jpeg",
description: "Υπάρχει πρόβλημα με λακούβα στο δρόμο",
address: "Αλμπερτ Σβαιτσερ 12",
coordinates:  {
lat: "35.339055",
lng: "25.133114200000023"
},
status: "Ανατέθηκε",
owner_comments:  {
data: [ ]
},
created_at: "2018-02-01 12:53:40"
}
]
}
}
},
401:  {
description: "invalid user"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/municipalities/reports/{$id}:  {
get:  {
tags:  [
"Problem Reports"
],
summary: "Return the problem report with the given id submitted by this user",
operationId: "problem-report-user-show",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "id",
in: "path",
description: "the id of the report",
type: "string"
},
{
name: "include",
in: "query",
description: "comma separated list of extra resources to include",
type: "array",
items:  {
type: "string",
default: "owner_comments",
enum:  [
"owner_comments"
]
},
collectionFormat: "csv"
},
{
$ref: "#/parameters/Authorization"
}
],
responses:  {
200:  {
description: "The report object",
examples:  {
application/json:  {
data:  {
id: "2018-1",
image: "image.jpeg",
description: "Υπάρχει πρόβλημα με λακούβα στο δρόμο",
address: "Αλμπερτ Σβαιτσερ 12",
coordinates:  {
lat: "35.339055",
lng: "25.133114200000023"
},
status: "Ανατέθηκε",
owner_comments:  {
data:  [
{
comment: "OK το κοιτάμε",
created_at: "2018-02-14 10:54:53"
}
]
},
created_at: "2018-02-01 12:50:32"
}
}
}
},
401:  {
description: "invalid user"
},
404:  {
description: "invalid id"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/user/registrationFields:  {
get:  {
tags:  [
"Users"
],
summary: "The fields that are presented on the registration form
of a new user (apart from email,password)",
operationId: "registration_fields",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "The list of fields. If the fields has a list of
acceptable values, then 'value_list' will be shown populated
with this values",
examples:  {
data:  [
{
field: "name",
type: "text",
required: true,
label: "Fullname"
},
{
field: "municipal_section",
type: "list",
required: false,
label: "Municipal Section",
value_list:  [
"Section 1",
"Section 2"
]
}
]
}
},
401:  {
description: "invalid api key"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/user/register:  {
post:  {
tags:  [
"Users"
],
summary: "Register with the extra fields returned by registrationFields
endpoint. Apart from the fields shown below you can also send all the other
fields returned by the previous endpoint. If some are required and not set,
you' ll get the according error response.",
operationId: "register",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "email",
in: "formData",
description: "Email address",
required: true,
type: "string"
},
{
name: "password",
in: "formData",
description: "Password",
required: true,
type: "string"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "successful operation",
schema:  {
properties:  {
token:  {
type: "string"
},
user:  {
type: "object"
}
}
},
examples:  {
data:  {
message: "Check you email address, in order to
complete your registration!"
}
}
},
401:  {
description: "invalid api key"
},
422:  {
description: "invalid parameter values",
examples:  {
error:  {
email:  [
"The email has already been taken."
]
}
}
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/municipalities/tasks:  {
get:  {
tags:  [
"Work Orders"
],
summary: "Return a list of work orders that are assigned to the user",
operationId: "task-index",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "include",
in: "query",
description: "comma separated list of extra resources to include",
type: "array",
items:  {
type: "string",
default: "input",
enum:  [
"input",
"report"
]
},
collectionFormat: "csv"
},
{
name: "status_filter",
in: "query",
description: "comma separated list of status filters (or condition
applied for multiple values)",
type: "array",
items:  {
type: "string",
enum:  [
"status_pending",
"status_read",
"status_in_progress",
"status_success",
"status_error"
]
},
collectionFormat: "csv"
},
{
$ref: "#/parameters/Authorization"
}
],
responses:  {
200:  {
description: "An array of task objects",
examples:  {
application/json:  {
data:  [
{
id: 6,
name: "test2",
info: "test2",
deadline: "2018-02-14",
priority: "Υψηλή",
status: "Σε διαδικασία χειρισμού",
updated_at: "2018-03-13 10:22:12",
files:  [
{
url: "image.png",
mime: "image/png",
caption: ""
}
],
input:  {
data:  [
{
user: "Συνεργείο1 Heraklion",
comment: "asa",
image: "image.png",
created_at: "2018-02-13 13:18:04"
}
]
}
},
{
id: 5,
name: "Εργασία 1",
info: "Πάρε να χεις2",
deadline: "2018-03-10",
priority: "Κανονική",
status: "Εκκρεμεί",
files: [ ],
comments:  {
data: [ ]
}
}
]
}
}
},
401:  {
description: "invalid user"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/municipalities/tasks/{id}:  {
get:  {
tags:  [
"Work Orders"
],
summary: "Return a specific workorder",
operationId: "task-show",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "id",
in: "path",
description: "the id of the workorder",
type: "string"
},
{
name: "include",
in: "query",
description: "comma separated list of extra resources to include",
type: "array",
items:  {
type: "string",
default: "input",
enum:  [
"input",
"report"
]
},
collectionFormat: "csv"
},
{
$ref: "#/parameters/Authorization"
}
],
responses:  {
200:  {
description: "An array of task objects",
examples:  {
application/json:  {
data:  [
{
id: 6,
name: "test2",
info: "test2",
deadline: "2018-02-14",
priority: "Υψηλή",
status: "Σε διαδικασία χειρισμού",
updated_at: "2018-03-13 10:22:12",
files:  [
{
url: "image.png",
mime: "image/png",
caption: ""
}
],
input:  {
data:  [
{
user: "Συνεργείο1 Heraklion",
comment: "asa",
image: "image.png",
created_at: "2018-02-13 13:18:04"
}
]
}
},
{
id: 5,
name: "Εργασία 1",
info: "Πάρε να χεις2",
deadline: "2018-03-10",
priority: "Κανονική",
status: "Εκκρεμεί",
files: [ ],
comments:  {
data: [ ]
}
}
]
}
}
},
401:  {
description: "invalid user"
},
500:  {
description: "internal server error"
}
}
}
},
/lang}/municipalities/tasks/{id}:  {
post:  {
tags:  [
"Work Orders"
],
summary: "Allow a crew member to update a certain work order",
operationId: "task-update",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "id",
in: "query",
description: "The id of the task",
required: true,
type: "integer"
},
{
name: "status",
in: "formData",
description: "The status of the task.
Available values:
{status_pending,status_read,status_in_progress,
status_success,status_error}",
required: false,
type: "string",
enum:  [
"status_pending",
"status_read",
"status_in_progress",
"status_success",
"status_error"
]
},
{
name: "comment",
in: "path",
description: "A comment",
required: false,
type: "string"
},
{
name: "image",
in: "path",
description: "base64 representation of an image to
accompany the comment",
required: false,
type: "string"
},
{
$ref: "#/parameters/Authorization"
}
],
responses:  {
200:  {
description: "The task object",
examples:  {
application/json:  {
data:  {
id: 6,
name: "test2",
info: "test2",
deadline: "2018-02-14",
priority: "Υψηλή",
status: "Διεκπεραιωμένο - επιτυχώς",
files:  [
{
url: "image.png",
mime: "image/png",
caption: ""
}
],
input:  {
data:  [
{
user: "Συνεργείο1 Heraklion",
comment: "test",
image: "image.png",
created_at: "2018-02-15 11:55:36"
},
{
user: "Συνεργείο1 Heraklion",
comment: "test",
image: null,
created_at: "2018-02-15 11:53:25"
},
{
user: "Συνεργείο1 Heraklion",
comment: "asa",
image: "image.png",
created_at: "2018-02-13 13:18:04"
}
]
}
}
}
}
},
401:  {
description: "invalid api key"
},
422:  {
description: "Validation errors. Key is the field with
the validation error and value is an array of validation error messages",
examples:  {
application/json:  {
error:  {
lat:  [
"A value is required for field lat.",
"lat must be a number."
]
}
}
}
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/municipalities/tasks/status:  {
get:  {
tags:  [
"Work Orders"
],
summary: "Return a list of possible statuses for a work order",
operationId: "task-status-index",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "A object with status codes as keys and labels as objects",
examples:  {
application/json:  {
data:  [
{
id: 6,
name: "test2",
info: "test2",
deadline: "2018-02-14",
priority: "Υψηλή",
status: "Σε διαδικασία χειρισμού",
files:  [
{
url: "image.png",
mime: "image/png",
caption: ""
}
],
input:  {
data:  [
{
user: "Συνεργείο1 Heraklion",
comment: "asa",
image: "image.png",
created_at: "2018-02-13 13:18:04"
}
]
}
},
{
id: 5,
name: "Εργασία 1",
info: "Πάρε να χεις2",
deadline: "2018-03-10",
priority: "Κανονική",
status: "Εκκρεμεί",
files: [ ],
comments:  {
data: [ ]
}
}
]
}
}
},
401:  {
description: "invalid user"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/notifications:  {
get:  {
tags:  [
"Notifications"
],
summary: "Return a list of notifications for this specific user",
operationId: "notification-list",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
$ref: "#/parameters/Authorization"
},
{
name: "read_filter",
in: "query",
description: "If true only read notification retrieved.
If false only unread are retrieved. In not set all are retrieved",
type: "boolean"
},
{
name: "created_at_filter",
in: "query",
description: "The bottom limit date, since when we want
to retrieve dates. The format is YYYY-MM-DD HH:mm e.g 2018-12-31 23:59",
type: "string"
}
],
responses:  {
200:  {
description: "The list of notifications",
examples:  {
data:  [
{
id: "de8d1238-4e99-43de-bf90-353b943cc3a1",
type: "work_order_new_comment",
title: "Νεό σχόλιο σε εντολή εργασίας",
body: "τι θα γίνει ρε Νταλάρα?",
data:  {
id: 50
},
created_at: "2018-10-10 10:07:37",
read_at: null
},
{
id: "205dc075-b0cc-45f2-be48-3cc9e51fa69e",
type: "task_new",
title: "Νέα Εργασία",
body: "νέα εργασία",
data:  {
id: 9
},
created_at: "2018-10-08 13:44:45",
read_at: null
}
]
}
},
401:  {
description: "invalid api key"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/notifications/{id}/read:  {
post:  {
tags:  [
"Notifications"
],
summary: "Allow a registered user to mark a notification as read",
operationId: "notification-mark-read",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "id",
in: "path",
description: "The id of the notification",
required: true,
type: "string"
},
{
$ref: "#/parameters/Authorization"
}
],
responses:  {
200:  {
description: "The notification object",
examples:  {
application/json:  {
data: [ ]
}
}
},
401:  {
description: "invalid api key"
},
422:  {
description: "Validation errors. Key is the field with the
validation error and value is an array of validation error messages",
examples:  {
application/json:  {
error:  {
lat:  [
"A value is required for field lat.",
"lat must be a number."
]
}
}
}
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/questionnaires:  {
get:  {
tags:  [
"Questionnaires"
],
summary: "Return a list of questionnaires",
operationId: "questionnaire-index",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "An array of questionnaire objects",
examples:  {
application/json:  {
data:  [
{
id: 1,
name: "Ερωτηματολόγιο",
description: "",
fields:  [
{
info: null,
type: "text",
group: "",
label: "Όνομα",
required: true
}
]
}
]
}
}
},
401:  {
description: "invalid api key"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/questionnaires/{id}:  {
get:  {
tags:  [
"Questionnaires"
],
summary: "Return a specific questionnaire",
operationId: "questionnaire-show",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "id",
in: "path",
description: "The id of the questionnaire",
required: true,
type: "string"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "A questionnaire object",
examples:  {
application/json:  {
data:  {
id: 1,
name: "Ερωτηματολόγιο",
description: "",
fields:  [
{
info: null,
type: "text",
group: "",
label: "Όνομα",
required: true
}
]
}
}
}
},
401:  {
description: "invalid api key"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/questionnaires/{questionnaire_id}/input:  {
get:  {
tags:  [
"Questionnaires"
],
summary: "Get all fill-ins of the cityzen for the given questionnaire",
operationId: "questionnaire-fill-in-index",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "questionnaire_id",
in: "path",
description: "The id of the questionnaire that the request is for",
required: true,
type: "string"
},
{
$ref: "#/parameters/Authorization"
}
],
responses:  {
200:  {
description: "The request object",
examples:  {
application/json:  {
data:  {
id: "2017-1",
input:  {
lat: "35.339055",
lng: "25.133114200000023"
}
}
}
}
},
401:  {
description: "invalid api key"
},
422:  {
description: "Validation errors. Key is the field with the
validation error and value is an array of validation error messages",
examples:  {
application/json:  {
error:  {
lat:  [
"A value is required for field lat.",
"lat must be a number."
]
}
}
}
},
500:  {
description: "internal server error"
}
}
},
post:  {
tags:  [
"Questionnaires"
],
summary: "Allow a cityzen to fill in a questionnaire",
operationId: "questionnaire-submit",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "questionnaire_id",
in: "path",
description: "The id of the questionnaire that the request is for",
required: true,
type: "string"
},
{
name: "input",
in: "path",
description: "The json array of the fields as returned by the
according questionnaire endpoint. Each object in the array should
have an extra key named 'value' with the according field value",
required: true,
type: "string"
},
{
$ref: "#/parameters/Authorization"
}
],
responses:  {
200:  {
description: "The request object",
examples:  {
application/json:  {
data:  {
id: "2017-1",
input:  {
lat: "35.339055",
lng: "25.133114200000023"
}
}
}
}
},
401:  {
description: "invalid api key"
},
422:  {
description: "Validation errors. Key is the field with the
validation error and value is an array of validation error messages",
examples:  {
application/json:  {
error:  {
lat:  [
"A value is required for field lat.",
"lat must be a number."
]
}
}
}
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/questionnaires/{questionnaire_id}/input/unregistered:  {
post:  {
tags:  [
"Questionnaires"
],
summary: "Allow an unregistered user to fill in a questionnaire",
operationId: "unregistered-questionnaire-submit",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "questionnaire_id",
in: "path",
description: "The id of the questionnaire that the request is for",
required: true,
type: "string"
},
{
name: "input",
in: "path",
description: "The json array of the fields as returned by the
according questionnaire endpoint. Each object in the array should
have an extra key named 'value' with the according field value",
required: true,
type: "string"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "The request object",
examples:  {
application/json:  {
data:  {
id: "2017-1",
input:  {
lat: "35.339055",
lng: "25.133114200000023"
}
}
}
}
},
401:  {
description: "invalid api key"
},
422:  {
description: "Validation errors. Key is the field with the
validation error and value is an array of validation error messages",
examples:  {
application/json:  {
error:  {
lat:  [
"A value is required for field lat.",
"lat must be a number."
]
}
}
}
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/services:  {
get:  {
tags:  [
"Services"
],
summary: "Return a list of services",
operationId: "service-index",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "An array of service objects",
examples:  {
application/json:  {
data:  [
{
id: 1,
name: "Υπηρεσία 1",
description: "",
fields:  [
{
info: null,
type: "text",
group: "",
label: "Όνομα",
required: true
}
]
}
]
}
}
},
401:  {
description: "invalid api key"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/services/{id}:  {
get:  {
tags:  [
"Services"
],
summary: "Return a specific service",
operationId: "service-show",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "id",
in: "path",
description: "The id of the service",
required: true,
type: "string"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "A Service object",
examples:  {
application/json:  {
data:  {
id: 1,
name: "Υπηρεσία",
description: "",
fields:  [
{
info: null,
type: "text",
group: "",
label: "Όνομα",
required: true
}
]
}
}
}
},
401:  {
description: "invalid api key"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/services/{service_id}/input:  {
get:  {
tags:  [
"Services"
],
summary: "Get all requests of the cityzen for the given Service",
operationId: "Service-request-index",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "Service_id",
in: "path",
description: "The id of the Service that the request is for",
required: true,
type: "string"
},
{
$ref: "#/parameters/Authorization"
}
],
responses:  {
200:  {
description: "The request object",
examples:  {
application/json:  {
data:  {
id: "2017-1",
input:  {
lat: "35.339055",
lng: "25.133114200000023"
}
}
}
}
},
401:  {
description: "invalid api key"
},
422:  {
description: "Validation errors. Key is the field with the
validation error and value is an array of validation error messages",
examples:  {
application/json:  {
error:  {
lat:  [
"A value is required for field lat.",
"lat must be a number."
]
}
}
}
},
500:  {
description: "internal server error"
}
}
},
post:  {
tags:  [
"Services"
],
summary: "Allow a user to submit a service request",
operationId: "Service-request-submit",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "service_id",
in: "path",
description: "The id of the service that the request is for",
required: true,
type: "string"
},
{
name: "input",
in: "path",
description: "The json array of the fields as returned by the
according service endpoint. Each object in the array should have an
extra key named 'value' with the according field value",
required: true,
type: "string"
},
{
$ref: "#/parameters/Authorization"
}
],
responses:  {
200:  {
description: "The request object",
examples:  {
application/json:  {
data:  {
id: "2017-1",
input:  {
lat: "35.339055",
lng: "25.133114200000023"
}
}
}
}
},
401:  {
description: "invalid api key"
},
422:  {
description: "Validation errors. Key is the field with the
validation error and value is an array of validation error messages",
examples:  {
application/json:  {
error:  {
lat:  [
"A value is required for field lat.",
"lat must be a number."
]
}
}
}
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/services/{service_id}/input/unregistered:  {
post:  {
tags:  [
"Services"
],
summary: "Allow an unregistered user to request a service",
operationId: "unregistered-service-request-submit",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "Service_id",
in: "path",
description: "The id of the service that the request is for",
required: true,
type: "string"
},
{
name: "input",
in: "path",
description: "The json array of the fields as returned by the
according service endpoint. Each object in the array should have an
extra key named 'value' with the according field value",
required: true,
type: "string"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "The request object",
examples:  {
application/json:  {
data:  {
id: "2017-1",
input:  {
lat: "35.339055",
lng: "25.133114200000023"
}
}
}
}
},
401:  {
description: "invalid api key"
},
422:  {
description: "Validation errors. Key is the field with the validation
error and value is an array of validation error messages",
examples:  {
application/json:  {
error:  {
lat:  [
"A value is required for field lat.",
"lat must be a number."
]
}
}
}
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/services/{service_id}/input/{id}:  {
get:  {
tags:  [
"Services"
],
summary: "Get a specific service request for the given user",
operationId: "service-request-show",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "service_id",
in: "path",
description: "The id of the service that the request is for",
required: true,
type: "string"
},
{
name: "id",
in: "path",
description: "The id of the service request",
required: true,
type: "string"
},
{
$ref: "#/parameters/Authorization"
}
],
responses:  {
200:  {
description: "The request object",
examples:  {
application/json:  {
data:  {
id: "2017-1",
input:  {
lat: "35.339055",
lng: "25.133114200000023"
}
}
}
}
},
401:  {
description: "invalid api key"
},
422:  {
description: "Validation errors. Key is the field with the validation
error and value is an array of validation error messages",
examples:  {
application/json:  {
error:  {
lat:  [
"A value is required for field lat.",
"lat must be a number."
]
}
}
}
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/sso_token:  {
post:  {
tags:  [
"SSO"
],
summary: "Get a token",
operationId: "uoc-sso-index",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "msisdn",
in: "formData",
description: "Cellphone number, to which the token will be sent in
10digit only format .eg 6971234567",
required: true,
type: "string"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "Send an SMS including a token to the provided msisdn",
examples:  {
application/json:  {
data: "Ο κωδικός επιβεβαίωσης θα έρθει στο κινητό: 6971234567
μέσα στα επόμενα λεπτά"
}
}
},
401:  {
description: "invalid api key"
},
404:  {
description: "No sms originator set",
examples:  {
application/json:  {
error:  {
code: "GEN-NOT-FOUND",
http_code: 404,
message: "There is no sms originator set for this application."
}
}
}
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/sso_data:  {
post:  {
tags:  [
"SSO"
],
summary: "Get a token",
operationId: "uoc-sso-data",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "msisdn",
in: "formData",
description: "Cellphone number, to which the token was sent in 10digit only format .eg 6971234567",
required: true,
type: "string"
},
{
name: "token",
in: "formData",
description: "Token that was sent to the previous cellphone number",
required: true,
type: "string"
},
{
name: "page",
in: "formData",
description: "Page number of data",
type: "string"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "Use the provided token to retrieve authenticated data",
examples:  {
application/json:  {
data:  [
[ ]
]
}
}
},
400:  {
description: "Invalid token",
examples:  {
application/json:  {
error:  {
code: "GEN-WRONG-ARGS",
http_code: 400,
message: "Ο κωδικός επιβεβαίωσης δεν είναι έγκυρος"
}
}
}
},
401:  {
description: "invalid api key"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/tasks/mine:  {
get:  {
tags:  [
"Tasks"
],
summary: "Return a list of the user assigned tasks",
operationId: "tasks-mine-index",
produces:  [
"application/json"
],
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "filter_status",
in: "query",
description: "filter results by status",
type: "integer"
},
{
name: "filter_priority",
in: "query",
description: "filter results by priority",
type: "integer"
},
{
name: "include",
in: "query",
description: "comma separated list of extra resources to include",
type: "array",
items:  {
type: "string",
default: "comments",
enum:  [
"counts",
"comments"
]
}
},
{
$ref: "#/parameters/Authorization"
}
],
responses:  {
200:  {
description: "An array of task objects",
examples:  {
data:  [
{
id: 240,
name: "one timer",
info: null,
assign_from_name: "ΚΕΠ Heraklion",
assign_from_id: 6,
assign_date:  {
date: "2018-06-11 11:45:58.000000",
timezone_type: 3,
timezone: "Europe/Athens"
},
deadline:  {
date: "2018-06-20 14:45:10.000000",
timezone_type: 3,
timezone: "Europe/Athens"
},
priority: "ΚΡΙΣΙΜΗ",
priority_id: 20,
priority_visual: "...",
status: "Ολοκληρωμένο",
status_id: 40,
status_visual: "...",
comments_count: 1,
updated_at: "2018-06-11 11:46:32",
fields:  [
{
id: "a5q3jhz85k",
info: null,
type: "checkbox",
group: null,
label: "Ήταν παρών ο υπεύθυνος",
required: false,
conditions: [ ],
editRepeatability: false,
default: null
},
{
id: "zdtrupe28r",
info: null,
type: "rating",
extra:  {
step: 1
},
group: null,
label: "βαθμολογία3",
required: true,
conditions: [ ],
editRepeatability: false,
default: null
}
],
comments:  {
data:  [
{
id: 12,
commenter_name: "ΚΕΠ Heraklion",
commenter_id: 6,
comment: "<p>&Gamma;&iota;&alpha; &delta;&omicron;&kappa;&iota;&mu;ή...</p>",
updated_at: "2018-06-26 22:00:59"
}
]
},
hotel:  {
data:  {
id: "dbBr30P3VdFhm6HEswmY33gRolDZ76Ts74YaWWwU",
image: "",
logo: "",
logo_mobile: "",
name: "Demo Hotel 2",
address: "",
description: "",
contact_details: null,
social: null,
coordinates: null,
photos: [ ]
}
},
rrule: "FREQ=WEEKLY;UNTIL=20190802T085001+0300",
rrule_textual: "εβδομαδιαία την Πέμπτη μέχρι 2 Αυγούστου 2019",
counts:  {
data:  {
total_task_count: 10,
remaining_task_count: 3
}
}
},
{
id: 7,
name: "ΠΑΡΕ ΚΑΙ ΚΑΝΕ",
info: "ΤΕΣΤ",
assign_from_name: "Crew Demo Hotel",
assign_from_id: 4,
assign_date:  {
date: "2019-06-11 18:46:22.000000",
timezone_type: 3,
timezone: "Europe/Athens"
},
deadline:  {
date: "2019-06-17 18:46:22.000000",
timezone_type: 3,
timezone: "Europe/Athens"
},
priority: "Κανονική",
priority_id: 0,
priority_visual: "...",
status: "Αναγνωσμένη",
status_id: 10,
status_visual: "...",
comments_count: 0,
updated_at: "2019-06-11 18:52:01",
fields:  [
{
id: "3ilp4vp1x1e",
info: null,
type: "list",
extra:  {
multiple: false,
values:  {
1: "100",
2: "101",
3: "210",
4: "212",
5: "213"
}
},
group: null,
label: "Δωμάτιο",
required: true,
conditions: [ ],
globalListType: "rooms",
editRepeatability: false,
default: null
}
],
values:  [
{
id: "3ilp4vp1x1e",
value: "4"
}
],
groups: [ ],
comments:  {
data: [ ]
},
hotel:  {
data:  {
id: "9vAVu3zO9I2feZc64jCkqanaVZ1OkqE1OMrvYRRK",
image: "",
logo: "",
logo_mobile: "",
name: "Demo Hotel",
address: "",
description: "",
contact_details: null,
social: null,
coordinates:  {
lat: 35.328785337019966,
lng: 25.242943570282364
},
photos: [ ]
}
}
}
]
}
},
401:  {
description: "invalid user"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/tasks/mine/{id}:  {
get:  {
tags:  [
"Tasks"
],
summary: "Return a specific task of the user assigned tasks",
operationId: "tasks-mine-view-single",
produces:  [
"application/json"
],
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "id",
in: "path",
description: "The id of the task",
required: true,
type: "integer"
},
{
$ref: "#/parameters/Authorization"
}
],
responses:  {
200:  {
description: "A task object. For example of task object see index
endpoint which contains an array of those"
},
401:  {
description: "invalid user"
},
410:  {
description: "when a task is likely to have been archived"
},
500:  {
description: "internal server error"
}
}
},
patch:  {
tags:  [
"Tasks"
],
summary: "Update a task assigned to the user",
operationId: "tasks-mine-update",
consumes:  [
"application/json"
],
produces:  [
"application/json"
],
parameters:  [
{
$ref: "#/parameters/lang"
},
{
name: "id",
in: "path",
description: "The id of the task",
required: true,
type: "integer"
},
{
name: "status",
in: "formData",
description: "The status of the task. <strong>Required if no other
input is provided.</strong> Available values: {0,10,20,30,40}.
Example payload: { status: 30 }",
type: "integer",
enum:  [
0,
10,
20,
30,
40
]
},
{
name: "comment",
in: "formData",
description: "A new comment for the task. <strong>Required if
no other input is provided.</strong>",
type: "string"
},
{
name: "input",
in: "formData",
description: "The json array of the fields as returned by the
index or view endpoint. Each object in the array should have
an extra key named 'value' with the according field value.
<strong>Required if no other input is provided.</strong>",
type: "array",
items: [ ]
},
{
$ref: "#/parameters/Authorization"
}
],
responses:  {
200:  {
description: "The updated task object. For example of task
object see index endpoint which contains an array of those"
 
},
400:  {
description: "Provided status is unknown OR input is invalid.",
examples:  {
application/json:  {
error:  {
code: "GEN-WRONG-ARGS",
http_code: 400,
message: "Άγνωστη αλλαγή κατάστασης της εργασίας"
}
}
}
},
401:  {
description: "invalid api key"
},
422:  {
description: "Validation errors. The message key holds the
errors which may be an array or a string.",
examples:  {
application/json:  {
error:  {
code: "GEN-UNPROCESSABLE",
http_code: 422,
message:  {
status:  [
"The status field is required when comment is not present."
],
comment:  [
"The comment field is required when status is not present."
]
}
}
}
}
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/tasks/statuses:  {
get:  {
tags:  [
"Tasks"
],
summary: "Return a list of possible statuses for a task, with entries in the form status_id: status.",
operationId: "tasks-catalog-status",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "An object with status codes (status_id) as keys and labels (status) as objects",
examples:  {
application/json:  {
0: "Μη αναγνωσμένο",
10: "Ανοικτό",
20: "Μη αποδεκτό",
30: "Σε εξέλιξη",
40: "Ολοκληρωμένο"
}
}
},
401:  {
description: "Unauthorized"
},
500:  {
description: "internal server error"
}
}
}
},
/{lang}/tasks/priorities:  {
get:  {
tags:  [
"Tasks"
],
summary: "Return a list of possible priorities for a task, with entries in the form priority_id: priority.",
operationId: "tasks-catalog-priority",
parameters:  [
{
$ref: "#/parameters/lang"
},
{
$ref: "#/parameters/X-Authorization"
}
],
responses:  {
200:  {
description: "An object with priority codes (priority_id) as keys and labels (priority) as objects",
examples:  {
application/json:  {
0: "ΚΑΝΟΝΙΚΗ",
10: "ΥΨΗΛΗ",
20: "ΚΡΙΣΙΜΗ",
-10: "ΧΑΜΗΛΗ",
-20: "ΕΛΑΣΣΟΝΑ"
}
}
},
401:  {
description: "Unauthorized"
},
500:  {
description: "internal server error"
}
}
}
}
}

Response Messages

HTTP Status CodeReasonResponse ModelHeaders
200Ok
204No Content
400Bad Request
401Unauthorized
403Forbidden
405Method Not Allowed
500Internal Server Error

Στοιχεία Επικοινωνίας

Δευτέρα - Παρασκευή: 8:30 –17:30
+30 2310 500181

Διεύθυνση

Ποσειδώνος 71, Θεσσαλονίκη, Πυλαία, 55535
Συγχρηματοδότηση από την Ευρωπαϊκή Ένωση Ευρωπαϊκό Ταμείο Περιφερειακής Ανάπτυξης ΕΣΠΑ 2014-2020 ΕΣΠΑ 2021-2027 Πρόγραμμα Ανταγωνιστικότητα 2021-2027