Public holiday API
This API is: | Public |
Business purpose: | To provide a means to retrieve future dates on which payments will not be permitted within a given date range. |
HTTP Methods: | GET |
Request URL: | https://api.asb.co.nz/public/v1/public-holidays |
Requests
The following parameters are supported in JSON format
Parameter |
Mandatory | Type | Description |
---|---|---|---|
countryCode |
No |
String |
Filter by 2-character country code, for example, NZ for New Zealand, AU for Australia, see Supported Country List. Holidays from all countries will be returned if this parameter is not specified |
startDate | No | Date | Start date of the range to query (in the format of "yyyy-mm-dd"), both the default and the minimum is today. |
endDate | No | Date | End date of the range to query (in the format of "yyyy-mm-dd"), both the default and the maximum is (today + 1 year). |
$fields | No | String | Specify the properties to include in the result set, e.g. $fields=date,description |
$orderby | No | String | Specify the sort order, e.g. $orderby=date. The default sort order is first by countryCode and then by date |
$limit | No | Integer | Page limit (number of records to return) |
$offset | No | Integer | Page offset (number of records to skip) |
Sample Request/s:
https://api.asb.co.nz/public/v1/public-holidays
https://api.asb.co.nz/public/v1/public-holidays?countryCode=AU&startDate=2014-08-01&endDate=2014-08-31
Responses
Responses are in JSON format
Parameter | Type | Description |
---|---|---|
countryCode | String | 2-character country code, for example, NZ for New Zealand, AU for Australia. |
date | String | Date in the format of "yyyy-MM-dd", all date values are of the local time of the applicable country. |
description |
String |
Description for the holiday, for example "Christmas Day". |
Return Codes:
The specific return codes for this API are:
Code | Description |
---|---|
200 |
Success |
400 |
Bad Request |
500 |
Internal Server Error |
503 |
Service Unavailable – API service is currently unavailable |
Sample Response/s:
Retrieving only NZ holidays, and exclude the countryCode from the output field.
|
Retrieve all holidays from all countries for one month, order by date
|
Security
This API is non-authenticated
-
API URL : https://api.asb.co.nz
-
-
-