/pos-system-JAVA_EE

Primary LanguageJavaMIT LicenseMIT

POS-Java-EE (POS) API

Overview

This repository contains a Java EE API for a Point of Sale (POS) system. The API provides endpoints for managing customers, items, and orders.

Technologies Used

  • Java EE
  • JNDI
  • Servlets
  • ObjectMapper (Jackson library)

API Endpoints

Customer Management

Get All Customers

Get Customer by ID

Add Customer

Update Customer

Delete Customer

Item Management

Get All Items

Get Item by Code

Add Item

Update Item

Delete Item

Order Management

Get All Orders

Get Order by ID

Add Order

Update Order

Delete Order

Using Postman

You can use Postman to interact with the API. Follow these steps:

  1. Open Postman.
  2. Choose the appropriate HTTP method (GET, POST, PUT, DELETE).
  3. Enter the corresponding API endpoint URL.
  4. Set the request body to JSON format when required.
  5. Send the request.

Sample JSON Payloads

Customer

{
  "customerId": "C001",
  "customerName": "Danidu",
  "address": "Horana",
  "salary": "150000"
}

Item

{
  "itemCode": "I001",
  "itemName": "Rice packet",
  "qty": 45,
  "price": 800
}