### Quick start request URL Source: https://www.public-holidays.nz/docs.asp Base example for all API requests. Uses GET and includes the apikey query parameter. ```http https://api.public-holidays.nz/v1/year?apikey=YOUR_API_KEY&year=2026 ``` -------------------------------- ### GET /v1/all example request Source: https://www.public-holidays.nz/docs.asp Example request for the /v1/all endpoint. Returns all public holidays in the database. ```http https://api.public-holidays.nz/v1/all?apikey=YOUR_API_KEY ``` -------------------------------- ### GET /v1/year - URL, JavaScript, and Classic ASP examples Source: https://www.public-holidays.nz/docs.asp Three interchangeable examples for the /v1/year endpoint: a plain URL, a JavaScript fetch call, and a Classic ASP (VBScript) server-side request. All return JSON. ```http https://api.public-holidays.nz/v1/year?apikey=YOUR_API_KEY&year=2026 ``` ```javascript fetch("https://api.public-holidays.nz/v1/year?apikey=YOUR_API_KEY&year=2026") .then(function(response){ return response.json(); }) .then(function(data){ console.log(data); }); ``` ```asp <% Dim http, url url = "https://api.public-holidays.nz/v1/year?apikey=YOUR_API_KEY&year=2026" Set http = Server.CreateObject("MSXML2.ServerXMLHTTP") http.Open "GET", url, False http.Send Response.ContentType = "application/json" Response.Write http.responseText Set http = Nothing %> ``` -------------------------------- ### GET /v1/day example request Source: https://www.public-holidays.nz/docs.asp Example request for the /v1/day endpoint. Requires apikey and date parameters in dd/mm/yyyy or dd-mm-yyyy format. ```http https://api.public-holidays.nz/v1/day?apikey=YOUR_API_KEY&date=25/12/2026 ``` -------------------------------- ### GET /v1/holiday example request Source: https://www.public-holidays.nz/docs.asp Example request for the /v1/holiday endpoint. Returns true or false for whether a specific date is a public holiday. ```http https://api.public-holidays.nz/v1/holiday?apikey=YOUR_API_KEY&date=25/12/2026 ``` -------------------------------- ### Example JSON response for year request Source: https://www.public-holidays.nz/ Example JSON response returned by the /v1/year endpoint, showing a list of holidays with date, name, and regional flag. ```json { "year": 2026, "holidays": [ { "date": "2026-01-01", "name": "New Year's Day", "regional": false }, { "date": "2026-02-06", "name": "Waitangi Day", "regional": false } ] } ``` -------------------------------- ### GET /v1/all Source: https://www.public-holidays.nz/docs.asp Returns all public holidays in the database. Requires an API key. ```APIDOC ## GET /v1/all ### Description Returns all public holidays in the database. ### Method GET ### Endpoint /v1/all ### Parameters #### Query Parameters - **apikey** (string) - Required - Your API key ### Request Example https://api.public-holidays.nz/v1/all?apikey=YOUR_API_KEY ### Response #### Success Response (200) Returns a list of all public holidays. #### Response Example (No example provided in source) ``` -------------------------------- ### GET /v1/year Source: https://www.public-holidays.nz/docs.asp Returns all public holidays in a specific year. Requires an API key and a four-digit year. ```APIDOC ## GET /v1/year ### Description Returns all public holidays in a specific year. ### Method GET ### Endpoint /v1/year ### Parameters #### Query Parameters - **apikey** (string) - Required - Your API key - **year** (integer) - Required - Four-digit year such as 2026 ### Request Example https://api.public-holidays.nz/v1/year?apikey=YOUR_API_KEY&year=2026 ### Response #### Success Response (200) Returns a list of public holidays for the specified year. #### Response Example (No example provided in source) ``` -------------------------------- ### GET /v1/day Source: https://www.public-holidays.nz/docs.asp Returns the details of a specific day. Requires an API key and a date in dd/mm/yyyy or dd-mm-yyyy format. ```APIDOC ## GET /v1/day ### Description Returns the details of a specific day. ### Method GET ### Endpoint /v1/day ### Parameters #### Query Parameters - **apikey** (string) - Required - Your API key - **date** (string) - Required - Date in dd/mm/yyyy or dd-mm-yyyy format ### Request Example https://api.public-holidays.nz/v1/day?apikey=YOUR_API_KEY&date=25/12/2026 ### Response #### Success Response (200) Returns the details of the specified day. #### Response Example (No example provided in source) ``` -------------------------------- ### GET /v1/holiday Source: https://www.public-holidays.nz/docs.asp Returns true or false for whether a specific date is a public holiday. Requires an API key and a date in dd/mm/yyyy or dd-mm-yyyy format. ```APIDOC ## GET /v1/holiday ### Description Returns true or false for whether a specific date is a public holiday. ### Method GET ### Endpoint /v1/holiday ### Parameters #### Query Parameters - **apikey** (string) - Required - Your API key - **date** (string) - Required - Date in dd/mm/yyyy or dd-mm-yyyy format ### Request Example https://api.public-holidays.nz/v1/holiday?apikey=YOUR_API_KEY&date=25/12/2026 ### Response #### Success Response (200) Returns a boolean indicating whether the date is a public holiday. #### Response Example (No example provided in source) ``` -------------------------------- ### Error response - Missing API key Source: https://www.public-holidays.nz/docs.asp Response returned when the apikey parameter is missing. ```text Not Authorised ``` -------------------------------- ### Error response - Invalid date Source: https://www.public-holidays.nz/docs.asp JSON response returned when the date parameter is invalid. ```json { "success": false, "error": "Invalid date format" } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.