openapi: 3.0.0 info: title: ABC Telecom Postpaid Billing System API description: API documentation for the ABC Telecom Postpaid Billing System, providing endpoints for user authentication, customer management, billing, and invoicing. version: 1.0.0 servers: - url: http://localhost:8080/api description: Development server paths: /auth/login: post: summary: User login requestBody: required: true content: application/json: schema: type: object properties: username: type: string password: type: string responses: '200': description: Successful login content: application/json: schema: type: object properties: token: type: string '401': description: Unauthorized /customers: get: summary: Get all customers responses: '200': description: A list of customers content: application/json: schema: type: array items: $ref: '#/components/schemas/Customer' post: summary: Create a new customer requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Customer' responses: '201': description: Customer created /customers/{id}: get: summary: Get a customer by ID parameters: - name: id in: path required: true description: ID of the customer to retrieve schema: type: string responses: '200': description: Customer details content: application/json: schema: $ref: '#/components/schemas/Customer' '404': description: Customer not found put: summary: Update a customer parameters: - name: id in: path required: true description: ID of the customer to update schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Customer' responses: '200': description: Customer updated '404': description: Customer not found delete: summary: Delete a customer parameters: - name: id in: path required: true description: ID of the customer to delete schema: type: string responses: '204': description: Customer deleted '404': description: Customer not found components: schemas: Customer: type: object properties: id: type: string name: type: string email: type: string phone: type: string address: type: string Invoice: type: object properties: id: type: string customerId: type: string amount: type: number format: float dueDate: type: string format: date status: type: string enum: [PAID, UNPAID]