Skip to main content

Enumerators API

Enumerators are static dictionaries, where are always returned key:value pairs.

Content

Available enumerators

KeyTypeModuleDescription
custom_field_typesstring-Types of custom fields
billing_typestring-Billing types
billing_time_typestring-Billing time types
project_typesint-Contains Project types
report_setting_typeint-Contains Report setting types
report_setting_task_filterint-Contains Report setting task filters
report_setting_intervalint-Contains Report setting intervals
report_stateint-Contains Report states
user_contract_typeint-Contains User Contract Types
billings_frequencystring-Billings Frequency Types
billings_overview_model_typesstring-Billings Overview Model Types
server_php_versionstring-PHP Versions

billings_at


Multiple enumerators

GET /api/enumerators?with=enumerator1,enumerator2

To obtain multiple enumerators at once send GET request with parameter with. Value of parameter with must contain keys of enumerators separated by comma.

Request

GET /api/enumerators?with=insurance_codes,nationality_codes HTTP/1.1

Responses

200 OK

GET /api/enumerators?with=insurance_codes,nationality_codes HTTP/1.1
Content-Type: application/json
Status-Code: 200

{
"nationality_codes": {
"0": "Afghanistan",
"1": "Albania",
"2": "Algeria",
"3": "Argentina",
"4": "Australia",
"5": "Austria",
"6": "Bangladesh",
"7": "Belgium",
"8": "Bolivia",
"9": "Botswana",
"10": "Brazil",
"11": "Bulgaria",
"12": "Cambodia",
"13": "Cameroon",
"14": "Canada",
"15": "Chile",
"16": "China",
"17": "Colombia",
"18": "Costa Rica",
"19": "Croatia",
"20": "Cuba",
"21": "Czech Republic",
"22": "Denmark",
"23": "Dominican Republic",
"24": "Ecuador",
"25": "Egypt",
"26": "El Salvador",
"27": "England",
"28": "Estonia",
"29": "Ethiopia",
"30": "Fiji",
"31": "Finland",
"32": "France",
"33": "Germany",
"34": "Ghana",
"35": "Greece",
"36": "Guatemala",
"37": "Haiti",
"38": "Honduras",
"39": "Hungary",
"40": "Iceland",
"41": "India",
"42": "Indonesia",
"43": "Iran",
"44": "Iraq",
"45": "Ireland",
"46": "Israel",
"47": "Italy",
"48": "Jamaica",
"49": "Japan",
"50": "Jordan",
"51": "Kenya",
"52": "Kuwait",
"53": "Laos",
"54": "Latvia",
"55": "Lebanon",
"56": "Libya",
"57": "Lithuania",
"58": "Madagascar",
"59": "Malaysia",
"60": "Mali",
"61": "Malta",
"62": "Mexico",
"63": "Mongolia",
"64": "Morocco",
"65": "Mozambique",
"66": "Namibia",
"67": "Nepal",
"68": "Netherlands",
"69": "New Zealand",
"70": "Nicaragua",
"71": "Nigeria",
"72": "Norway",
"73": "Pakistan",
"74": "Panama",
"75": "Paraguay",
"76": "Peru",
"77": "Philippines",
"78": "Poland",
"79": "Portugal",
"80": "Romania",
"81": "Russia",
"82": "Saudi Arabia",
"83": "Scotland",
"84": "Senegal",
"85": "Serbia",
"86": "Singapore",
"87": "Slovakia",
"88": "South Africa",
"89": "South Korea",
"90": "Spain",
"91": "Sri Lanka",
"92": "Sudan",
"93": "Sweden",
"94": "Switzerland",
"95": "Syria",
"96": "Taiwan",
"97": "Tajikistan",
"98": "Thailand",
"99": "Tonga",
"100": "Tunisia",
"101": "Turkey",
"102": "Ukraine",
"103": "United Arab Emirates",
"104": "(The) United Kingdom",
"105": "(The) United States",
"106": "Uruguay",
"107": "Venezuela",
"108": "Vietnam",
"109": "Wales",
"110": "Zambia",
"111": "Zimbabwe"
}
"insurance_codes": {
"111": "Všeobecná zdravotní pojišťovna České republiky.",
"201": "Vojenská zdravotní pojišťovna České republiky",
"205": "Česká průmyslová zdravotní pojišťovna",
"207": "Oborová zdravotní pojišťovna zaměstnanců bank, pojišťoven a stavebnictví",
"209": "Zaměstnanecká pojišťovna Škoda",
"211": "Zdravotní pojišťovna ministerstva vnitra České republiky",
"213": "RBP, zdravotní pojišťovna"
}
}

400 BAD REQUEST

When parameter with is not specified.

GET /api/enumerators HTTP/1.1
Content-Type: application/json
Status-Code: 400

{
"type": "BadUsage",
"message": "No enumerator specified.",
"id": "06f34e6b-77ad-4071-9998-85afe97b0b57"
}

404 NOT FOUND

When one of the required enumerators does not exist.

GET /api/enumerators HTTP/1.1
Content-Type: application/json
Status-Code: 404

{
"type": "NotFound",
"message": "Enumerator does not exist.",
"id": "2418ec20-bfa4-46d7-9a6a-ed70a681ffb8"
}

Single enumerator

GET /api/enumerators/enumerator

Get specific enumerator data.

Request

GET /api/enumerators/insurance_codes HTTP/1.1

Responses

200 OK

GET /api/enumerators/insurance_codes HTTP/1
Content-Type: application/json
Status-Code: 200

{
"insurance_codes": {
"111": "Všeobecná zdravotní pojišťovna České republiky.",
"201": "Vojenská zdravotní pojišťovna České republiky",
"205": "Česká průmyslová zdravotní pojišťovna",
"207": "Oborová zdravotní pojišťovna zaměstnanců bank, pojišťoven a stavebnictví",
"209": "Zaměstnanecká pojišťovna Škoda",
"211": "Zdravotní pojišťovna ministerstva vnitra České republiky",
"213": "RBP, zdravotní pojišťovna"
}
}

404 NOT FOUND

When the required enumerator does not exist.

GET /api/enumerators/unk HTTP/1.1
Content-Type: application/json
Status-Code: 404

{
"type": "NotFound",
"message": "Enumerator does not exist.",
"id": "2418ec20-bfa4-46d7-9a6a-ed70a681ffb8"
}

Response examples

Custom field types

GET /api/enumerators/customFieldTypes HTTP/1
Content-Type: application/json
Status-Code: 200

{
"customFieldTypes": {
"1": "Text",
"2": "Checkbox",
"3": "Číslo",
"4": "Měna",
"5": "Procenta",
"6": "Datum",
"7": "Výběr",
"8": "Hodnocení",
"9": "Email",
"10": "Telefonní číslo",
"11": "URL adresa",
"12": "Výběr uživatele",
"13": "Textové pole",
"14": "Vícenásobný výběr",
"15": "Rag",
"16": "Formula",
"17": "Vícenásobný výběr uživatelů"
}
}

Billing types

GET /api/enumerators/billing_type HTTP/1
Content-Type: application/json
Status-Code: 200

{
"billing_type": {
"1": "Fixní částka",
"2": "Hodinová sazba"
}
}

Billing time types

GET /api/enumerators/billing_time_type HTTP/1
Content-Type: application/json
Status-Code: 200

{
"billing_time_type": {
"1": "Vykázáno",
"2": "Schváleno"
}
}

Project types

GET /api/enumerators/project_type HTTP/1
Content-Type: application/json
Status-Code: 200

{
"project_type": {
"1": "Realizace",
"2": "Support",
"3": "Client"
}
}

Report setting types

GET /api/enumerators/report_setting_type HTTP/1
Content-Type: application/json
Status-Code: 200

{
"report_setting_type": {
"1": "Jednorázový",
"2": "Pravidelný"
}
}

Report setting task filters

GET /api/enumerators/report_setting_task_filter HTTP/1
Content-Type: application/json
Status-Code: 200

{
"report_setting_task_filter": {
"1": "Všechny",
"2": "Pouze nevyfakturované"
}
}

Report setting intervals

GET /api/enumerators/report_setting_interval HTTP/1
Content-Type: application/json
Status-Code: 200

{
"report_setting_interval": {
"1": "Měsíčně",
"2": "Kvartálně"
}
}

Report states

GET /api/enumerators/report_state HTTP/1
Content-Type: application/json
Status-Code: 200

{
"report_state": {
"1": "Vytvořeno",
"2": "Odesláno",
"3": "Schváleno",
"4": "Vyfakturováno"
}
}

User contract types

GET /api/enumerators/report_state HTTP/1
Content-Type: application/json
Status-Code: 200

{
"user_contract_type": {
"1": "Hlavní pracovní poměr",
"2": "Zkrácený úvazek",
"3": "Dohoda o provedení práce",
"4": "Živnostenský list"
}
}

Server PHP Versions

GET /api/enumerators/server_php_version HTTP/1
Content-Type: application/json
Status-Code: 200

{
"server_php_version": {
"V_8_3": "8.3",
"V_8_2": "8.2",
"V_8_1": "8.1",
"V_8_0": "8.0",
"V_7_4": "7.4",
"V_7_2": "7.2"
}
}

Billings Overview Model Types

GET /api/enumerators/billings_overview_model_types HTTP/1
Content-Type: application/json
Status-Code: 200

{
"billings_overview_model_types": {
"1": "Faktura klientské smlouvy",
"2": "Faktura klientského hostingu",
"3": "Projekt"
}
}

Billings Frequency

GET /api/enumerators/billings_frequency HTTP/1
Content-Type: application/json
Status-Code: 200

{
"billings_frequency": {
"1": "Měsíčně",
"2": "Kvartálně",
"3": "Ročně"
}
}

Billings At

GET /api/enumerators/billings_at HTTP/1
Content-Type: application/json
Status-Code: 200

{
"billings_at": {
"1": "Na začátku období",
"2": "Na konci období"
}
}

SLA Limit Time Period

GET /api/enumerators/sla_limit_time_period HTTP/1
Content-Type: application/json
Status-Code: 200

{
"sla_limit_time_period": {
"WEEKLY": "Týdně",
"MONTHLY": "Měsíčně"
},
}

Contact Type (SLA)

GET /api/enumerators/contact_type HTTP/1
Content-Type: application/json
Status-Code: 200

{
"contact_type": {
"EMAIL": "E-mail"
}
}