Holiday

Holiday

Returns a list of national, regional and municipal holidays for a given year. Supports calculation of holidays for years between 1582 and 2299.

Free subscription

Technical Overview

Holiday Service

Returns a list of national, regional and municipal holidays for a given year. Supports calculation of holidays for years between 1582 and 2299.

API Reference

Service Operation Description
Holiday GetAllHolidays Returns all holidays (national, regional and municipal) for a given year.
GetCarnival Returns Carnivals date for a given year
GetCorpusChristi Returns Corpus Christis date for a given year
GetEaster Returns Easters date for a given year
GetGoodFriday Returns GoodFridays date for a given year
GetHolidaysByMunicipalityId Returns all holidays for a given year and municipality and optionally includes national holidays in results
GetLocalHolidays Returns all municipal holidays for a given year
GetNationalHolidays Returns all national holidays for a given year.
GetRegionalHolidays Returns all regional holidays for a given year

Holiday Service

GetAllHolidays

Returns all holidays (national, regional and municipal) for a given year.

Request Parameters

year : int (required)
The year from which you want to retrieve the holidays

Response Parameters

GetAllHolidaysResult : ArrayOfHoliday (optional)
An array of Holiday.

SOAP Sample

The following example shows how to retrieve Portugal holidays for a given year: And the corresponding, successful, response:

HTTP GET Sample

The following example shows how to retrieve Portugal holidays for a given year: And the corresponding, successful, response:
Go to top

GetCarnival

Returns Carnivals date for a given year

Request Parameters

year : int (required)
The year from which you want to retrieve the holiday.

Response Parameters

GetCarnivalResult : Holiday (optional)
The holiday.

SOAP Sample

The following example shows how to retrieve Carnival holiday date for a given year: And the corresponding, successful, response:

HTTP GET Sample

The following example shows how to retrieve Carnival holiday date for a given year: And the corresponding, successful, response:
Go to top

GetCorpusChristi

Returns Corpus Christis date for a given year

Request Parameters

year : int (required)
The year from which you want to retrieve the holiday.

Response Parameters

GetCorpusChristiResult : Holiday (optional)
The holiday.

SOAP Sample

The following example shows how to retrieve Corpus Christi holiday date for a given year: And the corresponding, successful, response:

HTTP GET Sample

The following example shows how to retrieve Corpus Christi holiday date for a given year: And the corresponding, successful, response:
Go to top

GetEaster

Returns Easters date for a given year

Request Parameters

year : int (required)
The year from which you want to retrieve the holiday.

Response Parameters

GetEasterResult : Holiday (optional)
The holiday.

SOAP Sample

The following example shows how to retrieve Easter holiday date for a given year: And the corresponding, successful, response:

HTTP GET Sample

The following example shows how to retrieve Easter holiday date for a given year: And the corresponding, successful, response:
Go to top

GetGoodFriday

Returns GoodFridays date for a given year

Request Parameters

year : int (required)
The year from which you want to retrieve the holiday.

Response Parameters

GetGoodFridayResult : Holiday (optional)
The holiday.

SOAP Sample

The following example shows how to retrieve Good Friday holiday date for a given year: And the corresponding, successful, response:

HTTP GET Sample

The following example shows how to retrieve Good Friday holiday date for a given year: And the corresponding, successful, response:
Go to top

GetHolidaysByMunicipalityId

Returns all holidays for a given year and municipality and optionally includes national holidays in results

Request Parameters

year : int (required)
The year from which you want to retrieve the holidays.
municipalityId : string (required)
The municipality identifier, according with SAPO GIS Service, from which you want to retrieve the holidays.
includeNational : boolean (optional)
The flag that indicates if you want to retrieve the national holidays also.

Response Parameters

GetHolidaysByMunicipalityIdResult : ArrayOfHoliday (optional)
An array of Holiday.

SOAP Sample

The following example shows how to retrieve all holidays for a given year and municipality: And the corresponding, successful, response:

HTTP GET Sample

The following example shows how to retrieve all holidays for a given year and municipality: And the corresponding, successful, response:
Go to top

GetLocalHolidays

Returns all municipal holidays for a given year

Request Parameters

year : int (required)
The year from which you want to retrieve the local holidays.

Response Parameters

GetLocalHolidaysResult : ArrayOfHoliday (optional)
An array of Holiday.

SOAP Sample

The following example shows how to retrieve all Portugal municipal holidays for a given year: And the corresponding, successful, response:

HTTP GET Sample

The following example shows how to retrieve all Portugal municipal holidays for a given year: And the corresponding, successful, response:
Go to top

GetNationalHolidays

Returns all national holidays for a given year.

Request Parameters

year : int (required)
The year from which you want to retrieve the national holidays.

Response Parameters

GetNationalHolidaysResult : ArrayOfHoliday (optional)
An array of Holiday.

SOAP Sample

The following example shows how to retrieve all Portugal national holidays for a given year. And the corresponding, successful, response:

HTTP GET Sample

The following example shows how to retrieve all Portugal national holidays for a given year. And the corresponding, successful, response:
Go to top

GetRegionalHolidays

Returns all regional holidays for a given year

Request Parameters

year : int (required)
The year from which you want to retrieve the regional holidays.

Response Parameters

GetRegionalHolidaysResult : ArrayOfHoliday (optional)
An array of Holiday.

SOAP Sample

The following example shows how to retrieve all Portugal regional holidays for a given year: And the corresponding, successful, response:

HTTP GET Sample

The following example shows how to retrieve all Portugal regional holidays for a given year: And the corresponding, successful, response:
Go to top

Holiday Entities

ArrayOfHoliday

Attribute Name Description
List of Holiday : Holiday (optional) An array of Holiday.
Go to top

Holiday

Attribute Name Description
Name : string (optional) The holiday name.
Date : dateTime (optional) The holiday date.
Description : string (optional) The holiday description.
Type : HolidayType (optional) The holiday type.
Municipality : Municipality (optional) The holiday municipality.
Go to top

HolidayType

Value Name Description
National Indicates that the holiday is national.
Municipal Indicates that the holiday is only at a municipal level.
Regional Indicates that the holiday is only at a regional level.
Religious Indicates that the holiday is religious.
Optional Indicates that the holiday is optional.
Go to top

Municipality

Attribute Name Description
Id : string (optional) The municipality identifier according do SAPO GIS Service.
Name : string (optional) The municipality name.
Go to top

SOAP API Authentication

Authenticating SOAP Request

Every request must contain authentication information to establish the identity of whom making the request and a autorization token called ESB Access Key.

ESB Access Key

Correct with the path to the access key

The ESB Access Key is what will authorize the usage of the API and is available when the buying process ends. In the costumer area you can find the product details where you can generate an ESB Access Key for you usage, another user registered on SAPO Services or even for everyone.

The element ESBAccessKey must appear on the message SOAP Header after the complex type ESBCredentials

Example:

ESBCredentials

ESBCredentials is a complex type that is used to pass the credentials in order to authenticate a SOAP request.

Request with username and password
Elements Description
ESBUsername The e-mail of the account that is used to access the API
ESBPassword The password that in combination with the ESBUsername is used to access the corresponding account

Example:

Request with ESBToken

Using a token instead of your username and password can be useful if you don't want to give your credentials to whom is using the API.

In order to generate a ESB Token you must use SAPO Security Token Service (STS). The ESBtoken is valid for 12 hours.

Requesting with an ESBtoken
Go to top