Welcome to POS Kasir API
The POS Kasir API is a comprehensive RESTful API for managing point-of-sale operations. This API provides endpoints for managing products, orders, payments, users, inventory, and more.Base URL
All API requests should be made to:All endpoints in this documentation are relative to the base URL above.
API Documentation
You can explore the complete API specification using Swagger UI:Interactive API Documentation
View and test all API endpoints in the interactive Swagger interface
API Features
The POS Kasir API provides the following capabilities:Core Operations
- Authentication & Authorization - JWT-based authentication with role-based access control
- Product Management - CRUD operations for products, categories, and product options
- Order Management - Create, update, and track orders with various statuses
- Payment Processing - Support for manual payments and Midtrans integration (QRIS/GoPay)
- Inventory Control - Stock tracking with history and change management
Business Features
- Promotions - Flexible promotion system with rules and targets
- Reports & Analytics - Sales reports, profit analysis, and performance metrics
- Shift Management - Cash drawer management with shift-based tracking
- Activity Logs - Comprehensive audit trail for all system activities
- User Management - Multi-role user system (admin, manager, cashier)
Request Format
All API requests should include:- Content-Type:
application/jsonfor POST/PUT requests - Authorization: Bearer token in the header (for authenticated endpoints)
Response Format
All API responses follow a consistent structure:Success Response
Error Response
Pagination
Endpoints that return lists support pagination with the following parameters:page- Page number (default: 1)limit- Items per page (default: 10)offset- Skip items (alternative to page)
Rate Limiting
The API currently does not enforce rate limits, but this may change in production environments. We recommend implementing client-side throttling for optimal performance.
HTTP Status Codes
The API uses standard HTTP status codes:| Status Code | Description |
|---|---|
| 200 | Success - Request completed successfully |
| 201 | Created - Resource created successfully |
| 400 | Bad Request - Invalid request parameters |
| 401 | Unauthorized - Authentication required or failed |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Resource does not exist |
| 409 | Conflict - Resource conflict (e.g., duplicate) |
| 500 | Internal Server Error - Server-side error |
API Versioning
The current API version is v1, indicated in the base URL path/api/v1. Future versions will maintain backward compatibility or provide migration guides.
Getting Started
To start using the API:- Authenticate - Obtain an access token via the
/auth/loginendpoint - Include Token - Add the token to the Authorization header in subsequent requests
- Make Requests - Call the desired endpoints with proper roles and permissions
Authentication Guide
Learn how to authenticate and manage JWT tokens
Error Handling
Understand error responses and common error codes
Next Steps
Explore the API endpoints:Authentication
User login, registration, and session management
Products
Product catalog and inventory management
Orders
Order creation and management
Reports
Sales analytics and business insights