openapi: 3.0.3 info: title: 'Laravel API Documentation' description: '' version: 1.0.0 servers: - url: 'http://localhost' tags: - name: Endpoints description: '' paths: /api/test: get: summary: '' operationId: getApiTest description: '' parameters: [] responses: 200: description: '' content: text/plain: schema: type: string example: 'PGIMS API working' tags: - Endpoints security: [] /api/register: post: summary: 'Register new user and issue API token.' operationId: registerNewUserAndIssueAPIToken description: "Registers a new user with the given name, email, and password.\nReturns the created user data and auth token." parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: user: id: 1 name: 'John Doe' email: john@example.com role: user created_at: '2025-09-17T14:00:00Z' updated_at: '2025-09-17T14:00:00Z' token: encrypted_api_token_here properties: user: type: object properties: id: type: integer example: 1 name: type: string example: 'John Doe' email: type: string example: john@example.com role: type: string example: user created_at: type: string example: '2025-09-17T14:00:00Z' updated_at: type: string example: '2025-09-17T14:00:00Z' token: type: string example: encrypted_api_token_here tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: "User's name." example: 'John Doe' nullable: false email: type: string description: 'Unique user email address.' example: john@example.com nullable: false password: type: string description: 'Password (min 8 chars).' example: password123 nullable: false password_confirmation: type: string description: 'Password confirmation.' example: password123 nullable: false required: - name - email - password - password_confirmation security: [] /api/login: post: summary: 'Login existing user and issue API token.' operationId: loginExistingUserAndIssueAPIToken description: "Authenticates user by email and password.\nReturns user data and an authentication token." parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: user: id: 1 name: 'John Doe' email: john@example.com role: user created_at: '2025-09-17T14:00:00Z' updated_at: '2025-09-17T14:00:00Z' token: encrypted_api_token_here properties: user: type: object properties: id: type: integer example: 1 name: type: string example: 'John Doe' email: type: string example: john@example.com role: type: string example: user created_at: type: string example: '2025-09-17T14:00:00Z' updated_at: type: string example: '2025-09-17T14:00:00Z' token: type: string example: encrypted_api_token_here tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: email: type: string description: 'User email address.' example: john@example.com nullable: false password: type: string description: 'User password.' example: password123 nullable: false required: - email - password security: [] /api/logout: post: summary: 'Logout authenticated user by revoking current access token.' operationId: logoutAuthenticatedUserByRevokingCurrentAccessToken description: 'Requires authentication.' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: message: 'Logged out successfully' properties: message: type: string example: 'Logged out successfully' tags: - Endpoints security: [] /api/user: get: summary: '' operationId: getApiUser description: '' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Endpoints security: [] /api/users: get: summary: 'Display a listing of users.' operationId: displayAListingOfUsers description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: array items: type: object example: - id: 1 name: 'Jane Doe' email: jane@example.com role: admin created_at: '2025-09-19T19:29:00Z' updated_at: '2025-09-19T19:29:00Z' tags: - Endpoints security: [] post: summary: 'Store a newly created user.' operationId: storeANewlyCreatedUser description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: id: 1 name: 'Jane Doe' email: jane@example.com role: admin created_at: '2025-09-19T19:29:00Z' updated_at: '2025-09-19T19:29:00Z' properties: id: type: integer example: 1 name: type: string example: 'Jane Doe' email: type: string example: jane@example.com role: type: string example: admin created_at: type: string example: '2025-09-19T19:29:00Z' updated_at: type: string example: '2025-09-19T19:29:00Z' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: "User's full name." example: 'Jane Doe' nullable: false email: type: string description: 'Unique email address.' example: jane@example.com nullable: false password: type: string description: 'Password, minimum 8 characters, must be confirmed.' example: password123 nullable: false role: type: string description: 'Nullable User role.' example: admin nullable: false password_confirmation: type: string description: 'Password confirmation.' example: password123 nullable: false required: - name - email - password - password_confirmation security: [] '/api/users/{id}': get: summary: 'Display the specified user.' operationId: displayTheSpecifiedUser description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 name: 'Jane Doe' email: jane@example.com role: admin created_at: '2025-09-19T19:29:00Z' updated_at: '2025-09-19T19:29:00Z' properties: id: type: integer example: 1 name: type: string example: 'Jane Doe' email: type: string example: jane@example.com role: type: string example: admin created_at: type: string example: '2025-09-19T19:29:00Z' updated_at: type: string example: '2025-09-19T19:29:00Z' tags: - Endpoints security: [] put: summary: 'Update the specified user.' operationId: updateTheSpecifiedUser description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 name: 'Jane Doe Updated' email: jane.updated@example.com role: user created_at: '2025-09-19T19:29:00Z' updated_at: '2025-09-19T19:45:00Z' properties: id: type: integer example: 1 name: type: string example: 'Jane Doe Updated' email: type: string example: jane.updated@example.com role: type: string example: user created_at: type: string example: '2025-09-19T19:29:00Z' updated_at: type: string example: '2025-09-19T19:45:00Z' tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: name: type: string description: 'Nullable Updated user name.' example: consequatur nullable: false email: type: string description: 'Nullable Updated unique email address.' example: qkunze@example.com nullable: false password: type: string description: 'Nullable Updated password, minimum 8 characters, must be confirmed.' example: 'O[2UZ5ij-e/dl4m{o,' nullable: true role: type: string description: 'Nullable Updated user role.' example: consequatur nullable: false password_confirmation: type: string description: 'Nullable Password confirmation.' example: consequatur nullable: false security: [] delete: summary: 'Remove the specified user.' operationId: removeTheSpecifiedUser description: '' parameters: [] responses: 204: description: '' content: application/json: schema: type: object example: { } properties: { } tags: - Endpoints security: [] parameters: - in: path name: id description: 'The ID of the user.' example: 1 required: true schema: type: integer - in: path name: user description: 'The ID of the user.' example: 17 required: true schema: type: integer /api/suppliers: get: summary: 'Display a listing of suppliers.' operationId: displayAListingOfSuppliers description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: array items: type: object example: - id: 1 name: 'Supplier A' contact_name: 'John Doe' email: contact@example.com phone: 123-456-7890 address: '123 Supplier St.' description: 'Preferred vendor' created_at: '2025-09-19T18:06:00Z' updated_at: '2025-09-19T18:06:00Z' tags: - Endpoints security: [] post: summary: 'Store a newly created supplier.' operationId: storeANewlyCreatedSupplier description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: id: 1 name: 'Supplier A' contact_name: 'John Doe' email: contact@example.com phone: 123-456-7890 address: '123 Supplier St.' description: 'Preferred vendor' created_at: '2025-09-19T18:06:00Z' updated_at: '2025-09-19T18:06:00Z' properties: id: type: integer example: 1 name: type: string example: 'Supplier A' contact_name: type: string example: 'John Doe' email: type: string example: contact@example.com phone: type: string example: 123-456-7890 address: type: string example: '123 Supplier St.' description: type: string example: 'Preferred vendor' created_at: type: string example: '2025-09-19T18:06:00Z' updated_at: type: string example: '2025-09-19T18:06:00Z' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: 'Supplier name.' example: 'Supplier A' nullable: false contact_name: type: string description: "Nullable Contact person's name." example: 'John Doe' nullable: true email: type: string description: 'Nullable Unique contact email.' example: contact@example.com nullable: true phone: type: string description: 'Nullable Contact phone number.' example: 123-456-7890 nullable: true address: type: string description: 'Nullable Supplier address.' example: consequatur nullable: true description: type: string description: 'Nullable Additional info about the supplier.' example: 'Dolores dolorum amet iste laborum eius est dolor.' nullable: true required: - name security: [] '/api/suppliers/{id}': get: summary: 'Display the specified supplier.' operationId: displayTheSpecifiedSupplier description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 name: 'Supplier A' contact_name: 'John Doe' email: contact@example.com phone: 123-456-7890 address: '123 Supplier St.' description: 'Preferred vendor' created_at: '2025-09-19T18:06:00Z' updated_at: '2025-09-19T18:06:00Z' properties: id: type: integer example: 1 name: type: string example: 'Supplier A' contact_name: type: string example: 'John Doe' email: type: string example: contact@example.com phone: type: string example: 123-456-7890 address: type: string example: '123 Supplier St.' description: type: string example: 'Preferred vendor' created_at: type: string example: '2025-09-19T18:06:00Z' updated_at: type: string example: '2025-09-19T18:06:00Z' tags: - Endpoints security: [] put: summary: 'Update the specified supplier.' operationId: updateTheSpecifiedSupplier description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 name: 'Supplier A Updated' contact_name: 'Jane Smith' email: contactnew@example.com phone: 987-654-3210 address: '456 New Supplier St.' description: 'Updated vendor info' created_at: '2025-09-19T18:06:00Z' updated_at: '2025-09-19T18:45:00Z' properties: id: type: integer example: 1 name: type: string example: 'Supplier A Updated' contact_name: type: string example: 'Jane Smith' email: type: string example: contactnew@example.com phone: type: string example: 987-654-3210 address: type: string example: '456 New Supplier St.' description: type: string example: 'Updated vendor info' created_at: type: string example: '2025-09-19T18:06:00Z' updated_at: type: string example: '2025-09-19T18:45:00Z' tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: name: type: string description: 'Nullable Updated supplier name.' example: consequatur nullable: false contact_name: type: string description: 'Nullable Updated contact name.' example: consequatur nullable: true email: type: string description: 'Nullable Updated email.' example: qkunze@example.com nullable: false phone: type: string description: 'Nullable Updated phone.' example: consequatur nullable: true address: type: string description: 'Nullable Updated address.' example: consequatur nullable: true description: type: string description: 'Nullable Updated description.' example: 'Dolores dolorum amet iste laborum eius est dolor.' nullable: true security: [] delete: summary: 'Remove the specified supplier.' operationId: removeTheSpecifiedSupplier description: '' parameters: [] responses: 204: description: '' content: application/json: schema: type: object example: { } properties: { } tags: - Endpoints security: [] parameters: - in: path name: id description: 'The ID of the supplier.' example: 1 required: true schema: type: integer - in: path name: supplier description: 'The ID of the supplier.' example: 17 required: true schema: type: integer /api/products: get: summary: 'Display a listing of products.' operationId: displayAListingOfProducts description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: array items: type: object example: - id: 1 sku: SKU001 name: 'Product A' description: 'A sample product.' price: 100.0 stock: 50 created_at: '2025-09-19T09:35:00Z' updated_at: '2025-09-19T09:35:00Z' tags: - Endpoints security: [] post: summary: 'Store a new product.' operationId: storeANewProduct description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: id: 1 sku: SKU001 name: 'Product A' description: 'A sample product.' price: 100.0 stock: 50 created_at: '2025-09-19T09:35:00Z' updated_at: '2025-09-19T09:35:00Z' properties: id: type: integer example: 1 sku: type: string example: SKU001 name: type: string example: 'Product A' description: type: string example: 'A sample product.' price: type: number example: 100.0 stock: type: integer example: 50 created_at: type: string example: '2025-09-19T09:35:00Z' updated_at: type: string example: '2025-09-19T09:35:00Z' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: sku: type: string description: 'Nullable product SKU.' example: SKU001 nullable: true name: type: string description: 'Product name.' example: 'Product A' nullable: false description: type: string description: 'Nullable product description.' example: 'Dolores dolorum amet iste laborum eius est dolor.' nullable: true price: type: numeric description: 'Product price (min 0).' example: '100.00' nullable: false stock: type: integer description: 'Stock quantity (min 0).' example: 50 nullable: false required: - name - price - stock security: [] '/api/products/{id}': put: summary: 'Update an existing product.' operationId: updateAnExistingProduct description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 sku: SKU001 name: 'Product A Updated' description: 'Updated description.' price: 120.0 stock: 30 created_at: '2025-09-19T09:35:00Z' updated_at: '2025-09-19T09:50:00Z' properties: id: type: integer example: 1 sku: type: string example: SKU001 name: type: string example: 'Product A Updated' description: type: string example: 'Updated description.' price: type: number example: 120.0 stock: type: integer example: 30 created_at: type: string example: '2025-09-19T09:35:00Z' updated_at: type: string example: '2025-09-19T09:50:00Z' tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: sku: type: string description: 'Nullable product SKU.' example: SKU001 nullable: true name: type: string description: 'Nullable product name.' example: consequatur nullable: false description: type: string description: 'Nullable product description.' example: 'Dolores dolorum amet iste laborum eius est dolor.' nullable: true price: type: numeric description: 'Nullable product price (min 0).' example: consequatur nullable: false stock: type: integer description: 'Nullable stock quantity (min 0).' example: 17 nullable: false security: [] delete: summary: 'Remove the specified product.' operationId: removeTheSpecifiedProduct description: '' parameters: [] responses: 204: description: '' content: application/json: schema: type: object example: { } properties: { } tags: - Endpoints security: [] parameters: - in: path name: id description: 'The ID of the product.' example: 1 required: true schema: type: integer /api/product-categories: get: summary: 'Display a listing of product categories.' operationId: displayAListingOfProductCategories description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: array items: type: object example: - id: 1 name: Beverages description: 'Drinks and refreshments' created_at: '2025-09-19T09:35:00Z' updated_at: '2025-09-19T09:35:00Z' tags: - Endpoints security: [] post: summary: 'Store a new product category.' operationId: storeANewProductCategory description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: id: 1 name: Beverages description: 'Drinks and refreshments' created_at: '2025-09-19T09:35:00Z' updated_at: '2025-09-19T09:35:00Z' properties: id: type: integer example: 1 name: type: string example: Beverages description: type: string example: 'Drinks and refreshments' created_at: type: string example: '2025-09-19T09:35:00Z' updated_at: type: string example: '2025-09-19T09:35:00Z' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: 'Product category name.' example: Beverages nullable: false description: type: string description: 'Nullable Product category description.' example: 'Dolores dolorum amet iste laborum eius est dolor.' nullable: true required: - name security: [] '/api/product-categories/{id}': get: summary: 'Display the specified product category.' operationId: displayTheSpecifiedProductCategory description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 name: Beverages description: 'Drinks and refreshments' created_at: '2025-09-19T09:35:00Z' updated_at: '2025-09-19T09:35:00Z' properties: id: type: integer example: 1 name: type: string example: Beverages description: type: string example: 'Drinks and refreshments' created_at: type: string example: '2025-09-19T09:35:00Z' updated_at: type: string example: '2025-09-19T09:35:00Z' tags: - Endpoints security: [] put: summary: 'Update an existing product category.' operationId: updateAnExistingProductCategory description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 name: 'Beverages Updated' description: 'Updated description' created_at: '2025-09-19T09:35:00Z' updated_at: '2025-09-19T10:00:00Z' properties: id: type: integer example: 1 name: type: string example: 'Beverages Updated' description: type: string example: 'Updated description' created_at: type: string example: '2025-09-19T09:35:00Z' updated_at: type: string example: '2025-09-19T10:00:00Z' tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: name: type: string description: 'Nullable Product category name.' example: consequatur nullable: false description: type: string description: 'Nullable Product category description.' example: 'Dolores dolorum amet iste laborum eius est dolor.' nullable: true security: [] delete: summary: 'Remove the specified product category.' operationId: removeTheSpecifiedProductCategory description: '' parameters: [] responses: 204: description: '' content: application/json: schema: type: object example: { } properties: { } tags: - Endpoints security: [] parameters: - in: path name: id description: 'The ID of the product category.' example: 1 required: true schema: type: integer - in: path name: productCategory description: 'The ID of the product category.' example: 17 required: true schema: type: integer /api/inventory: get: summary: 'Display a listing of inventory items with related store and product.' operationId: displayAListingOfInventoryItemsWithRelatedStoreAndProduct description: '' parameters: [] responses: 200: description: '' content: text/plain: schema: type: string example: "[\n {\n \"id\": 1,\n \"store_id\": 2,\n \"product_id\": 5,\n \"quantity\": 100,\n \"created_at\": \"2025-09-19T09:00:00Z\",\n \"updated_at\": \"2025-09-19T09:00:00Z\",\n \"store\": {\n \"id\": 2,\n \"name\": \"Main Store\",\n // other store fields\n },\n \"product\": {\n \"id\": 5,\n \"name\": \"Product A\",\n // other product fields\n }\n }\n]" tags: - Endpoints security: [] post: summary: 'Store a newly created inventory record.' operationId: storeANewlyCreatedInventoryRecord description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: id: 1 store_id: 2 product_id: 5 quantity: 100 created_at: '2025-09-19T09:00:00Z' updated_at: '2025-09-19T09:00:00Z' properties: id: type: integer example: 1 store_id: type: integer example: 2 product_id: type: integer example: 5 quantity: type: integer example: 100 created_at: type: string example: '2025-09-19T09:00:00Z' updated_at: type: string example: '2025-09-19T09:00:00Z' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: store_id: type: integer description: 'Store ID reference.' example: 2 nullable: false product_id: type: integer description: 'Product ID reference.' example: 5 nullable: false quantity: type: integer description: 'Quantity in stock (min 0).' example: 100 nullable: false required: - store_id - product_id - quantity security: [] '/api/inventory/{id}': get: summary: 'Display the specified inventory record with related store and product.' operationId: displayTheSpecifiedInventoryRecordWithRelatedStoreAndProduct description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 store_id: 2 product_id: 5 quantity: 100 created_at: '2025-09-19T09:00:00Z' updated_at: '2025-09-19T09:00:00Z' store: id: 2 name: 'Main Store' product: id: 5 name: 'Product A' properties: id: type: integer example: 1 store_id: type: integer example: 2 product_id: type: integer example: 5 quantity: type: integer example: 100 created_at: type: string example: '2025-09-19T09:00:00Z' updated_at: type: string example: '2025-09-19T09:00:00Z' store: type: object properties: id: type: integer example: 2 name: type: string example: 'Main Store' product: type: object properties: id: type: integer example: 5 name: type: string example: 'Product A' tags: - Endpoints security: [] put: summary: 'Update the specified inventory record.' operationId: updateTheSpecifiedInventoryRecord description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 store_id: 2 product_id: 5 quantity: 150 created_at: '2025-09-19T09:00:00Z' updated_at: '2025-09-19T10:00:00Z' properties: id: type: integer example: 1 store_id: type: integer example: 2 product_id: type: integer example: 5 quantity: type: integer example: 150 created_at: type: string example: '2025-09-19T09:00:00Z' updated_at: type: string example: '2025-09-19T10:00:00Z' tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: store_id: type: integer description: 'Nullable Store ID.' example: 17 nullable: false product_id: type: integer description: 'Nullable Product ID.' example: 17 nullable: false quantity: type: integer description: 'Nullable Quantity in stock (min 0).' example: 17 nullable: false security: [] delete: summary: 'Remove the specified inventory record.' operationId: removeTheSpecifiedInventoryRecord description: '' parameters: [] responses: 204: description: '' content: application/json: schema: type: object example: { } properties: { } tags: - Endpoints security: [] parameters: - in: path name: id description: 'The ID of the inventory.' example: 1 required: true schema: type: integer - in: path name: inventory description: 'Inventory record ID.' example: 17 required: true schema: type: integer /api/orders: get: summary: 'Display a listing of orders with related items and customer.' operationId: displayAListingOfOrdersWithRelatedItemsAndCustomer description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: array items: type: object example: - id: 1 customer_id: 1 total_amount: 250.0 status: completed created_at: '2025-09-19T09:00:00Z' updated_at: '2025-09-19T09:00:00Z' items: - product_id: 5 quantity: 2 unit_price: 50.0 line_total: 100.0 product: id: 5 name: 'Product A' customer: id: 1 name: 'Jane Doe' tags: - Endpoints security: [] post: summary: 'Store a new order including order items and stock adjustments.' operationId: storeANewOrderIncludingOrderItemsAndStockAdjustments description: '' parameters: [] responses: 201: description: '' content: text/plain: schema: type: string example: "{\n \"id\": 1,\n \"customer_id\": 1,\n \"payment_method\": \"credit_card\",\n \"total_amount\": 250.00,\n \"status\": \"completed\",\n \"created_at\": \"2025-09-19T09:00:00Z\",\n \"updated_at\": \"2025-09-19T09:00:00Z\",\n \"items\": [...],\n \"customer\": {...}\n}" tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: customer_id: type: integer description: 'Nullable ID of the customer placing the order.' example: 1 nullable: true items: type: array description: 'Array of order items.' example: - consequatur items: type: string payment_method: type: string description: '' example: consequatur nullable: false required: - items - payment_method security: [] '/api/orders/{id}': get: summary: 'Display the specified order with items and customer.' operationId: displayTheSpecifiedOrderWithItemsAndCustomer description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 customer_id: 1 total_amount: 250.0 status: completed created_at: '2025-09-19T09:00:00Z' updated_at: '2025-09-19T09:00:00Z' items: - product_id: 5 quantity: 2 unit_price: 50.0 line_total: 100.0 product: id: 5 name: 'Product A' customer: id: 1 name: 'Jane Doe' properties: id: type: integer example: 1 customer_id: type: integer example: 1 total_amount: type: number example: 250.0 status: type: string example: completed created_at: type: string example: '2025-09-19T09:00:00Z' updated_at: type: string example: '2025-09-19T09:00:00Z' items: type: array example: - product_id: 5 quantity: 2 unit_price: 50 line_total: 100 product: id: 5 name: 'Product A' items: type: object properties: product_id: type: integer example: 5 quantity: type: integer example: 2 unit_price: type: number example: 50.0 line_total: type: number example: 100.0 product: type: object properties: id: type: integer example: 5 name: type: string example: 'Product A' customer: type: object properties: id: type: integer example: 1 name: type: string example: 'Jane Doe' tags: - Endpoints security: [] put: summary: 'Update the specified order and manage items and stock.' operationId: updateTheSpecifiedOrderAndManageItemsAndStock description: '' parameters: [] responses: 200: description: '' content: text/plain: schema: type: string example: "{\n \"id\": 1,\n \"customer_id\": 1,\n \"total_amount\": 300.00,\n \"status\": \"completed\",\n \"notes\": \"Updated notes\",\n \"created_at\": \"2025-09-19T09:00:00Z\",\n \"updated_at\": \"2025-09-19T10:00:00Z\",\n \"items\": [...],\n \"customer\": {...}\n}" tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: customer_id: type: integer description: 'Nullable Updated customer ID.' example: 17 nullable: false status: type: string description: 'Nullable Updated order status. One of: pending, processing, completed, cancelled.' example: consequatur nullable: false notes: type: string description: 'Nullable Additional notes.' example: consequatur nullable: true items: type: array description: 'Nullable Updated list of order items.' example: - consequatur items: type: string security: [] delete: summary: 'Remove the specified order and restore stock quantities.' operationId: removeTheSpecifiedOrderAndRestoreStockQuantities description: '' parameters: [] responses: 204: description: '' content: application/json: schema: type: object example: { } properties: { } tags: - Endpoints security: [] parameters: - in: path name: id description: 'The ID of the order.' example: 2 required: true schema: type: integer - in: path name: order description: 'The ID of the order.' example: 17 required: true schema: type: integer /api/order-items: get: summary: 'Display a listing of order items with related products and orders.' operationId: displayAListingOfOrderItemsWithRelatedProductsAndOrders description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: array items: type: object example: - id: 1 order_id: 10 product_id: 5 quantity: 3 unit_price: 50.0 line_total: 150.0 created_at: '2025-09-19T09:30:00Z' updated_at: '2025-09-19T09:30:00Z' product: id: 5 name: 'Product A' order: id: 10 customer_id: 1 total_amount: 500.0 status: completed tags: - Endpoints security: [] post: summary: 'Store a new order item.' operationId: storeANewOrderItem description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: id: 1 order_id: 10 product_id: 5 quantity: 3 unit_price: 50.0 line_total: 150.0 created_at: '2025-09-19T09:30:00Z' updated_at: '2025-09-19T09:30:00Z' properties: id: type: integer example: 1 order_id: type: integer example: 10 product_id: type: integer example: 5 quantity: type: integer example: 3 unit_price: type: number example: 50.0 line_total: type: number example: 150.0 created_at: type: string example: '2025-09-19T09:30:00Z' updated_at: type: string example: '2025-09-19T09:30:00Z' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: order_id: type: integer description: 'ID of the order.' example: 10 nullable: false product_id: type: integer description: 'ID of the product.' example: 5 nullable: false quantity: type: integer description: 'Quantity ordered. Minimum 1.' example: 3 nullable: false unit_price: type: numeric description: 'Unit price of the product.' example: '50.00' nullable: false line_total: type: numeric description: 'Total line amount.' example: '150.00' nullable: false required: - order_id - product_id - quantity - unit_price - line_total security: [] '/api/order-items/{id}': get: summary: 'Display the specified order item with product and order.' operationId: displayTheSpecifiedOrderItemWithProductAndOrder description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 order_id: 10 product_id: 5 quantity: 3 unit_price: 50.0 line_total: 150.0 created_at: '2025-09-19T09:30:00Z' updated_at: '2025-09-19T09:30:00Z' product: id: 5 name: 'Product A' order: id: 10 customer_id: 1 total_amount: 500.0 status: completed properties: id: type: integer example: 1 order_id: type: integer example: 10 product_id: type: integer example: 5 quantity: type: integer example: 3 unit_price: type: number example: 50.0 line_total: type: number example: 150.0 created_at: type: string example: '2025-09-19T09:30:00Z' updated_at: type: string example: '2025-09-19T09:30:00Z' product: type: object properties: id: type: integer example: 5 name: type: string example: 'Product A' order: type: object properties: id: type: integer example: 10 customer_id: type: integer example: 1 total_amount: type: number example: 500.0 status: type: string example: completed tags: - Endpoints security: [] put: summary: 'Update an existing order item.' operationId: updateAnExistingOrderItem description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 order_id: 10 product_id: 5 quantity: 4 unit_price: 45.0 line_total: 180.0 created_at: '2025-09-19T09:30:00Z' updated_at: '2025-09-19T10:00:00Z' properties: id: type: integer example: 1 order_id: type: integer example: 10 product_id: type: integer example: 5 quantity: type: integer example: 4 unit_price: type: number example: 45.0 line_total: type: number example: 180.0 created_at: type: string example: '2025-09-19T09:30:00Z' updated_at: type: string example: '2025-09-19T10:00:00Z' tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: order_id: type: integer description: 'Nullable Updated order ID.' example: 17 nullable: false product_id: type: integer description: 'Nullable Updated product ID.' example: 17 nullable: false quantity: type: integer description: 'Nullable Updated quantity.' example: 17 nullable: false unit_price: type: numeric description: 'Nullable Updated unit price.' example: consequatur nullable: false line_total: type: numeric description: 'Nullable Updated line total.' example: consequatur nullable: false security: [] delete: summary: 'Delete the specified order item.' operationId: deleteTheSpecifiedOrderItem description: '' parameters: [] responses: 204: description: '' content: application/json: schema: type: object example: { } properties: { } tags: - Endpoints security: [] parameters: - in: path name: id description: 'The ID of the order item.' example: 1 required: true schema: type: integer - in: path name: orderItem description: 'The ID of the order item.' example: 17 required: true schema: type: integer /api/purchase-orders: get: summary: 'Display a listing of purchase orders with associated supplier.' operationId: displayAListingOfPurchaseOrdersWithAssociatedSupplier description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: array items: type: object example: - id: 1 supplier_id: 3 order_number: PO-12345 status: pending total_amount: 1000.0 order_date: '2025-09-20' expected_date: '2025-09-30' notes: 'Urgent order' created_at: '2025-09-19T16:40:00Z' updated_at: '2025-09-19T16:40:00Z' supplier: id: 3 name: 'Supplier Name' tags: - Endpoints security: [] post: summary: 'Store a newly created purchase order.' operationId: storeANewlyCreatedPurchaseOrder description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: id: 1 supplier_id: 3 order_number: PO-12345 status: pending payment_method: cash total_amount: 1000.0 order_date: '2025-09-20' expected_date: '2025-09-30' notes: 'Urgent order' created_at: '2025-09-19T16:40:00Z' updated_at: '2025-09-19T16:40:00Z' properties: id: type: integer example: 1 supplier_id: type: integer example: 3 order_number: type: string example: PO-12345 status: type: string example: pending payment_method: type: string example: cash total_amount: type: number example: 1000.0 order_date: type: string example: '2025-09-20' expected_date: type: string example: '2025-09-30' notes: type: string example: 'Urgent order' created_at: type: string example: '2025-09-19T16:40:00Z' updated_at: type: string example: '2025-09-19T16:40:00Z' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: supplier_id: type: integer description: 'Supplier ID.' example: 3 nullable: false order_number: type: string description: 'Unique order number.' example: PO-12345 nullable: false status: type: string description: 'Nullable Order status. One of: pending, approved, received, cancelled.' example: consequatur nullable: true payment_method: type: string description: '' example: consequatur nullable: false total_amount: type: numeric description: 'Nullable Total amount.' example: '1000.00' nullable: true order_date: type: date description: 'Nullable Order date.' example: '2025-09-20' nullable: true expected_date: type: date description: 'Nullable Expected delivery date.' example: '2025-09-30' nullable: true notes: type: string description: 'Nullable Additional notes.' example: consequatur nullable: true required: - supplier_id - order_number - payment_method security: [] '/api/purchase-orders/{id}': get: summary: 'Display the specified purchase order with supplier details.' operationId: displayTheSpecifiedPurchaseOrderWithSupplierDetails description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 supplier_id: 3 order_number: PO-12345 status: pending total_amount: 1000.0 order_date: '2025-09-20' expected_date: '2025-09-30' notes: 'Urgent order' created_at: '2025-09-19T16:40:00Z' updated_at: '2025-09-19T16:40:00Z' supplier: id: 3 name: 'Supplier Name' properties: id: type: integer example: 1 supplier_id: type: integer example: 3 order_number: type: string example: PO-12345 status: type: string example: pending total_amount: type: number example: 1000.0 order_date: type: string example: '2025-09-20' expected_date: type: string example: '2025-09-30' notes: type: string example: 'Urgent order' created_at: type: string example: '2025-09-19T16:40:00Z' updated_at: type: string example: '2025-09-19T16:40:00Z' supplier: type: object properties: id: type: integer example: 3 name: type: string example: 'Supplier Name' tags: - Endpoints security: [] put: summary: 'Update the specified purchase order.' operationId: updateTheSpecifiedPurchaseOrder description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 supplier_id: 3 order_number: PO-12346 status: approved total_amount: 1100.0 order_date: '2025-09-20' expected_date: '2025-10-01' notes: 'Approved order' created_at: '2025-09-19T16:40:00Z' updated_at: '2025-09-19T17:00:00Z' properties: id: type: integer example: 1 supplier_id: type: integer example: 3 order_number: type: string example: PO-12346 status: type: string example: approved total_amount: type: number example: 1100.0 order_date: type: string example: '2025-09-20' expected_date: type: string example: '2025-10-01' notes: type: string example: 'Approved order' created_at: type: string example: '2025-09-19T16:40:00Z' updated_at: type: string example: '2025-09-19T17:00:00Z' tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: supplier_id: type: integer description: 'Nullable Supplier ID.' example: 17 nullable: false order_number: type: string description: 'Nullable Unique order number.' example: consequatur nullable: false status: type: string description: 'Nullable Order status.' example: consequatur nullable: false total_amount: type: numeric description: 'Nullable Total amount.' example: consequatur nullable: true order_date: type: date description: 'Nullable Order date.' example: consequatur nullable: true expected_date: type: date description: 'Nullable Expected delivery date.' example: consequatur nullable: true notes: type: string description: 'Nullable Additional notes.' example: consequatur nullable: true security: [] delete: summary: 'Remove the specified purchase order.' operationId: removeTheSpecifiedPurchaseOrder description: '' parameters: [] responses: 204: description: '' content: application/json: schema: type: object example: { } properties: { } tags: - Endpoints security: [] parameters: - in: path name: id description: 'The ID of the purchase order.' example: 1 required: true schema: type: integer - in: path name: purchaseOrder description: 'The ID of the purchase order.' example: 17 required: true schema: type: integer /api/stock-requisitions: get: summary: 'Display a listing of stock requisitions with related stores, approver, and items.' operationId: displayAListingOfStockRequisitionsWithRelatedStoresApproverAndItems description: '' parameters: [] responses: 200: description: '' content: text/plain: schema: type: string example: "[\n {\n \"id\": 1,\n \"from_store_id\": 2,\n \"to_store_id\": 3,\n \"status\": \"pending\",\n \"approved_by\": 5,\n \"created_at\": \"2025-09-19T16:44:00Z\",\n \"updated_at\": \"2025-09-19T16:44:00Z\",\n \"fromStore\": { \"id\": 2, \"name\": \"Store A\" },\n \"toStore\": { \"id\": 3, \"name\": \"Store B\" },\n \"approvedBy\": { \"id\": 5, \"name\": \"Manager\" },\n \"items\": [\n / Array of requisition items /\n ]\n }\n]" tags: - Endpoints security: [] post: summary: 'Store a newly created stock requisition.' operationId: storeANewlyCreatedStockRequisition description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: id: 1 from_store_id: 2 to_store_id: 3 status: pending approved_by: 5 created_at: '2025-09-19T16:44:00Z' updated_at: '2025-09-19T16:44:00Z' properties: id: type: integer example: 1 from_store_id: type: integer example: 2 to_store_id: type: integer example: 3 status: type: string example: pending approved_by: type: integer example: 5 created_at: type: string example: '2025-09-19T16:44:00Z' updated_at: type: string example: '2025-09-19T16:44:00Z' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: from_store_id: type: integer description: 'ID of the source store.' example: 17 nullable: false to_store_id: type: integer description: 'ID of the destination store (different from from_store_id).' example: 17 nullable: false status: type: string description: 'Status of the requisition.' example: pending nullable: false approved_by: type: integer description: 'Nullable User ID who approved the requisition.' example: 17 nullable: true required: - from_store_id - to_store_id - status security: [] '/api/stock-requisitions/{id}': get: summary: 'Display a specific stock requisition with details.' operationId: displayASpecificStockRequisitionWithDetails description: '' parameters: [] responses: 200: description: '' content: text/plain: schema: type: string example: "{\n \"id\": 1,\n \"from_store_id\": 2,\n \"to_store_id\": 3,\n \"status\": \"pending\",\n \"approved_by\": 5,\n \"created_at\": \"2025-09-19T16:44:00Z\",\n \"updated_at\": \"2025-09-19T16:44:00Z\",\n \"fromStore\": { \"id\": 2, \"name\": \"Store A\" },\n \"toStore\": { \"id\": 3, \"name\": \"Store B\" },\n \"approvedBy\": { \"id\": 5, \"name\": \"Manager\" },\n \"items\": [\n / Array of requisition items /\n ]\n}" tags: - Endpoints security: [] put: summary: 'Update the specified stock requisition.' operationId: updateTheSpecifiedStockRequisition description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 from_store_id: 2 to_store_id: 3 status: approved approved_by: 5 created_at: '2025-09-19T16:44:00Z' updated_at: '2025-09-19T17:00:00Z' properties: id: type: integer example: 1 from_store_id: type: integer example: 2 to_store_id: type: integer example: 3 status: type: string example: approved approved_by: type: integer example: 5 created_at: type: string example: '2025-09-19T16:44:00Z' updated_at: type: string example: '2025-09-19T17:00:00Z' tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: from_store_id: type: integer description: 'Nullable ID of the source store.' example: 17 nullable: false to_store_id: type: integer description: 'Nullable ID of the destination store (must be different from from_store_id).' example: 17 nullable: false status: type: string description: 'Nullable Status of the requisition.' example: consequatur nullable: false approved_by: type: integer description: 'Nullable User ID who approved the requisition.' example: 17 nullable: true security: [] delete: summary: 'Remove the specified stock requisition.' operationId: removeTheSpecifiedStockRequisition description: '' parameters: [] responses: 204: description: '' content: application/json: schema: type: object example: { } properties: { } tags: - Endpoints security: [] parameters: - in: path name: id description: 'The ID of the stock requisition.' example: 17 required: true schema: type: integer - in: path name: stockRequisition description: 'The ID of the stock requisition.' example: 17 required: true schema: type: integer /api/stock-requisition-items: get: summary: 'Display a listing of stock requisition items with related stock requisition and product.' operationId: displayAListingOfStockRequisitionItemsWithRelatedStockRequisitionAndProduct description: '' parameters: [] responses: 200: description: '' content: text/plain: schema: type: string example: "[\n {\n \"id\": 1,\n \"stock_requisition_id\": 2,\n \"product_id\": 5,\n \"quantity\": 10,\n \"created_at\": \"2025-09-19T17:00:00Z\",\n \"updated_at\": \"2025-09-19T17:00:00Z\",\n \"stockRequisition\": {\n \"id\": 2,\n \"status\": \"pending\",\n // other stock requisition fields\n },\n \"product\": {\n \"id\": 5,\n \"name\": \"Product A\"\n }\n }\n]" tags: - Endpoints security: [] post: summary: 'Store a newly created stock requisition item.' operationId: storeANewlyCreatedStockRequisitionItem description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: id: 1 stock_requisition_id: 2 product_id: 5 quantity: 10 created_at: '2025-09-19T17:00:00Z' updated_at: '2025-09-19T17:00:00Z' properties: id: type: integer example: 1 stock_requisition_id: type: integer example: 2 product_id: type: integer example: 5 quantity: type: integer example: 10 created_at: type: string example: '2025-09-19T17:00:00Z' updated_at: type: string example: '2025-09-19T17:00:00Z' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: stock_requisition_id: type: integer description: 'ID of the stock requisition.' example: 2 nullable: false product_id: type: integer description: 'ID of the product.' example: 5 nullable: false quantity: type: integer description: 'Quantity requested. Minimum 1.' example: 10 nullable: false required: - stock_requisition_id - product_id - quantity security: [] '/api/stock-requisition-items/{id}': get: summary: 'Display the specified stock requisition item with related data.' operationId: displayTheSpecifiedStockRequisitionItemWithRelatedData description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 stock_requisition_id: 2 product_id: 5 quantity: 10 created_at: '2025-09-19T17:00:00Z' updated_at: '2025-09-19T17:00:00Z' stockRequisition: id: 2 status: pending product: id: 5 name: 'Product A' properties: id: type: integer example: 1 stock_requisition_id: type: integer example: 2 product_id: type: integer example: 5 quantity: type: integer example: 10 created_at: type: string example: '2025-09-19T17:00:00Z' updated_at: type: string example: '2025-09-19T17:00:00Z' stockRequisition: type: object properties: id: type: integer example: 2 status: type: string example: pending product: type: object properties: id: type: integer example: 5 name: type: string example: 'Product A' tags: - Endpoints security: [] put: summary: 'Update the specified stock requisition item.' operationId: updateTheSpecifiedStockRequisitionItem description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 stock_requisition_id: 2 product_id: 5 quantity: 15 created_at: '2025-09-19T17:00:00Z' updated_at: '2025-09-19T18:00:00Z' properties: id: type: integer example: 1 stock_requisition_id: type: integer example: 2 product_id: type: integer example: 5 quantity: type: integer example: 15 created_at: type: string example: '2025-09-19T17:00:00Z' updated_at: type: string example: '2025-09-19T18:00:00Z' tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: stock_requisition_id: type: integer description: 'Nullable ID of the stock requisition.' example: 17 nullable: false product_id: type: integer description: 'Nullable ID of the product.' example: 17 nullable: false quantity: type: integer description: 'Nullable Updated quantity.' example: 17 nullable: false security: [] delete: summary: 'Remove the specified stock requisition item.' operationId: removeTheSpecifiedStockRequisitionItem description: '' parameters: [] responses: 204: description: '' content: application/json: schema: type: object example: { } properties: { } tags: - Endpoints security: [] parameters: - in: path name: id description: 'The ID of the stock requisition item.' example: 17 required: true schema: type: integer - in: path name: stockRequisitionItem description: 'The ID of the stock requisition item.' example: 17 required: true schema: type: integer /api/stores: get: summary: 'Display a listing of stores.' operationId: displayAListingOfStores description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: array items: type: object example: - id: 1 name: 'Main Store' address: '123 Main Street' phone: 123-456-7890 created_at: '2025-09-19T17:03:00Z' updated_at: '2025-09-19T17:03:00Z' tags: - Endpoints security: [] post: summary: 'Store a newly created store.' operationId: storeANewlyCreatedStore description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: id: 1 name: 'Main Store' address: '123 Main Street' phone: 123-456-7890 created_at: '2025-09-19T17:03:00Z' updated_at: '2025-09-19T17:03:00Z' properties: id: type: integer example: 1 name: type: string example: 'Main Store' address: type: string example: '123 Main Street' phone: type: string example: 123-456-7890 created_at: type: string example: '2025-09-19T17:03:00Z' updated_at: type: string example: '2025-09-19T17:03:00Z' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: 'Name of the store.' example: 'Main Store' nullable: false address: type: string description: 'Nullable Store address.' example: '123 Main Street' nullable: true phone: type: string description: 'Nullable Store phone number.' example: 123-456-7890 nullable: true required: - name security: [] '/api/stores/{id}': get: summary: 'Display the specified store.' operationId: displayTheSpecifiedStore description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 name: 'Main Store' address: '123 Main Street' phone: 123-456-7890 created_at: '2025-09-19T17:03:00Z' updated_at: '2025-09-19T17:03:00Z' properties: id: type: integer example: 1 name: type: string example: 'Main Store' address: type: string example: '123 Main Street' phone: type: string example: 123-456-7890 created_at: type: string example: '2025-09-19T17:03:00Z' updated_at: type: string example: '2025-09-19T17:03:00Z' tags: - Endpoints security: [] put: summary: 'Update the specified store.' operationId: updateTheSpecifiedStore description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 name: 'Updated Store' address: '456 New Street' phone: 987-654-3210 created_at: '2025-09-19T17:03:00Z' updated_at: '2025-09-19T17:15:00Z' properties: id: type: integer example: 1 name: type: string example: 'Updated Store' address: type: string example: '456 New Street' phone: type: string example: 987-654-3210 created_at: type: string example: '2025-09-19T17:03:00Z' updated_at: type: string example: '2025-09-19T17:15:00Z' tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: name: type: string description: 'Nullable Updated name.' example: consequatur nullable: false address: type: string description: 'Nullable Updated address.' example: consequatur nullable: true phone: type: string description: 'Nullable Updated phone.' example: consequatur nullable: true security: [] delete: summary: 'Remove the specified store.' operationId: removeTheSpecifiedStore description: '' parameters: [] responses: 204: description: '' content: application/json: schema: type: object example: { } properties: { } tags: - Endpoints security: [] parameters: - in: path name: id description: 'The ID of the store.' example: 1 required: true schema: type: integer - in: path name: store description: 'The ID of the store.' example: 17 required: true schema: type: integer /api/reports/daily-sales: get: summary: 'Get daily sales summary report.' operationId: getDailySalesSummaryReport description: '' parameters: - in: query name: date description: 'Date to get sales for (Y-m-d format). Defaults to today.' example: consequatur required: false schema: type: string description: 'Date to get sales for (Y-m-d format). Defaults to today.' example: consequatur nullable: false - in: query name: store_id description: 'Optional array of store IDs to filter by.' example: - 17 required: false schema: type: array description: 'Optional array of store IDs to filter by.' example: - 17 items: type: integer responses: 200: description: '' content: application/json: schema: type: object example: date: '2025-09-17' total_orders: 100 total_sales: 50000.45 properties: date: type: string example: '2025-09-17' total_orders: type: integer example: 100 total_sales: type: number example: 50000.45 tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: date: type: string description: 'Must be a valid date.' example: '2025-10-20T17:16:12' nullable: true store_id: type: array description: 'The id of an existing record in the stores table.' example: - 17 items: type: integer security: [] /api/reports/payment-breakdown: get: summary: 'Get payment breakdown by payment method over a date range.' operationId: getPaymentBreakdownByPaymentMethodOverADateRange description: '' parameters: - in: query name: start description: 'Start date (Y-m-d). Defaults to one month ago.' example: consequatur required: false schema: type: string description: 'Start date (Y-m-d). Defaults to one month ago.' example: consequatur nullable: false - in: query name: end description: 'End date (Y-m-d). Defaults to today.' example: consequatur required: false schema: type: string description: 'End date (Y-m-d). Defaults to today.' example: consequatur nullable: false - in: query name: store_id description: 'Optional array of store IDs to filter by.' example: - 17 required: false schema: type: array description: 'Optional array of store IDs to filter by.' example: - 17 items: type: integer responses: 200: description: '' content: application/json: schema: type: object example: start_date: '2025-08-17' end_date: '2025-09-17' payment_methods: - payment_method: cash total: 20000 - payment_method: card total: 30000 properties: start_date: type: string example: '2025-08-17' end_date: type: string example: '2025-09-17' payment_methods: type: array example: - payment_method: cash total: 20000 - payment_method: card total: 30000 items: type: object properties: payment_method: type: string example: cash total: type: integer example: 20000 tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: start: type: string description: 'Must be a valid date.' example: '2025-10-20T17:16:12' nullable: true end: type: string description: 'Must be a valid date. Must be a date after or equal to start.' example: '2106-11-19' nullable: true store_id: type: array description: 'The id of an existing record in the stores table.' example: - 17 items: type: integer security: [] /api/reports/profit: get: summary: 'Generate profit report for a date range.' operationId: generateProfitReportForADateRange description: '' parameters: - in: query name: start description: 'Start date (Y-m-d). Defaults to one month ago.' example: consequatur required: false schema: type: string description: 'Start date (Y-m-d). Defaults to one month ago.' example: consequatur nullable: false - in: query name: end description: 'End date (Y-m-d). Defaults to today.' example: consequatur required: false schema: type: string description: 'End date (Y-m-d). Defaults to today.' example: consequatur nullable: false - in: query name: store_id description: 'Optional array of store IDs to filter by.' example: - 17 required: false schema: type: array description: 'Optional array of store IDs to filter by.' example: - 17 items: type: integer responses: 200: description: '' content: application/json: schema: type: object example: start_date: '2025-08-17' end_date: '2025-09-17' profit: 15000.5 properties: start_date: type: string example: '2025-08-17' end_date: type: string example: '2025-09-17' profit: type: number example: 15000.5 tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: start: type: string description: 'Must be a valid date.' example: '2025-10-20T17:16:12' nullable: true end: type: string description: 'Must be a valid date. Must be a date after or equal to start.' example: '2106-11-19' nullable: true store_id: type: array description: 'The id of an existing record in the stores table.' example: - 17 items: type: integer security: [] /api/reports/inventory-status: get: summary: 'Get inventory stock status by product and store.' operationId: getInventoryStockStatusByProductAndStore description: '' parameters: - in: query name: store_id description: 'Optional store ID to filter by.' example: 17 required: false schema: type: integer description: 'Optional store ID to filter by.' example: 17 nullable: false responses: 200: description: '' content: application/json: schema: type: array items: type: object example: - id: 1 name: 'Product A' quantity: 100 store_id: 2 - id: 2 name: 'Product B' quantity: 50 store_id: 2 tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: store_id: type: integer description: 'The id of an existing record in the stores table.' example: 17 nullable: true security: [] /api/reports/customer-credit: get: summary: 'Get customer credit and balance report.' operationId: getCustomerCreditAndBalanceReport description: '' parameters: - in: query name: customer_id description: 'Optional customer ID to filter by.' example: 17 required: false schema: type: integer description: 'Optional customer ID to filter by.' example: 17 nullable: false responses: 200: description: '' content: application/json: schema: type: array items: type: object example: - id: 1 name: 'John Doe' balance: 1200 credit_limit: 5000 tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: customer_id: type: integer description: 'The id of an existing record in the customers table.' example: 17 nullable: true security: [] /api/reports/expense: get: summary: 'Generate expense report for a date range.' operationId: generateExpenseReportForADateRange description: '' parameters: - in: query name: start description: 'Start date (Y-m-d). Defaults to one month ago.' example: consequatur required: false schema: type: string description: 'Start date (Y-m-d). Defaults to one month ago.' example: consequatur nullable: false - in: query name: end description: 'End date (Y-m-d). Defaults to today.' example: consequatur required: false schema: type: string description: 'End date (Y-m-d). Defaults to today.' example: consequatur nullable: false - in: query name: store_id description: 'Optional array of store IDs to filter by.' example: - 17 required: false schema: type: array description: 'Optional array of store IDs to filter by.' example: - 17 items: type: integer responses: 200: description: '' content: application/json: schema: type: object example: start_date: '2025-08-17' end_date: '2025-09-17' total_expenses: 8000 properties: start_date: type: string example: '2025-08-17' end_date: type: string example: '2025-09-17' total_expenses: type: integer example: 8000 tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: start: type: string description: 'Must be a valid date.' example: '2025-10-20T17:16:12' nullable: true end: type: string description: 'Must be a valid date. Must be a date after or equal to start.' example: '2106-11-19' nullable: true store_id: type: array description: 'The id of an existing record in the stores table.' example: - 17 items: type: integer security: [] /api/customers: get: summary: 'Display a listing of customers.' operationId: displayAListingOfCustomers description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: array items: type: object example: - id: 1 name: 'Jane Doe' gender: female phone: '1234567890' email: jane@example.com address: '123 Main St' birthday: '1990-05-10' balance: 2000.0 credit_limit: 5000.0 notes: 'Loyal customer' created_at: '2025-09-17T12:00:00Z' updated_at: '2025-09-17T12:00:00Z' tags: - Endpoints security: [] post: summary: 'Store a new customer.' operationId: storeANewCustomer description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: id: 1 name: 'Jane Doe' gender: female phone: '1234567890' email: jane@example.com address: '123 Main St' birthday: '1990-05-10' balance: 2000.0 credit_limit: 5000.0 notes: 'Loyal customer' created_at: '2025-09-17T12:00:00Z' updated_at: '2025-09-17T12:00:00Z' properties: id: type: integer example: 1 name: type: string example: 'Jane Doe' gender: type: string example: female phone: type: string example: '1234567890' email: type: string example: jane@example.com address: type: string example: '123 Main St' birthday: type: string example: '1990-05-10' balance: type: number example: 2000.0 credit_limit: type: number example: 5000.0 notes: type: string example: 'Loyal customer' created_at: type: string example: '2025-09-17T12:00:00Z' updated_at: type: string example: '2025-09-17T12:00:00Z' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: "Customer's name." example: 'Jane Doe' nullable: false gender: type: string description: 'Nullable gender.' example: female nullable: true phone: type: string description: 'Nullable phone number.' example: '1234567890' nullable: true email: type: string description: 'Nullable unique email.' example: jane@example.com nullable: true address: type: string description: 'Nullable address.' example: consequatur nullable: true birthday: type: date description: 'Nullable date of birth.' example: '1990-05-10' nullable: true balance: type: numeric description: 'Nullable initial balance.' example: '2000.00' nullable: true credit_limit: type: numeric description: 'Nullable credit limit.' example: '5000.00' nullable: true notes: type: string description: 'Nullable additional notes.' example: consequatur nullable: true required: - name security: [] '/api/customers/{id}': get: summary: 'Display the specified customer.' operationId: displayTheSpecifiedCustomer description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 name: 'Jane Doe' gender: female phone: '1234567890' email: jane@example.com address: '123 Main St' birthday: '1990-05-10' balance: 2000.0 credit_limit: 5000.0 notes: 'Loyal customer' created_at: '2025-09-17T12:00:00Z' updated_at: '2025-09-17T12:00:00Z' properties: id: type: integer example: 1 name: type: string example: 'Jane Doe' gender: type: string example: female phone: type: string example: '1234567890' email: type: string example: jane@example.com address: type: string example: '123 Main St' birthday: type: string example: '1990-05-10' balance: type: number example: 2000.0 credit_limit: type: number example: 5000.0 notes: type: string example: 'Loyal customer' created_at: type: string example: '2025-09-17T12:00:00Z' updated_at: type: string example: '2025-09-17T12:00:00Z' tags: - Endpoints security: [] put: summary: 'Update the specified customer.' operationId: updateTheSpecifiedCustomer description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 name: 'Jane Doe Updated' gender: female phone: '0987654321' email: janeupdated@example.com address: '456 Another St' birthday: '1990-05-10' balance: 2500.0 credit_limit: 5500.0 notes: 'Updated notes' created_at: '2025-09-17T12:00:00Z' updated_at: '2025-09-18T15:00:00Z' properties: id: type: integer example: 1 name: type: string example: 'Jane Doe Updated' gender: type: string example: female phone: type: string example: '0987654321' email: type: string example: janeupdated@example.com address: type: string example: '456 Another St' birthday: type: string example: '1990-05-10' balance: type: number example: 2500.0 credit_limit: type: number example: 5500.0 notes: type: string example: 'Updated notes' created_at: type: string example: '2025-09-17T12:00:00Z' updated_at: type: string example: '2025-09-18T15:00:00Z' tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: name: type: string description: 'Nullable updated name.' example: consequatur nullable: false gender: type: string description: 'Nullable updated gender.' example: consequatur nullable: true phone: type: string description: 'Nullable updated phone.' example: consequatur nullable: true email: type: string description: 'Nullable updated email.' example: qkunze@example.com nullable: false address: type: string description: 'Nullable updated address.' example: consequatur nullable: true birthday: type: date description: 'Nullable updated birthday.' example: consequatur nullable: true balance: type: numeric description: 'Nullable updated balance.' example: consequatur nullable: true credit_limit: type: numeric description: 'Nullable updated credit limit.' example: consequatur nullable: true notes: type: string description: 'Nullable updated notes.' example: consequatur nullable: true security: [] delete: summary: 'Remove the specified customer.' operationId: removeTheSpecifiedCustomer description: '' parameters: [] responses: 204: description: '' content: application/json: schema: type: object example: { } properties: { } tags: - Endpoints security: [] parameters: - in: path name: id description: 'The ID of the customer.' example: 1 required: true schema: type: integer - in: path name: customer description: 'The ID of the customer.' example: 17 required: true schema: type: integer /api/transactions: get: summary: 'Display a listing of transactions with related bank accounts.' operationId: displayAListingOfTransactionsWithRelatedBankAccounts description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: array items: type: object example: - id: 1 bank_account_id: 2 type: credit amount: 1000.0 reference: INV-12345 description: 'Payment received' transaction_date: '2025-09-19' created_at: '2025-09-19T19:00:00Z' updated_at: '2025-09-19T19:00:00Z' bankAccount: id: 2 bank_name: 'First Bank' account_number: '1234567890' tags: - Endpoints security: [] post: summary: 'Store a new transaction inside a database transaction block.' operationId: storeANewTransactionInsideADatabaseTransactionBlock description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: id: 10 bank_account_id: 2 type: credit amount: 1000.0 reference: INV-12345 description: 'Payment received' transaction_date: '2025-09-19' created_at: '2025-09-19T19:05:00Z' updated_at: '2025-09-19T19:05:00Z' properties: id: type: integer example: 10 bank_account_id: type: integer example: 2 type: type: string example: credit amount: type: number example: 1000.0 reference: type: string example: INV-12345 description: type: string example: 'Payment received' transaction_date: type: string example: '2025-09-19' created_at: type: string example: '2025-09-19T19:05:00Z' updated_at: type: string example: '2025-09-19T19:05:00Z' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: bank_account_id: type: integer description: 'Related bank account ID.' example: 2 nullable: false type: type: string description: 'Transaction type: credit or debit.' example: credit nullable: false amount: type: numeric description: 'Transaction amount. Minimum 0.' example: '1000.00' nullable: false reference: type: string description: 'Nullable Transaction reference or invoice ID.' example: consequatur nullable: true description: type: string description: 'Nullable Additional details about the transaction.' example: 'Dolores dolorum amet iste laborum eius est dolor.' nullable: true transaction_date: type: date description: 'Nullable Date of the transaction.' example: consequatur nullable: true required: - bank_account_id - type - amount security: [] '/api/transactions/{id}': get: summary: 'Display the specified transaction with bank account details.' operationId: displayTheSpecifiedTransactionWithBankAccountDetails description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 bank_account_id: 2 type: credit amount: 1000.0 reference: INV-12345 description: 'Payment received' transaction_date: '2025-09-19' created_at: '2025-09-19T19:00:00Z' updated_at: '2025-09-19T19:00:00Z' bankAccount: id: 2 bank_name: 'First Bank' account_number: '1234567890' properties: id: type: integer example: 1 bank_account_id: type: integer example: 2 type: type: string example: credit amount: type: number example: 1000.0 reference: type: string example: INV-12345 description: type: string example: 'Payment received' transaction_date: type: string example: '2025-09-19' created_at: type: string example: '2025-09-19T19:00:00Z' updated_at: type: string example: '2025-09-19T19:00:00Z' bankAccount: type: object properties: id: type: integer example: 2 bank_name: type: string example: 'First Bank' account_number: type: string example: '1234567890' tags: - Endpoints security: [] put: summary: 'Update the specified transaction inside a database transaction.' operationId: updateTheSpecifiedTransactionInsideADatabaseTransaction description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 10 bank_account_id: 2 type: debit amount: 500.0 reference: PAY-56789 description: 'Payment refund' transaction_date: '2025-09-20' created_at: '2025-09-19T19:05:00Z' updated_at: '2025-09-20T10:00:00Z' properties: id: type: integer example: 10 bank_account_id: type: integer example: 2 type: type: string example: debit amount: type: number example: 500.0 reference: type: string example: PAY-56789 description: type: string example: 'Payment refund' transaction_date: type: string example: '2025-09-20' created_at: type: string example: '2025-09-19T19:05:00Z' updated_at: type: string example: '2025-09-20T10:00:00Z' tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: bank_account_id: type: integer description: 'Nullable Updated bank account ID.' example: 17 nullable: false type: type: string description: 'Nullable Updated transaction type.' example: consequatur nullable: false amount: type: numeric description: 'Nullable Updated amount. Minimum 0.' example: consequatur nullable: false reference: type: string description: 'Nullable Updated reference.' example: consequatur nullable: true description: type: string description: 'Nullable Updated description.' example: 'Dolores dolorum amet iste laborum eius est dolor.' nullable: true transaction_date: type: date description: 'Nullable Updated transaction date.' example: consequatur nullable: true security: [] delete: summary: 'Delete the specified transaction.' operationId: deleteTheSpecifiedTransaction description: '' parameters: [] responses: 204: description: '' content: application/json: schema: type: object example: { } properties: { } tags: - Endpoints security: [] parameters: - in: path name: id description: 'The ID of the transaction.' example: 1 required: true schema: type: integer - in: path name: transaction description: 'The ID of the transaction.' example: 17 required: true schema: type: integer /api/paymentTobank: get: summary: 'Get payments made to banks' operationId: getPaymentsMadeToBanks description: "Retrieves all credit transactions linked to bank accounts.\nOptionally, you can filter results by the bank name." parameters: - in: query name: bank_name description: 'Optional. Filter payments by bank name.' example: 'First Bank' required: false schema: type: string description: 'Optional. Filter payments by bank name.' example: 'First Bank' nullable: false responses: 200: description: Success content: application/json: schema: type: array items: type: object example: - id: 1 bank_account_id: 1 amount: '1000.00' transaction_date: '2025-10-18' created_at: '2025-10-18T14:27:19.000000Z' bank_account: id: 1 bank_name: 'First Bank' tags: - Endpoints security: [] /api/notifications: get: summary: 'Display a listing of notifications for a given notifiable entity.' operationId: displayAListingOfNotificationsForAGivenNotifiableEntity description: "Accepts optional query parameters:\n- notifiable_type: The class/type of the notifiable entity.\n- notifiable_id: The ID of the notifiable entity." parameters: - in: query name: notifiable_type description: 'Optional class name of the notifiable entity.' example: App\Models\User required: false schema: type: string description: 'Optional class name of the notifiable entity.' example: App\Models\User nullable: false - in: query name: notifiable_id description: 'Optional ID of the notifiable entity.' example: 1 required: false schema: type: integer description: 'Optional ID of the notifiable entity.' example: 1 nullable: false responses: 200: description: '' content: text/plain: schema: type: string example: "[\n {\n \"id\": 5,\n \"type\": \"info\",\n \"title\": \"New Update Available\",\n \"message\": \"Version 2.0 is now live!\",\n \"is_read\": false,\n \"notifiable_type\": \"App\\Models\\User\",\n \"notifiable_id\": 1,\n \"created_at\": \"2025-09-19T09:18:00Z\",\n \"updated_at\": \"2025-09-19T09:18:00Z\"\n }\n]" tags: - Endpoints security: [] post: summary: 'Store a new notification.' operationId: storeANewNotification description: '' parameters: [] responses: 201: description: '' content: text/plain: schema: type: string example: "{\n \"id\": 5,\n \"type\": \"info\",\n \"title\": \"New Update Available\",\n \"message\": \"Version 2.0 is now live!\",\n \"is_read\": false,\n \"notifiable_type\": \"App\\Models\\User\",\n \"notifiable_id\": 1,\n \"created_at\": \"2025-09-19T09:18:00Z\",\n \"updated_at\": \"2025-09-19T09:18:00Z\"\n}" tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: type: type: string description: 'The notification type/category.' example: info nullable: false title: type: string description: 'Notification title.' example: 'New Update Available' nullable: false message: type: string description: 'Notification message content.' example: consequatur nullable: false is_read: type: boolean description: 'Whether the notification has been read. Defaults to false.' example: false nullable: false notifiable_type: type: string description: 'The class/type of the notifiable entity.' example: App\Models\User nullable: false notifiable_id: type: integer description: 'The ID of the notifiable entity.' example: 1 nullable: false required: - type - title - message - notifiable_type - notifiable_id security: [] '/api/notifications/{id}': get: summary: 'Display a specific notification.' operationId: displayASpecificNotification description: '' parameters: [] responses: 200: description: '' content: text/plain: schema: type: string example: "{\n \"id\": 5,\n \"type\": \"info\",\n \"title\": \"New Update Available\",\n \"message\": \"Version 2.0 is now live!\",\n \"is_read\": false,\n \"notifiable_type\": \"App\\Models\\User\",\n \"notifiable_id\": 1,\n \"created_at\": \"2025-09-19T09:18:00Z\",\n \"updated_at\": \"2025-09-19T09:18:00Z\"\n}" tags: - Endpoints security: [] put: summary: 'Update a notification.' operationId: updateANotification description: '' parameters: [] responses: 200: description: '' content: text/plain: schema: type: string example: "{\n \"id\": 5,\n \"type\": \"update\",\n \"title\": \"Update Released\",\n \"message\": \"Version 2.0 has been released.\",\n \"is_read\": true,\n \"notifiable_type\": \"App\\Models\\User\",\n \"notifiable_id\": 1,\n \"created_at\": \"2025-09-19T09:18:00Z\",\n \"updated_at\": \"2025-09-19T10:00:00Z\"\n}" tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: type: type: string description: 'Nullable Notification type/category.' example: consequatur nullable: false title: type: string description: 'Nullable Notification title.' example: consequatur nullable: false message: type: string description: 'Nullable Notification message.' example: consequatur nullable: false is_read: type: boolean description: 'Nullable Whether the notification has been read.' example: false nullable: false notifiable_type: type: string description: 'Nullable Class/type of the notifiable entity.' example: consequatur nullable: false notifiable_id: type: integer description: 'Nullable ID of the notifiable entity.' example: 17 nullable: false security: [] delete: summary: 'Delete a notification.' operationId: deleteANotification description: '' parameters: [] responses: 204: description: '' content: application/json: schema: type: object example: { } properties: { } tags: - Endpoints security: [] parameters: - in: path name: id description: 'The ID of the notification.' example: 17 required: true schema: type: integer - in: path name: notification description: 'The ID of the notification.' example: 17 required: true schema: type: integer '/api/customers/{customer_id}/deposit': post: summary: "Deposit amount to customer's balance." operationId: depositAmountToCustomersBalance description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: message: 'Deposit successful' customer: id: 1 balance: 3000.0 properties: message: type: string example: 'Deposit successful' customer: type: object properties: id: type: integer example: 1 balance: type: number example: 3000.0 tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: amount: type: numeric description: 'Amount to deposit. Minimum 1.' example: '2000' nullable: false description: type: string description: '' example: 'Dolores dolorum amet iste laborum eius est dolor.' nullable: true required: - amount security: [] parameters: - in: path name: customer_id description: 'The ID of the customer.' example: 1 required: true schema: type: integer - in: path name: customer description: 'The ID of the customer.' example: 17 required: true schema: type: integer '/api/customers/{id}/deposits': get: summary: 'Get a list of all deposits made by a specific customer.' operationId: getAListOfAllDepositsMadeByASpecificCustomer description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: array items: type: object example: - id: 1 customer_id: 1 amount: 2000.0 created_at: '2025-09-17T12:00:00Z' 404: description: '' content: application/json: schema: type: object example: message: 'Customer not found' properties: message: type: string example: 'Customer not found' tags: - Endpoints security: [] parameters: - in: path name: id description: 'The ID of the customer.' example: 17 required: true schema: type: integer /api/payments: get: summary: 'List all payments' operationId: listAllPayments description: '' parameters: [] responses: 200: description: Success content: application/json: schema: type: array items: type: object example: - id: 1 amount: 25000 date: '2025-10-17' payment_purpose: 'Office Rent' person_company_name: 'ABC Ltd' posted_by: Admin location: Lagos note: 'Paid by transfer' tags: - Endpoints security: [] post: summary: 'Create a new payment' operationId: createANewPayment description: '' parameters: [] responses: 201: description: Created content: application/json: schema: type: object example: id: 1 amount: 25000 payment_purpose: 'Office Rent' date: '2025-10-17' properties: id: type: integer example: 1 amount: type: integer example: 25000 payment_purpose: type: string example: 'Office Rent' date: type: string example: '2025-10-17' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: amount: type: numeric description: 'The payment amount.' example: consequatur nullable: false date: type: date description: 'The payment date.' example: consequatur nullable: false payment_purpose: type: string description: 'The reason for the payment.' example: consequatur nullable: false person_company_name: type: string description: 'The person or company paid to.' example: consequatur nullable: false posted_by: type: string description: 'The name of the poster.' example: consequatur nullable: false location: type: string description: 'The location where payment was made.' example: consequatur nullable: false note: type: string description: 'optional Additional notes.' example: consequatur nullable: true required: - amount - date - payment_purpose - person_company_name - posted_by - location security: [] '/api/payments/{id}': get: summary: 'Show a specific payment' operationId: showASpecificPayment description: '' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. 404: description: 'Not Found' content: application/json: schema: type: object example: message: 'Payment not found' properties: message: type: string example: 'Payment not found' tags: - Endpoints security: [] put: summary: 'Update an existing payment' operationId: updateAnExistingPayment description: '' parameters: [] responses: 404: description: 'Not Found' content: application/json: schema: type: object example: message: 'Payment not found' properties: message: type: string example: 'Payment not found' tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: amount: type: numeric description: 'optional The payment amount.' example: consequatur nullable: false date: type: date description: 'optional The payment date.' example: consequatur nullable: false payment_purpose: type: string description: 'optional The reason for the payment.' example: consequatur nullable: false person_company_name: type: string description: 'optional The person or company paid to.' example: consequatur nullable: false location: type: string description: 'optional The location of the payment.' example: consequatur nullable: false note: type: string description: 'optional Additional notes.' example: consequatur nullable: true security: [] delete: summary: 'Delete a payment' operationId: deleteAPayment description: '' parameters: [] responses: 200: description: Deleted content: application/json: schema: type: object example: message: 'Payment deleted successfully' properties: message: type: string example: 'Payment deleted successfully' 404: description: 'Not Found' content: application/json: schema: type: object example: message: 'Payment not found' properties: message: type: string example: 'Payment not found' tags: - Endpoints security: [] parameters: - in: path name: id description: 'The ID of the payment.' example: 17 required: true schema: type: integer /api/expenses: get: summary: 'List all expenses' operationId: listAllExpenses description: '' parameters: [] responses: 200: description: Success content: application/json: schema: type: object example: id: 1 description: 'Fuel purchase' category: Transport amount: 5000 date: '2025-10-17' time: '14:00' posted_by: Admin location: Lagos properties: id: type: integer example: 1 description: type: string example: 'Fuel purchase' category: type: string example: Transport amount: type: integer example: 5000 date: type: string example: '2025-10-17' time: type: string example: '14:00' posted_by: type: string example: Admin location: type: string example: Lagos tags: - Endpoints security: [] post: summary: 'Create a new expense' operationId: createANewExpense description: '' parameters: [] responses: 201: description: Created content: application/json: schema: type: object example: id: 1 description: 'Fuel purchase' amount: 5000 properties: id: type: integer example: 1 description: type: string example: 'Fuel purchase' amount: type: integer example: 5000 tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: description: type: string description: 'The expense description.' example: 'Dolores dolorum amet iste laborum eius est dolor.' nullable: false category: type: string description: 'The expense category.' example: consequatur nullable: false amount: type: numeric description: 'The amount spent.' example: consequatur nullable: false date: type: date description: 'The date of expense.' example: consequatur nullable: false time: type: string description: 'The time in HH:mm format.' example: consequatur nullable: false posted_by: type: string description: 'The name of the poster.' example: consequatur nullable: false location: type: string description: 'The expense location.' example: consequatur nullable: false required: - description - category - amount - date - time - posted_by - location security: [] '/api/expenses/{id}': get: summary: 'Show a specific expense' operationId: showASpecificExpense description: '' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. 404: description: 'Not Found' content: application/json: schema: type: object example: message: 'Expense not found' properties: message: type: string example: 'Expense not found' tags: - Endpoints security: [] put: summary: 'Update an existing expense' operationId: updateAnExistingExpense description: '' parameters: [] responses: 404: description: 'Not Found' content: application/json: schema: type: object example: message: 'Expense not found' properties: message: type: string example: 'Expense not found' tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: description: type: string description: 'optional The expense description.' example: 'Dolores dolorum amet iste laborum eius est dolor.' nullable: false category: type: string description: 'optional The expense category.' example: consequatur nullable: false amount: type: numeric description: 'optional The amount spent.' example: consequatur nullable: false date: type: date description: 'optional The date of expense.' example: consequatur nullable: false time: type: string description: 'optional The time in HH:mm format.' example: consequatur nullable: false posted_by: type: string description: 'optional The name of the poster.' example: consequatur nullable: false location: type: string description: 'optional The expense location.' example: consequatur nullable: false security: [] delete: summary: 'Delete an expense' operationId: deleteAnExpense description: '' parameters: [] responses: 200: description: Deleted content: application/json: schema: type: object example: message: 'Deleted successfully' properties: message: type: string example: 'Deleted successfully' 404: description: 'Not Found' content: application/json: schema: type: object example: message: 'Expense not found' properties: message: type: string example: 'Expense not found' tags: - Endpoints security: [] parameters: - in: path name: id description: 'The ID of the expense.' example: 17 required: true schema: type: integer /api/paymentAnalysis: get: summary: 'Get payment analysis' operationId: getPaymentAnalysis description: 'Returns a payment analysis of purchased orders.' parameters: [] responses: 200: description: Success content: application/json: schema: type: object example: payment_analysis: - id: 1 supplier_id: 1 order_number: PO-12345 status: pending payment_method: cash total_amount: '1000.00' order_date: '2025-09-20' expected_date: '2025-09-30' notes: consequatur created_at: '2025-10-19T10:17:01.000000Z' updated_at: '2025-10-19T10:17:01.000000Z' supplier: id: 1 name: 'Supplier A' email: contact@example.com phone: 123-456-7890 address: consequatur description: 'Dolores dolorum amet iste laborum eius est dolor.' created_at: '2025-10-19T10:16:27.000000Z' updated_at: '2025-10-19T10:16:27.000000Z' properties: payment_analysis: type: array example: - id: 1 supplier_id: 1 order_number: PO-12345 status: pending payment_method: cash total_amount: '1000.00' order_date: '2025-09-20' expected_date: '2025-09-30' notes: consequatur created_at: '2025-10-19T10:17:01.000000Z' updated_at: '2025-10-19T10:17:01.000000Z' supplier: id: 1 name: 'Supplier A' email: contact@example.com phone: 123-456-7890 address: consequatur description: 'Dolores dolorum amet iste laborum eius est dolor.' created_at: '2025-10-19T10:16:27.000000Z' updated_at: '2025-10-19T10:16:27.000000Z' items: type: object properties: id: type: integer example: 1 supplier_id: type: integer example: 1 order_number: type: string example: PO-12345 status: type: string example: pending payment_method: type: string example: cash total_amount: type: string example: '1000.00' order_date: type: string example: '2025-09-20' expected_date: type: string example: '2025-09-30' notes: type: string example: consequatur created_at: type: string example: '2025-10-19T10:17:01.000000Z' updated_at: type: string example: '2025-10-19T10:17:01.000000Z' supplier: type: object properties: id: type: integer example: 1 name: type: string example: 'Supplier A' email: type: string example: contact@example.com phone: type: string example: 123-456-7890 address: type: string example: consequatur description: type: string example: 'Dolores dolorum amet iste laborum eius est dolor.' created_at: type: string example: '2025-10-19T10:16:27.000000Z' updated_at: type: string example: '2025-10-19T10:16:27.000000Z' tags: - Endpoints security: [] /api/bank-accounts: get: summary: 'Display a listing of all bank accounts.' operationId: displayAListingOfAllBankAccounts description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: array items: type: object example: - id: 1 bank_name: 'First Bank' account_number: '1234567890' account_name: 'Business Account' branch: 'Main Branch' account_type: Savings balance: 15000.0 description: 'Primary business account' created_at: '2025-09-17T12:00:00Z' updated_at: '2025-09-17T12:00:00Z' tags: - Endpoints security: [] post: summary: 'Store a new bank account.' operationId: storeANewBankAccount description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: id: 1 bank_name: 'First Bank' account_number: '1234567890' account_name: 'Business Account' branch: 'Main Branch' account_type: Savings balance: 15000.0 description: 'Primary business account' created_at: '2025-09-17T12:00:00Z' updated_at: '2025-09-17T12:00:00Z' properties: id: type: integer example: 1 bank_name: type: string example: 'First Bank' account_number: type: string example: '1234567890' account_name: type: string example: 'Business Account' branch: type: string example: 'Main Branch' account_type: type: string example: Savings balance: type: number example: 15000.0 description: type: string example: 'Primary business account' created_at: type: string example: '2025-09-17T12:00:00Z' updated_at: type: string example: '2025-09-17T12:00:00Z' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: bank_name: type: string description: 'Name of the bank.' example: 'First Bank' nullable: false account_number: type: string description: 'Unique account number.' example: '1234567890' nullable: false account_name: type: string description: 'Account owner or designation.' example: 'Business Account' nullable: false branch: type: string description: 'Nullable bank branch.' example: 'Main Branch' nullable: true account_type: type: string description: 'Nullable account type.' example: Savings nullable: true balance: type: numeric description: 'Nullable starting balance.' example: '15000.00' nullable: true description: type: string description: 'Nullable description or notes.' example: 'Dolores dolorum amet iste laborum eius est dolor.' nullable: true required: - bank_name - account_number - account_name security: [] '/api/bank-accounts/{id}': get: summary: 'Show details of a specific bank account.' operationId: showDetailsOfASpecificBankAccount description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 bank_name: 'First Bank' account_number: '1234567890' account_name: 'Business Account' branch: 'Main Branch' account_type: Savings balance: 15000.0 description: 'Primary business account' created_at: '2025-09-17T12:00:00Z' updated_at: '2025-09-17T12:00:00Z' properties: id: type: integer example: 1 bank_name: type: string example: 'First Bank' account_number: type: string example: '1234567890' account_name: type: string example: 'Business Account' branch: type: string example: 'Main Branch' account_type: type: string example: Savings balance: type: number example: 15000.0 description: type: string example: 'Primary business account' created_at: type: string example: '2025-09-17T12:00:00Z' updated_at: type: string example: '2025-09-17T12:00:00Z' tags: - Endpoints security: [] put: summary: 'Update an existing bank account.' operationId: updateAnExistingBankAccount description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 bank_name: 'First Bank Updated' account_number: '1234567890' account_name: 'Business Account Updated' branch: 'Main Branch' account_type: Checking balance: 12000.0 description: 'Updated description' created_at: '2025-09-17T12:00:00Z' updated_at: '2025-09-17T13:00:00Z' properties: id: type: integer example: 1 bank_name: type: string example: 'First Bank Updated' account_number: type: string example: '1234567890' account_name: type: string example: 'Business Account Updated' branch: type: string example: 'Main Branch' account_type: type: string example: Checking balance: type: number example: 12000.0 description: type: string example: 'Updated description' created_at: type: string example: '2025-09-17T12:00:00Z' updated_at: type: string example: '2025-09-17T13:00:00Z' tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: bank_name: type: string description: 'Optional name of the bank.' example: consequatur nullable: false account_number: type: string description: 'Optional unique account number.' example: consequatur nullable: false account_name: type: string description: 'Optional account owner or designation.' example: consequatur nullable: false branch: type: string description: 'Nullable bank branch.' example: consequatur nullable: true account_type: type: string description: 'Nullable account type.' example: consequatur nullable: true balance: type: numeric description: 'Nullable current balance.' example: consequatur nullable: true description: type: string description: 'Nullable description or notes.' example: 'Dolores dolorum amet iste laborum eius est dolor.' nullable: true security: [] delete: summary: 'Delete a bank account.' operationId: deleteABankAccount description: '' parameters: [] responses: 204: description: '' content: application/json: schema: type: object example: { } properties: { } tags: - Endpoints security: [] parameters: - in: path name: id description: 'The ID of the bank account.' example: 1 required: true schema: type: integer - in: path name: bankAccount description: 'The ID of the bank account.' example: 17 required: true schema: type: integer