Cinema Tickets API (1.0.0)

Download OpenAPI specification:

Production-ready REST API for purchasing cinema tickets. This implementation extends beyond the basic DWP coding exercise requirements by providing a complete HTTP server with comprehensive endpoints, error handling, and Docker deployment.

API Information

Returns basic information about the Cinema Tickets API and available endpoints.

Responses

Response samples

Content type
application/json
{
  • "message": "Cinema Tickets API",
  • "endpoints": {
    }
}

Health Check

Returns the health status of the API service.

Responses

Response samples

Content type
application/json
{
  • "status": "OK",
  • "timestamp": "2025-09-16T12:00:00.000Z",
  • "service": "cinema-tickets-api",
  • "version": "1.0.0"
}

Purchase cinema tickets

Validates request, enforces business rules, processes payment, and reserves seats.

Request Body schema: application/json
required
accountId
required
integer >= 1
required
Array of objects (TicketItem) [ 1 .. 25 ] items

Responses

Request samples

Content type
application/json
Example
{
  • "accountId": 12345,
  • "tickets": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "data": {
    }
}