Access info
|
|
Endpoint |
https://public-holidays-api.socrate.io/graphql |
Required access keys |
Tenant-level service access key, App-level service access key |
Pricing |
Please contact us for details at contact@bitsoftware.ro |
Notes |
To call the service, the access key must be provided in the x-api-key header of the HTTP request. If you are using the GraphQL console, you can view the service’s documentation and schema only after entering an access key. Make sure that the scope of the key allows access to the queries and mutations that you require. For example, to grant the key access to all queries and mutations, the keys’s scope must be set to public-holidays-api:query:* public-holidays-api:mutation:* . |
Usage
The Public Holidays Service enables calling applications to retrieve the list of public holidays for the given year or month.
Currently, the service retrieves public holidays only for Romania. Support for further countries can be added on demand.
Queries
holidays
Arguments
Argument |
Type |
Description |
filter |
HolidayFilter! |
Mandatory. Provides filtering options to the mutation, as a HolidayFilter type. |
To retrieve the holidays list, you must provide as input the country code and one or more of the following: year, month, date range.
Attribute |
Type |
Description |
country |
CountryCode! |
Mandatory. The 2-character country code of the country whose public holidays must be retrieved. |
dateRange |
DateFilter |
Conditional. If specified, only public holidays falling within this date range will be listed. |
year |
Int |
Conditional. Must be a four-digit year. If specified, only public holidays from the given year will be listed. |
month |
Int |
Conditional. Must be a month’s number, for example, 1 for January. If specified, only public holidays from the given month will be listed. If this parameter is specified and the year parameter is not, only holidays falling on the given month of the current year will be listed. |
includeWeekends |
Boolean |
Conditional. If true, holidays falling on a week-end will be included, otherwise they will be skipped. |
Attribute |
Type |
Description |
from |
Date! |
Mandatory. Specifies the start date of the date range. |
to |
Date! |
Mandatory. Specifies the end date of the date range. |
Result
Holiday
type
Attribute |
Type |
Description |
name |
String |
The name of the public holiday. |
date |
Date |
The date of the public holiday. |
country |
CountryCode |
The country for which the public holidays list was queried. |
isWeekend |
Boolean |
The value is true if the holiday falls on a week-end, false otherwise. |
isSaturday |
Boolean |
The value is true if the holiday falls on a Saturday, false otherwise. |
isSunday |
Boolean |
The value is true if the holiday falls on a Sunday, false otherwise. |
version
Returns the API version.