Introduction
OpenAPI documentation for the application
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
Your token is generated by dataverse and sent to you. Alternatively, you can use Create api token call to generate a token using your test username-password credentials and your domain.
Authentication
APIs for user authentication
Create api token
Authenticate by username and password (log-in). Using the Avail API from server applications, just use the access token you received. No need for username-password login.
Example request:
curl --request POST \
"https://availability-prod.dataverse.gr/api/personal-access-tokens" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"sdm@dataverse.gr\",
\"password\": \"someHAPPYp@ssw0rd\",
\"domain\": \"dataverse.gr\"
}"
const url = new URL(
"https://availability-prod.dataverse.gr/api/personal-access-tokens"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "sdm@dataverse.gr",
"password": "someHAPPYp@ssw0rd",
"domain": "dataverse.gr"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Refresh api token
requires authentication
Create a new api token for the logged in user.
Example request:
curl --request POST \
"https://availability-prod.dataverse.gr/api/personal-access-tokens/current/refresh" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://availability-prod.dataverse.gr/api/personal-access-tokens/current/refresh"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete api token
requires authentication
Delete token for the logged in user (log-out).
Example request:
curl --request DELETE \
"https://availability-prod.dataverse.gr/api/personal-access-tokens/current" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://availability-prod.dataverse.gr/api/personal-access-tokens/current"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Availability calculation sessions
APIs for managing availability calculation sessions.
You can query for availability for one or more time constrained entity groups. A time constrained entity group, is a group of time constrained entities which form a meaningful business logic entity. For example, to get the availability of a person in a location (business logic entity) you may need to include several time constrained entities:
a) Person's specific days off.
b) Location specific holidays
c) Banking holidays of the country
d) Common working hours of a country
All the above time constrained entities (prioritized) combined together form a meaningful time constrained entity group.
In case you want to query availability of multiple business logic entities combined, ie: a PERSON with some EQUIPMENT, then you need form two time constrained entities groups:
a) For the person
b) For the equipment
Create
requires authentication
Store an availability calculation session
Example request:
curl --request POST \
"https://availability-prod.dataverse.gr/api/availability-calculation-sessions" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"persist_result\": true,
\"date_from\": 1704528000,
\"date_until\": 1704639600,
\"time_constrained_entity_groups\": [
{
\"time_constrained_entity_ids\": [
\"64b507f3-9fbe-34d7-aa3a-ceb2d2682c27\"
]
}
]
}"
const url = new URL(
"https://availability-prod.dataverse.gr/api/availability-calculation-sessions"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"persist_result": true,
"date_from": 1704528000,
"date_until": 1704639600,
"time_constrained_entity_groups": [
{
"time_constrained_entity_ids": [
"64b507f3-9fbe-34d7-aa3a-ceb2d2682c27"
]
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "a859cf61-2467-3252-9256-0bcbc0a340a7",
"date_from": 1704528000,
"date_from_string": "2024-01-06T08:00:00+00:00",
"date_until": 1704985200,
"date_until_string": "2024-01-11T15:00:00+00:00",
"status": "SUCCESS",
"error": null,
"time_constrained_entity_groups": [
{
"time_constrained_entity_ids": [
"9b0516c6-10a5-4da0-b17d-8898b5adb0b4",
"9b05144b-93fd-4e53-8fe0-d690f35f7cef",
"9aff2f1a-9c34-40f7-9a35-ae22c309f925"
],
"availability_calculation_days": [
{
"id": "c4907188-62e5-47d8-9211-e6262c7e9815",
"availabilities": []
},
{
"id": "ee146a4f-050b-45bb-86e1-c52dc4a3590f",
"availabilities": []
},
{
"id": "509f3ac1-8c28-47da-ae8a-11d3eaae4486",
"availabilities": []
},
{
"id": "b73ae99a-bc55-4bf9-bd9d-bd26dc501d93",
"availabilities": []
},
{
"id": "6e9910de-f27a-4aa0-85f4-d88160a6d5fd",
"availabilities": [
{
"start": 1704877200,
"start_str": "2024-01-10T09:00:00.000000Z",
"end": 1704905940,
"end_str": "2024-01-10T16:59:00.000000Z"
}
]
},
{
"id": "2b74bc10-6000-4d8f-8aea-fe8434536446",
"availabilities": [
{
"start": 1704956400,
"start_str": "2024-01-11T07:00:00.000000Z",
"end": 1704985140,
"end_str": "2024-01-11T14:59:00.000000Z"
}
]
}
],
"availabilities": [
{
"start": 1704877200,
"start_str": "2024-01-10T09:00:00.000000Z",
"end": 1704905940,
"end_str": "2024-01-10T16:59:00.000000Z"
},
{
"start": 1704956400,
"start_str": "2024-01-11T07:00:00.000000Z",
"end": 1704985140,
"end_str": "2024-01-11T14:59:00.000000Z"
}
]
}
],
"availabilities": [
{
"start": 1704877200,
"start_str": "2024-01-10T09:00:00.000000Z",
"end": 1704905940,
"end_str": "2024-01-10T16:59:00.000000Z"
},
{
"start": 1704956400,
"start_str": "2024-01-11T07:00:00.000000Z",
"end": 1704985140,
"end_str": "2024-01-11T14:59:00.000000Z"
}
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get
requires authentication
Get an availability calculation session by id
Example request:
curl --request GET \
--get "https://availability-prod.dataverse.gr/api/availability-calculation-sessions/0ce149e5-caed-4143-a3ea-4359799d53ea" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://availability-prod.dataverse.gr/api/availability-calculation-sessions/0ce149e5-caed-4143-a3ea-4359799d53ea"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "56e2aae1-5b7c-31d3-bc81-f55a5355feea",
"date_from": 1704528000,
"date_from_string": "2024-01-06T08:00:00+00:00",
"date_until": 1704985200,
"date_until_string": "2024-01-11T15:00:00+00:00",
"status": "SUCCESS",
"error": null,
"time_constrained_entity_groups": [
{
"time_constrained_entity_ids": [
"9b0516c6-10a5-4da0-b17d-8898b5adb0b4",
"9b05144b-93fd-4e53-8fe0-d690f35f7cef",
"9aff2f1a-9c34-40f7-9a35-ae22c309f925"
],
"availability_calculation_days": [
{
"id": "c4907188-62e5-47d8-9211-e6262c7e9815",
"availabilities": []
},
{
"id": "ee146a4f-050b-45bb-86e1-c52dc4a3590f",
"availabilities": []
},
{
"id": "509f3ac1-8c28-47da-ae8a-11d3eaae4486",
"availabilities": []
},
{
"id": "b73ae99a-bc55-4bf9-bd9d-bd26dc501d93",
"availabilities": []
},
{
"id": "6e9910de-f27a-4aa0-85f4-d88160a6d5fd",
"availabilities": [
{
"start": 1704877200,
"start_str": "2024-01-10T09:00:00.000000Z",
"end": 1704905940,
"end_str": "2024-01-10T16:59:00.000000Z"
}
]
},
{
"id": "2b74bc10-6000-4d8f-8aea-fe8434536446",
"availabilities": [
{
"start": 1704956400,
"start_str": "2024-01-11T07:00:00.000000Z",
"end": 1704985140,
"end_str": "2024-01-11T14:59:00.000000Z"
}
]
}
],
"availabilities": [
{
"start": 1704877200,
"start_str": "2024-01-10T09:00:00.000000Z",
"end": 1704905940,
"end_str": "2024-01-10T16:59:00.000000Z"
},
{
"start": 1704956400,
"start_str": "2024-01-11T07:00:00.000000Z",
"end": 1704985140,
"end_str": "2024-01-11T14:59:00.000000Z"
}
]
}
],
"availabilities": [
{
"start": 1704877200,
"start_str": "2024-01-10T09:00:00.000000Z",
"end": 1704905940,
"end_str": "2024-01-10T16:59:00.000000Z"
},
{
"start": 1704956400,
"start_str": "2024-01-11T07:00:00.000000Z",
"end": 1704985140,
"end_str": "2024-01-11T14:59:00.000000Z"
}
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete
requires authentication
Delete an availability calculation session by id
Example request:
curl --request DELETE \
"https://availability-prod.dataverse.gr/api/availability-calculation-sessions/0ce149e5-caed-4143-a3ea-4359799d53ea" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://availability-prod.dataverse.gr/api/availability-calculation-sessions/0ce149e5-caed-4143-a3ea-4359799d53ea"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "607d5a37-801e-3b7b-b564-9fe0616638a0",
"date_from": 1704528000,
"date_from_string": "2024-01-06T08:00:00+00:00",
"date_until": 1704985200,
"date_until_string": "2024-01-11T15:00:00+00:00",
"status": "SUCCESS",
"error": null,
"time_constrained_entity_groups": [
{
"time_constrained_entity_ids": [
"9b0516c6-10a5-4da0-b17d-8898b5adb0b4",
"9b05144b-93fd-4e53-8fe0-d690f35f7cef",
"9aff2f1a-9c34-40f7-9a35-ae22c309f925"
],
"availability_calculation_days": [
{
"id": "c4907188-62e5-47d8-9211-e6262c7e9815",
"availabilities": []
},
{
"id": "ee146a4f-050b-45bb-86e1-c52dc4a3590f",
"availabilities": []
},
{
"id": "509f3ac1-8c28-47da-ae8a-11d3eaae4486",
"availabilities": []
},
{
"id": "b73ae99a-bc55-4bf9-bd9d-bd26dc501d93",
"availabilities": []
},
{
"id": "6e9910de-f27a-4aa0-85f4-d88160a6d5fd",
"availabilities": [
{
"start": 1704877200,
"start_str": "2024-01-10T09:00:00.000000Z",
"end": 1704905940,
"end_str": "2024-01-10T16:59:00.000000Z"
}
]
},
{
"id": "2b74bc10-6000-4d8f-8aea-fe8434536446",
"availabilities": [
{
"start": 1704956400,
"start_str": "2024-01-11T07:00:00.000000Z",
"end": 1704985140,
"end_str": "2024-01-11T14:59:00.000000Z"
}
]
}
],
"availabilities": [
{
"start": 1704877200,
"start_str": "2024-01-10T09:00:00.000000Z",
"end": 1704905940,
"end_str": "2024-01-10T16:59:00.000000Z"
},
{
"start": 1704956400,
"start_str": "2024-01-11T07:00:00.000000Z",
"end": 1704985140,
"end_str": "2024-01-11T14:59:00.000000Z"
}
]
}
],
"availabilities": [
{
"start": 1704877200,
"start_str": "2024-01-10T09:00:00.000000Z",
"end": 1704905940,
"end_str": "2024-01-10T16:59:00.000000Z"
},
{
"start": 1704956400,
"start_str": "2024-01-11T07:00:00.000000Z",
"end": 1704985140,
"end_str": "2024-01-11T14:59:00.000000Z"
}
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Reservations
APIs for managing reservations
Index
requires authentication
Get-search reservations.
Example request:
curl --request GET \
--get "https://availability-prod.dataverse.gr/api/reservations?time_constrained_entity_id=1be149e5-caed-4143-a3ea-4359799d53ea&query=Mrs+Adams&starts_after=1706180400&ends_before=1706180400&page_number=1&page_size=10" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://availability-prod.dataverse.gr/api/reservations"
);
const params = {
"time_constrained_entity_id": "1be149e5-caed-4143-a3ea-4359799d53ea",
"query": "Mrs Adams",
"starts_after": "1706180400",
"ends_before": "1706180400",
"page_number": "1",
"page_size": "10",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "0cdd4730-0ca4-3726-b695-5ed5013b0f46",
"friendly_name": "Appointment with Mrs Adams",
"definition": {
"business_logic_key": "business_logic_value"
},
"multiple_reservation_definition_id": null,
"time_constrained_entity_ids": [
"00432624-b8b4-30be-9a05-caa2d51469d2",
"481b10cc-6233-32d8-a072-9eeb264a164b"
],
"date_from": 1671926400,
"date_until": 1990742400,
"date_from_string": "2022-12-25T00:00:00+00:00",
"date_until_string": "2033-01-31T00:00:00+00:00",
"created_at": null,
"updated_at": null,
"slots_duration": 15
},
{
"id": "27b14751-a3cd-3318-a4e6-acef8affa661",
"friendly_name": "Appointment with Mrs Adams",
"definition": {
"business_logic_key": "business_logic_value"
},
"multiple_reservation_definition_id": null,
"time_constrained_entity_ids": [
"5191cde6-173d-3659-aa03-6f07ea2c857f",
"ce626a78-651f-30f9-bdb7-c763d4c0e94f"
],
"date_from": 1671926400,
"date_until": 1990742400,
"date_from_string": "2022-12-25T00:00:00+00:00",
"date_until_string": "2033-01-31T00:00:00+00:00",
"created_at": null,
"updated_at": null,
"slots_duration": 15
}
],
"meta": {
"total": 43,
"page_number": 2,
"page_size": 10
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get
requires authentication
Get reservation by id
Example request:
curl --request GET \
--get "https://availability-prod.dataverse.gr/api/reservations/0ce149e5-caed-4143-a3ea-4359799d53ea" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://availability-prod.dataverse.gr/api/reservations/0ce149e5-caed-4143-a3ea-4359799d53ea"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "4b0c7887-75d7-3b3c-8e91-d876a1a950e2",
"friendly_name": "Appointment with Mrs Adams",
"definition": {
"business_logic_key": "business_logic_value"
},
"multiple_reservation_definition_id": null,
"time_constrained_entity_ids": [
"f8f26826-3db3-37a7-ae2d-003c0064a78d",
"872bbffd-72e4-3ccf-929a-51b1e5cf2581"
],
"date_from": 1671926400,
"date_until": 1990742400,
"date_from_string": "2022-12-25T00:00:00+00:00",
"date_until_string": "2033-01-31T00:00:00+00:00",
"created_at": null,
"updated_at": null,
"slots_duration": 15
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create
requires authentication
Store a reservation (recurrent or not recurrent)
Example request:
curl --request POST \
"https://availability-prod.dataverse.gr/api/reservations" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"friendly_name\": \"Monday appointmentment with Mr. Evans\",
\"availability_time_constrained_entity_groups\": [
{
\"time_constrained_entity_ids\": [
\"7ffc9296-b393-3f30-9b1f-bf73ac24f443\"
]
}
],
\"reservation_time_constrained_entity_ids\": [
\"f3443b07-8e87-3534-818a-0d2894fe4e21\"
],
\"minute_of_day_from\": 420,
\"minute_of_day_until\": 479,
\"date_from\": 1704758400,
\"date_until\": 1704758400,
\"recurrence_type\": 2,
\"recurrence_interval\": 2,
\"recurrence_days_of_month\": [
20
],
\"recurrence_ordinal\": [
\"third\"
],
\"recurrence_week_days\": [
\"tuesday\"
]
}"
const url = new URL(
"https://availability-prod.dataverse.gr/api/reservations"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"friendly_name": "Monday appointmentment with Mr. Evans",
"availability_time_constrained_entity_groups": [
{
"time_constrained_entity_ids": [
"7ffc9296-b393-3f30-9b1f-bf73ac24f443"
]
}
],
"reservation_time_constrained_entity_ids": [
"f3443b07-8e87-3534-818a-0d2894fe4e21"
],
"minute_of_day_from": 420,
"minute_of_day_until": 479,
"date_from": 1704758400,
"date_until": 1704758400,
"recurrence_type": 2,
"recurrence_interval": 2,
"recurrence_days_of_month": [
20
],
"recurrence_ordinal": [
"third"
],
"recurrence_week_days": [
"tuesday"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "401b6c55-106e-390c-8823-9d570090a550",
"friendly_name": "Appointment with Mrs Adams",
"definition": {
"business_logic_key": "business_logic_value"
},
"multiple_reservation_definition_id": null,
"time_constrained_entity_ids": [
"9bdef32f-c39a-3f7c-a3b8-d008e6df4a93",
"fe03c8ed-7983-3bd7-98ff-5ab10237d364"
],
"date_from": 1671926400,
"date_until": 1990742400,
"date_from_string": "2022-12-25T00:00:00+00:00",
"date_until_string": "2033-01-31T00:00:00+00:00",
"created_at": null,
"updated_at": null,
"slots_duration": 15
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete
requires authentication
Delete reservation by id
Example request:
curl --request DELETE \
"https://availability-prod.dataverse.gr/api/reservations/0ce149e5-caed-4143-a3ea-4359799d53ea" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://availability-prod.dataverse.gr/api/reservations/0ce149e5-caed-4143-a3ea-4359799d53ea"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "69a3d122-08fb-3172-8190-994e650eb251",
"friendly_name": "Appointment with Mrs Adams",
"definition": {
"business_logic_key": "business_logic_value"
},
"multiple_reservation_definition_id": null,
"time_constrained_entity_ids": [
"870a71e2-3a4b-3ecc-a65a-2c02b1a77e76",
"aa7eaa51-3b03-3b0d-91ba-44d47df87c3b"
],
"date_from": 1671926400,
"date_until": 1990742400,
"date_from_string": "2022-12-25T00:00:00+00:00",
"date_until_string": "2033-01-31T00:00:00+00:00",
"created_at": null,
"updated_at": null,
"slots_duration": 15
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Batch endpoints
Batch Create
requires authentication
Batch store reservations. Returns the successfully created reservations (may be empty if silence_no_availability_exceptions is true).
Example request:
curl --request POST \
"https://availability-prod.dataverse.gr/api/reservations/batch" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"silence_no_availability_exceptions\": false,
\"reservations\": [
{
\"friendly_name\": \"Monday appointment with Mr. Evans\",
\"availability_time_constrained_entity_groups\": [
{
\"time_constrained_entity_ids\": [
\"33d86057-9cf2-3e5c-9163-862d17f73043\"
]
}
],
\"reservation_time_constrained_entity_ids\": [
\"5cf0993d-ca7c-3691-a9aa-c30c12a95aa7\"
],
\"minute_of_day_from\": 420,
\"minute_of_day_until\": 479,
\"date_from\": 1704758400,
\"date_until\": 1704758400,
\"recurrence_type\": 2,
\"recurrence_interval\": 2,
\"recurrence_days_of_month\": [
25
],
\"recurrence_ordinal\": [
\"fourth\"
],
\"recurrence_week_days\": [
\"monday\"
]
}
]
}"
const url = new URL(
"https://availability-prod.dataverse.gr/api/reservations/batch"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"silence_no_availability_exceptions": false,
"reservations": [
{
"friendly_name": "Monday appointment with Mr. Evans",
"availability_time_constrained_entity_groups": [
{
"time_constrained_entity_ids": [
"33d86057-9cf2-3e5c-9163-862d17f73043"
]
}
],
"reservation_time_constrained_entity_ids": [
"5cf0993d-ca7c-3691-a9aa-c30c12a95aa7"
],
"minute_of_day_from": 420,
"minute_of_day_until": 479,
"date_from": 1704758400,
"date_until": 1704758400,
"recurrence_type": 2,
"recurrence_interval": 2,
"recurrence_days_of_month": [
25
],
"recurrence_ordinal": [
"fourth"
],
"recurrence_week_days": [
"monday"
]
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "0adcf4d1-5e2a-3c1b-852e-dd611f453099",
"friendly_name": "Appointment with Mrs Adams",
"definition": {
"business_logic_key": "business_logic_value"
},
"multiple_reservation_definition_id": null,
"time_constrained_entity_ids": [
"d1eb1890-5cd1-39ba-a780-6f70f0e9063c",
"28293398-5aec-3110-8e94-9bee393101d8"
],
"date_from": 1671926400,
"date_until": 1990742400,
"date_from_string": "2022-12-25T00:00:00+00:00",
"date_until_string": "2033-01-31T00:00:00+00:00",
"created_at": null,
"updated_at": null,
"slots_duration": 15
},
{
"id": "5016d31c-87e9-3093-b959-e3513369e22a",
"friendly_name": "Appointment with Mrs Adams",
"definition": {
"business_logic_key": "business_logic_value"
},
"multiple_reservation_definition_id": null,
"time_constrained_entity_ids": [
"ecc69ea0-db55-3d42-9e7d-935455fb2b66",
"b36a898e-d05e-380a-94a8-b1ab33192d81"
],
"date_from": 1671926400,
"date_until": 1990742400,
"date_from_string": "2022-12-25T00:00:00+00:00",
"date_until_string": "2033-01-31T00:00:00+00:00",
"created_at": null,
"updated_at": null,
"slots_duration": 15
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Batch Delete
requires authentication
Batch Delete reservations by id's
Example request:
curl --request DELETE \
"https://availability-prod.dataverse.gr/api/reservations/batch?ids=9cf1e85e-80d3-469e-a7e3-caee10ad29fc%2C9cdbaa83-4cb5-4e9f-ae1c-9dff8fe16f57" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://availability-prod.dataverse.gr/api/reservations/batch"
);
const params = {
"ids": "9cf1e85e-80d3-469e-a7e3-caee10ad29fc,9cdbaa83-4cb5-4e9f-ae1c-9dff8fe16f57",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"number_of_reservations_deleted": 2
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Response
Response Fields
number_of_reservations_deleted
integer
The number of the deleted reservations.
Time constrained entities
APIs for managing time constrained entities
Index
requires authentication
Get-search time constrained entities. Pagination - searching to be supported.
Example request:
curl --request GET \
--get "https://availability-prod.dataverse.gr/api/time-constrained-entities?query=Mrs+Adams&page_number=1&page_size=10" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://availability-prod.dataverse.gr/api/time-constrained-entities"
);
const params = {
"query": "Mrs Adams",
"page_number": "1",
"page_size": "10",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "ac748001-fb28-3ac5-a10d-1b0f6476f6ce",
"name": "Country banking holidays",
"time_constraints": [
{
"id": "8d008bd4-3046-38d3-b577-f10bcc26654b",
"name": "Christmas",
"date_from": 1671926400,
"date_until": 1990742400,
"is_working": false,
"minute_of_day_from": 0,
"minute_of_day_until": 1439,
"order": 1,
"recurrence_type": 3,
"recurrence_interval": 12,
"recurrence_days_of_month": [
25,
26
],
"recurrence_ordinal": [],
"recurrence_week_days": []
},
{
"id": "c0b6c8c3-2d2f-3d79-b5b8-f22a41e92daa",
"name": "New Years day",
"date_from": 1671926400,
"date_until": 1990742400,
"is_working": false,
"minute_of_day_from": 0,
"minute_of_day_until": 1439,
"order": 1,
"recurrence_type": 3,
"recurrence_interval": 12,
"recurrence_days_of_month": [
1
],
"recurrence_ordinal": [],
"recurrence_week_days": []
}
],
"created_at": 1763010484,
"updated_at": 1763096884
},
{
"id": "2b68798c-1da7-3c24-8d3c-b4292c599a09",
"name": "Country banking holidays",
"time_constraints": [
{
"id": "06fb5fb3-b5e2-3310-b5dc-bc1e9d31390a",
"name": "Christmas",
"date_from": 1671926400,
"date_until": 1990742400,
"is_working": false,
"minute_of_day_from": 0,
"minute_of_day_until": 1439,
"order": 1,
"recurrence_type": 3,
"recurrence_interval": 12,
"recurrence_days_of_month": [
25,
26
],
"recurrence_ordinal": [],
"recurrence_week_days": []
},
{
"id": "2ff75c81-93a2-38db-a1a2-5d3fac8d1585",
"name": "New Years day",
"date_from": 1671926400,
"date_until": 1990742400,
"is_working": false,
"minute_of_day_from": 0,
"minute_of_day_until": 1439,
"order": 1,
"recurrence_type": 3,
"recurrence_interval": 12,
"recurrence_days_of_month": [
1
],
"recurrence_ordinal": [],
"recurrence_week_days": []
}
],
"created_at": 1763010484,
"updated_at": 1763096884
}
],
"meta": {
"total": 43,
"page_number": 2,
"page_size": 10
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get
requires authentication
Get a time constrained entity by id
Example request:
curl --request GET \
--get "https://availability-prod.dataverse.gr/api/time-constrained-entities/0ce149e5-caed-4143-a3ea-4359799d53ea" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://availability-prod.dataverse.gr/api/time-constrained-entities/0ce149e5-caed-4143-a3ea-4359799d53ea"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "d16f5e54-73d3-3485-a903-49922dbb465d",
"name": "Country banking holidays",
"time_constraints": [
{
"id": "a5bf4c37-9cd4-383b-9e17-6027fd4d5101",
"name": "Christmas",
"date_from": 1671926400,
"date_until": 1990742400,
"is_working": false,
"minute_of_day_from": 0,
"minute_of_day_until": 1439,
"order": 1,
"recurrence_type": 3,
"recurrence_interval": 12,
"recurrence_days_of_month": [
25,
26
],
"recurrence_ordinal": [],
"recurrence_week_days": []
},
{
"id": "b3daf7db-ba77-36cf-b2a4-3e21bc9a669d",
"name": "New Years day",
"date_from": 1671926400,
"date_until": 1990742400,
"is_working": false,
"minute_of_day_from": 0,
"minute_of_day_until": 1439,
"order": 1,
"recurrence_type": 3,
"recurrence_interval": 12,
"recurrence_days_of_month": [
1
],
"recurrence_ordinal": [],
"recurrence_week_days": []
}
],
"created_at": 1763010484,
"updated_at": 1763096884
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create
requires authentication
Store time constrained entity
Example request:
curl --request POST \
"https://availability-prod.dataverse.gr/api/time-constrained-entities" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Country banking holidays\",
\"time_constraints\": [
{
\"id\": \"1be149e5-caed-4143-a3ea-4359799d53ea\",
\"order\": 1,
\"name\": \"Days off between Christmas and New Years day or Afternoon shift\",
\"is_working\": true,
\"minute_of_day_from\": 420,
\"minute_of_day_until\": 479,
\"date_from\": 1704758400,
\"date_until\": 1704758400,
\"recurrence_type\": 2,
\"recurrence_interval\": 2,
\"recurrence_days_of_month\": [
19
],
\"recurrence_ordinal\": [
\"last\"
],
\"recurrence_week_days\": [
\"tuesday\"
]
}
]
}"
const url = new URL(
"https://availability-prod.dataverse.gr/api/time-constrained-entities"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Country banking holidays",
"time_constraints": [
{
"id": "1be149e5-caed-4143-a3ea-4359799d53ea",
"order": 1,
"name": "Days off between Christmas and New Years day or Afternoon shift",
"is_working": true,
"minute_of_day_from": 420,
"minute_of_day_until": 479,
"date_from": 1704758400,
"date_until": 1704758400,
"recurrence_type": 2,
"recurrence_interval": 2,
"recurrence_days_of_month": [
19
],
"recurrence_ordinal": [
"last"
],
"recurrence_week_days": [
"tuesday"
]
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "7715a7bb-ba23-3b05-9152-e5120d2d70c7",
"name": "Country banking holidays",
"time_constraints": [
{
"id": "dae674de-9f75-3b2b-b3c5-578b09f471cc",
"name": "Christmas",
"date_from": 1671926400,
"date_until": 1990742400,
"is_working": false,
"minute_of_day_from": 0,
"minute_of_day_until": 1439,
"order": 1,
"recurrence_type": 3,
"recurrence_interval": 12,
"recurrence_days_of_month": [
25,
26
],
"recurrence_ordinal": [],
"recurrence_week_days": []
},
{
"id": "db14e343-b9c1-3f2e-8c7d-77db2ebf6e6c",
"name": "New Years day",
"date_from": 1671926400,
"date_until": 1990742400,
"is_working": false,
"minute_of_day_from": 0,
"minute_of_day_until": 1439,
"order": 1,
"recurrence_type": 3,
"recurrence_interval": 12,
"recurrence_days_of_month": [
1
],
"recurrence_ordinal": [],
"recurrence_week_days": []
}
],
"created_at": 1763010484,
"updated_at": 1763096884
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update
requires authentication
Update a time constrained entity by id
Example request:
curl --request PUT \
"https://availability-prod.dataverse.gr/api/time-constrained-entities/0ce149e5-caed-4143-a3ea-4359799d53ea" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Country banking holidays\",
\"time_constraints\": [
{
\"id\": \"1be149e5-caed-4143-a3ea-4359799d53ea\",
\"order\": 1,
\"name\": \"Days off between Christmas and New Years day or Afternoon shift\",
\"is_working\": true,
\"minute_of_day_from\": 420,
\"minute_of_day_until\": 479,
\"date_from\": 1704758400,
\"date_until\": 1704758400,
\"recurrence_type\": 2,
\"recurrence_interval\": 2,
\"recurrence_days_of_month\": [
12
],
\"recurrence_ordinal\": [
\"fourth\"
],
\"recurrence_week_days\": [
\"thursday\"
]
}
]
}"
const url = new URL(
"https://availability-prod.dataverse.gr/api/time-constrained-entities/0ce149e5-caed-4143-a3ea-4359799d53ea"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Country banking holidays",
"time_constraints": [
{
"id": "1be149e5-caed-4143-a3ea-4359799d53ea",
"order": 1,
"name": "Days off between Christmas and New Years day or Afternoon shift",
"is_working": true,
"minute_of_day_from": 420,
"minute_of_day_until": 479,
"date_from": 1704758400,
"date_until": 1704758400,
"recurrence_type": 2,
"recurrence_interval": 2,
"recurrence_days_of_month": [
12
],
"recurrence_ordinal": [
"fourth"
],
"recurrence_week_days": [
"thursday"
]
}
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "27106427-cbd1-3f3d-8189-c397bd64a486",
"name": "Country banking holidays",
"time_constraints": [
{
"id": "2eb19669-9297-3bc0-a893-b8a92258449b",
"name": "Christmas",
"date_from": 1671926400,
"date_until": 1990742400,
"is_working": false,
"minute_of_day_from": 0,
"minute_of_day_until": 1439,
"order": 1,
"recurrence_type": 3,
"recurrence_interval": 12,
"recurrence_days_of_month": [
25,
26
],
"recurrence_ordinal": [],
"recurrence_week_days": []
},
{
"id": "f3359500-6b56-34fe-aae3-db43d38798df",
"name": "New Years day",
"date_from": 1671926400,
"date_until": 1990742400,
"is_working": false,
"minute_of_day_from": 0,
"minute_of_day_until": 1439,
"order": 1,
"recurrence_type": 3,
"recurrence_interval": 12,
"recurrence_days_of_month": [
1
],
"recurrence_ordinal": [],
"recurrence_week_days": []
}
],
"created_at": 1763010484,
"updated_at": 1763096884
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete
requires authentication
Delete a time constrained entity by id
Example request:
curl --request DELETE \
"https://availability-prod.dataverse.gr/api/time-constrained-entities/0ce149e5-caed-4143-a3ea-4359799d53ea" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://availability-prod.dataverse.gr/api/time-constrained-entities/0ce149e5-caed-4143-a3ea-4359799d53ea"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "7d7f7b8d-3a47-3fba-a21f-1327ec36bee3",
"name": "Country banking holidays",
"time_constraints": [
{
"id": "7d6302c8-1daa-3ad5-8959-65235e44c61b",
"name": "Christmas",
"date_from": 1671926400,
"date_until": 1990742400,
"is_working": false,
"minute_of_day_from": 0,
"minute_of_day_until": 1439,
"order": 1,
"recurrence_type": 3,
"recurrence_interval": 12,
"recurrence_days_of_month": [
25,
26
],
"recurrence_ordinal": [],
"recurrence_week_days": []
},
{
"id": "586f3d99-f547-3dd4-96e6-931384e5fa6e",
"name": "New Years day",
"date_from": 1671926400,
"date_until": 1990742400,
"is_working": false,
"minute_of_day_from": 0,
"minute_of_day_until": 1439,
"order": 1,
"recurrence_type": 3,
"recurrence_interval": 12,
"recurrence_days_of_month": [
1
],
"recurrence_ordinal": [],
"recurrence_week_days": []
}
],
"created_at": 1763010484,
"updated_at": 1763096884
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Users
APIs for users
Current
requires authentication
Get current logged in user
Example request:
curl --request GET \
--get "https://availability-prod.dataverse.gr/api/users/current" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://availability-prod.dataverse.gr/api/users/current"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": null,
"name": "sdm@dataverse.gr",
"email": "sdm@dataverse.gr",
"created_at": "2025-11-13T05:08:04.000000Z",
"updated_at": "2025-11-14T05:08:04.000000Z",
"client_id": "9d6e003c-cc06-4b91-b5df-5b68e21efafe",
"client": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.