API Reference
Version: 2.0.0 | Base URL: https://api.jgpnr.com/api/v1 | Last Updated: January 2026
API Modules
API Architecture
Authentication
The API uses JWT (JSON Web Tokens) for authentication.
Header Format
Authorization: Bearer <access_token>
Auth Endpoints
Authenticate a user and receive tokens.
Get current user profile.
Ticket Endpoints
List all tickets with pagination and filtering.
Scan a ticket for entry.
Order Endpoints
List all orders with filtering.
Create a new order.
Customer Endpoints
List all customers.
Shop & Payment
List all active products with pagination.
Get current cart session.
Create order and initiate payment.
Paystack webhook handler. Verifies signature and updates order status.
Product Endpoints
List all products (including inactive) with full details.
Create new product with images and sizes.
Task Endpoints
List all tasks with filtering by status and date range.
Create new task.
Notification Endpoints
Get user's notifications with pagination.
Analytics Endpoints
Get dashboard metrics (revenue, tickets, customers, orders).
Get revenue trends by day/week/month.
Settings Endpoints
Get all system settings.
Audit Endpoints
Get audit logs with filtering.
Health
Basic health check (returns 200 OK).
Deep system status (DB, Redis, queues, disk).
Rate Limiting
The API implements rate limiting to prevent abuse. Limits are per-IP and reset after the window expires.
| Endpoint | Limit | Window |
|---|---|---|
| /auth/* | 10 requests | 15 minutes |
| /api/v1/* | 100 requests | 1 minute |
| /tickets/scan | 60 requests | 1 minute |
Error Codes
| Code | Meaning |
|---|---|
| 400 | Bad Request - Invalid input |
| 401 | Unauthorized - Missing/invalid token |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Resource doesn't exist |
| 429 | Too Many Requests - Rate limited |
| 500 | Internal Server Error |