{ "openapi": "3.0.0", "info": { "title": "Kinderdijk.com API", "version": "0.0.1" }, "paths": { "\/api\/alive": { "get": { "summary": "Alive state check", "responses": { "200": { "description": "Return datetime as a token of aliveness.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "datetime": { "type": "string", "format": "date-time" } } } } } }, "404": { "description": "Not found.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Not found." } } } } } }, "401": { "description": "Unauthenticated.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthenticated." } } } } } }, "403": { "description": "Bad request.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Connection not configured for authenticated user." } } } } } }, "500": { "description": "Server error." } } } }, "\/api\/articles": { "get": { "summary": "Article List", "parameters": [ { "name": "language", "in": "query", "required": false, "schema": { "enum": [ "nl", "en" ], "type": "string", "default": "nl" } } ], "responses": { "200": { "description": "Return list of articles.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "required": [ "id", "title", "description", "price" ], "type": "object", "properties": { "id": { "type": "integer", "example": 4492 }, "title": { "type": "string", "example": "Donation website" }, "description": { "type": "string", "example": "Donation" }, "price": { "type": "number", "format": "float", "example": 1.9 } } } } } } } } }, "404": { "description": "Not found.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Not found." } } } } } }, "401": { "description": "Unauthenticated.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthenticated." } } } } } }, "403": { "description": "Bad request.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Connection not configured for authenticated user." } } } } } }, "500": { "description": "Server error." } } } }, "\/api\/countries": { "get": { "summary": "Country List", "parameters": [ { "name": "language", "in": "query", "required": false, "schema": { "enum": [ "nl", "en" ], "type": "string", "default": "nl" } } ], "responses": { "200": { "description": "Return list of countries.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "description": { "type": "string", "example": "Nederland" }, "default": { "type": "boolean" } } } } } } } } }, "404": { "description": "Not found.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Not found." } } } } } }, "401": { "description": "Unauthenticated.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthenticated." } } } } } }, "403": { "description": "Bad request.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Connection not configured for authenticated user." } } } } } }, "500": { "description": "Server error." } } } }, "\/api\/lookup-address\/{postalCode}\/{number}": { "get": { "summary": "Address Details", "parameters": [ { "name": "postalCode", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "number", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Return details of address.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "addition": { "type": "string", "nullable": true }, "city": { "type": "string" }, "city_id": { "type": "integer" }, "latitude": { "type": "number", "format": "float" }, "letter": { "type": "string" }, "longitude": { "type": "number", "format": "float" }, "municipality": { "type": "string" }, "number": { "type": "integer" }, "postalCode": { "type": "string" }, "province": { "type": "string" }, "street": { "type": "string" } } } } } } } }, "404": { "description": "Not found.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Not found." } } } } } }, "401": { "description": "Unauthenticated.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthenticated." } } } } } }, "400": { "description": "Bad request.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Connection not configured for authenticated user." } } } } } }, "500": { "description": "Server error." } } } }, "\/api\/tickets\/availability\/{year}\/{month}": { "get": { "summary": "Tickets Availability", "parameters": [ { "name": "year", "in": "path", "description": "4-digit year between this year and two years ahead.", "required": true, "schema": { "minimum": 2022, "type": "number" } }, { "name": "month", "in": "path", "required": true, "schema": { "maximum": 12, "minimum": 1, "type": "number" } } ], "responses": { "200": { "description": "Return List of bookable dates.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "description": "Available tickets with the date in `Y-m-d` format as key", "additionalProperties": { "type": "object", "properties": { "id": { "type": "integer" }, "date": { "type": "string", "format": "date", "example": "2022-01-24" }, "state": { "enum": [ "busy", "normal", "suggested", "not_bookable" ], "type": "string", "example": "normal" } } } } } } } } }, "401": { "description": "Unauthenticated.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthenticated." } } } } } }, "403": { "description": "Bad request.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Connection not configured for authenticated user." } } } } } }, "404": { "description": "Not found.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Not found." } } } } } }, "500": { "description": "Server error." } } } }, "\/api\/tickets\/per-day\/{date}": { "get": { "summary": "Tickets Per Day", "parameters": [ { "name": "date", "in": "path", "required": true, "schema": { "type": "string", "format": "date" } }, { "name": "language", "in": "query", "required": false, "schema": { "enum": [ "nl", "en" ], "type": "string", "default": "nl" } } ], "responses": { "200": { "description": "Return tickets per day.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "required": [ "id", "description", "price", "max", "type", "original_price", "waterbus_price", "action_id", "slots" ], "type": "object", "properties": { "id": { "type": "integer" }, "description": { "type": "string" }, "price": { "type": "number", "format": "float" }, "max": { "type": "integer" }, "type": { "type": "string" }, "original_price": { "type": "number", "format": "float" }, "waterbus_price": { "type": "number", "format": "float", "nullable": true }, "action_id": { "type": "integer", "nullable": true }, "slots": { "type": "array", "items": { "type": "object", "properties": { "time_id": { "type": "integer" }, "start_time": { "type": "string", "example": "13:00" }, "end_time": { "type": "string", "example": "14:00" }, "duration": { "type": "string", "example": "01:00" }, "available": { "type": "integer" }, "total": { "type": "integer" } } } } } } } } } } } }, "404": { "description": "Not found.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Not found." } } } } } }, "500": { "description": "Server error." } } } }, "\/api\/donations": { "post": { "summary": "Donations", "parameters": [ { "name": "language", "in": "query", "required": false, "schema": { "enum": [ "nl", "en" ], "type": "string", "default": "nl" } } ], "requestBody": { "content": { "application\/json": { "schema": { "required": [ "article_id", "payment_success_url", "payment_failure_url" ], "type": "object", "properties": { "article_id": { "enum": [ 5740, 5741, 5742 ], "type": "integer" }, "payment_success_url": { "type": "string", "format": "uri", "example": "https:\/\/www.kinderdijk.nl\/bookings\/?success=true" }, "payment_failure_url": { "type": "string", "format": "uri", "example": "https:\/\/www.kinderdijk.nl\/bookings\/?success=false" } } } } }, "required": true }, "responses": { "201": { "description": "Donation created. Visit `payment_url` to finalize payment.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "order_id": { "type": "integer" }, "payment_url": { "type": "string" } } } } } }, "404": { "description": "Not found.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Not found." } } } } } }, "401": { "description": "Unauthenticated.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthenticated." } } } } } }, "403": { "description": "Bad request.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Connection not configured for authenticated user." } } } } } }, "500": { "description": "Server error." } } } }, "\/api\/orders": { "post": { "summary": "Create new Order", "parameters": [ { "name": "language", "in": "query", "required": false, "schema": { "enum": [ "nl", "en" ], "type": "string", "default": "nl" } } ], "requestBody": { "content": { "application\/json": { "schema": { "required": [ "tickets", "date", "payment_success_url", "payment_failure_url", "first_name", "last_name", "address", "house_number", "zip_code", "city", "country_id", "email", "wants_newsletter" ], "type": "object", "properties": { "payment_success_url": { "type": "string", "format": "uri", "example": "https:\/\/www.kinderdijk.nl\/bookings\/?success=true" }, "payment_failure_url": { "type": "string", "format": "uri", "example": "https:\/\/www.kinderdijk.nl\/bookings\/?success=false" }, "tickets": { "type": "array", "items": { "required": [ "id", "amount" ], "type": "object", "properties": { "id": { "type": "string", "example": "15" }, "amount": { "type": "string", "example": "3" }, "action_id": { "type": "string", "nullable": true, "example": "110" }, "time_id": { "type": "string", "example": "3333" }, "license_plates": { "type": "array", "items": { "maxLength": 20, "minLength": 4, "type": "string", "nullable": true, "example": "TN-326-G" }, "description": "Only available for parking tickets. The maximum amount of license plates is equal to the amount of tickets." } } } }, "articles": { "type": "array", "items": { "required": [ "id", "amount" ], "type": "object", "properties": { "id": { "type": "string", "example": "2670" }, "amount": { "type": "string", "example": "1" } } } }, "date": { "type": "string", "format": "date" }, "waterbus": { "type": "boolean", "nullable": true, "example": false }, "first_name": { "type": "string", "example": "Pietje" }, "last_name": { "type": "string", "example": "Testachternaam" }, "address": { "type": "string", "example": "Cypresbaan" }, "house_number": { "type": "string", "example": "31a" }, "zip_code": { "type": "string", "example": "2908LT" }, "city": { "type": "string", "example": "Capelle aan den IJssel" }, "country_id": { "type": "string", "example": "1" }, "email": { "type": "string", "example": "ruben.devos@webparking.nl" }, "wants_newsletter": { "type": "boolean", "example": true }, "wants_to_donate": { "type": "boolean", "example": true }, "phone_number": { "type": "string", "example": "010-4772678" } } }, "examples": { "Regular ticket": { "value": { "payment_success_url": "https:\/\/www.kinderdijk.nl\/bookings\/?success=true", "payment_failure_url": "https:\/\/www.kinderdijk.nl\/bookings\/?success=false", "tickets": [ { "id": "15", "amount": "3", "action_id": "110", "time_id": "3333" } ], "articles": [ { "id": "2670", "amount": "1" } ], "date": "2023-12-31", "first_name": "Pietje", "last_name": "Testachternaam", "address": "Cypresbaan", "house_number": "31a", "zip_code": "2908LT", "city": "Capelle aan den IJssel", "country_id": "1", "email": "ruben.devos@webparking.nl", "wants_newsletter": true, "wants_to_donate": false, "phone_number": "010-4772678" } }, "Regular ticket with Waterbus": { "value": { "waterbus": true, "date": "", "payment_success_url": "https:\/\/www.kinderdijk.nl\/bookings\/?success=true", "payment_failure_url": "https:\/\/www.kinderdijk.nl\/bookings\/?success=false", "tickets": [ { "id": "133", "amount": "2", "action_id": null, "time_id": "17844" }, { "id": "134", "amount": "1", "action_id": null, "time_id": "17844" }, { "id": "141", "amount": "1", "action_id": null, "time_id": "17844" } ], "articles": [ { "id": "2670", "amount": "1" } ], "first_name": "Pietje", "last_name": "Testachternaam", "address": "Cypresbaan", "house_number": "31a", "zip_code": "2908LT", "city": "Capelle aan den IJssel", "country_id": "1", "email": "ruben.devos@webparking.nl", "wants_newsletter": true, "wants_to_donate": false, "phone_number": "010-4772678" } }, "Regular and parking ticket": { "value": { "payment_success_url": "https:\/\/www.kinderdijk.nl\/bookings\/?success=true", "payment_failure_url": "https:\/\/www.kinderdijk.nl\/bookings\/?success=false", "tickets": [ { "id": "127", "amount": "3", "action_id": "110", "time_id": "12920" }, { "id": "137", "amount": "2", "action_id": null, "time_id": "15265", "license_plates": [ "TN-326-G", "K-075-NB" ] } ], "articles": [ { "id": "2670", "amount": "1" } ], "date": "2023-12-31", "first_name": "Pietje", "last_name": "Testachternaam", "address": "Cypresbaan", "house_number": "31a", "zip_code": "2908LT", "city": "Capelle aan den IJssel", "country_id": "1", "email": "ruben.devos@webparking.nl", "wants_newsletter": true, "wants_to_donate": false, "phone_number": "010-4772678" } } } } }, "required": true }, "responses": { "201": { "description": "Order created. Visit `payment_url` to finalize payment.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "order_id": { "type": "integer" }, "payment_url": { "type": "string" } } } } } } } }, "400": { "description": "Bad request.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Connection not configured for authenticated user." } } } } } }, "401": { "description": "Unauthenticated.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthenticated." } } } } } }, "404": { "description": "Not found.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Not found." } } } } } }, "500": { "description": "Server error." } } } } }, "components": { "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } } }, "security": [ { "bearerAuth": [] } ] }