{"info":{"_postman_id":"cf25d51d-8835-4a61-857f-b88b7126f707","name":"paySphere","description":"<html><head></head><body><h1 id=\"paysphere-api\">paySphere API</h1>\n<p>The <strong>paySphere</strong> collection provides a complete set of endpoints for managing a cloud-based payroll and employee management system. It enables organizations to authenticate users, manage employee records, and process payroll operations through a unified REST API.</p>\n<p><strong>Base URL:</strong> <code>https://paysphere-p0nt.onrender.com</code></p>\n<h2 id=\"purpose\">Purpose</h2>\n<p>This collection is organized to support the core workflows of a payroll platform — from onboarding users and managing employee data to finalizing payroll runs and retrieving summary reports. It is intended for developers integrating with the paySphere backend or testing its API behavior.</p>\n<h2 id=\"structure\">Structure</h2>\n<p>The collection is divided into three functional areas:</p>\n<h3 id=\"1-authentication--user-management\">1. Authentication &amp; User Management</h3>\n<p>Handles user onboarding, session management, and account settings.</p>\n<ul>\n<li><strong>User SignUp</strong> — Register a new user account.</li>\n<li><strong>User Login</strong> — Authenticate and obtain a JWT access token.</li>\n<li><strong>Get Settings</strong> — Retrieve the authenticated user's account settings.</li>\n<li><strong>Update Settings</strong> — Modify user account preferences.</li>\n</ul>\n<h3 id=\"2-employee-management\">2. Employee Management</h3>\n<p>Endpoints for creating and retrieving employee records.</p>\n<ul>\n<li><strong>Add Employee</strong> — Create a new employee entry.</li>\n<li><strong>Get Employees</strong> — Fetch the full list of employees.</li>\n<li><strong>Get Recent Employees</strong> — Retrieve recently added or updated employees.</li>\n</ul>\n<h3 id=\"3-payroll-processing\">3. Payroll Processing</h3>\n<p>Endpoints for executing and reviewing payroll operations.</p>\n<ul>\n<li><strong>Finalize Payroll</strong> — Finalize payroll for the current cycle.</li>\n<li><strong>Get Payroll Summary</strong> — Retrieve an aggregated payroll summary for the organization.</li>\n</ul>\n<h2 id=\"authentication\">Authentication</h2>\n<p>Most endpoints require a <strong>Bearer JWT token</strong> in the <code>Authorization</code> header, obtained via the <strong>User Login</strong> endpoint.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Bearer &lt;JWT_TOKEN&gt;\n</code></pre><h2 id=\"getting-started\">Getting Started</h2>\n<ol>\n<li>Use <strong>User SignUp</strong> to create an account, or <strong>User Login</strong> to authenticate an existing one.</li>\n<li>Copy the returned JWT token and set it as the collection's auth token.</li>\n<li>Use the Employee Management and Payroll Processing endpoints to manage records and run payroll workflows.</li>\n</ol>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"paySphere API","slug":"paysphere-api"}],"owner":"50839751","collectionId":"cf25d51d-8835-4a61-857f-b88b7126f707","publishedId":"2sBXqKofJr","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-05-02T15:44:35.000Z"},"item":[{"name":"Authentication & User Management","item":[{"name":"User SignUp","id":"49ae4301-037d-42aa-8ab1-45e678f85a06","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"fullName\": \"Jane Doe\",\r\n  \"email\": \"jane@example.com\",\r\n  \"companyName\": \"TechCorp Solutions\",\r\n  \"password\": \"securepassword123\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"https://paysphere-p0nt.onrender.com/api/auth/signup","description":"<h1 id=\"signup\">Signup</h1>\n<p>Register a new user account in paySphere.</p>\n<p><strong>Method:</strong> <code>POST</code></p>\n<p><strong>Endpoint:</strong> <code>/api/auth/signup</code></p>\n<p><strong>Base URL:</strong> <code>https://paysphere-p0nt.onrender.com</code></p>\n<h2 id=\"description\">Description</h2>\n<p>This endpoint creates a new user account with the provided details. On success, it returns an authentication token (JWT) that can be used for subsequent authenticated requests, along with the registered company name.</p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>No authentication required. This is a public endpoint used to onboard new users.</p>\n<h2 id=\"request-headers\">Request Headers</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Required</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Content-Type</td>\n<td>application/json</td>\n<td>Yes</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"request-body\">Request Body</h2>\n<p>The request body must be a JSON object with the following fields:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>fullName</td>\n<td>string</td>\n<td>Yes</td>\n<td>Full name of the user signing up.</td>\n</tr>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>Yes</td>\n<td>Valid email address. Must be unique across users.</td>\n</tr>\n<tr>\n<td>companyName</td>\n<td>string</td>\n<td>Yes</td>\n<td>Name of the company associated with the user.</td>\n</tr>\n<tr>\n<td>password</td>\n<td>string</td>\n<td>Yes</td>\n<td>Account password. Should be at least 8 characters long.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-request-body\">Example Request Body</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"fullName\": \"Jane Doe\",\n  \"email\": \"jane@example.com\",\n  \"companyName\": \"TechCorp Solutions\",\n  \"password\": \"securepassword123\"\n}\n</code></pre>\n<h2 id=\"response\">Response</h2>\n<h3 id=\"201-created\">201 Created</h3>\n<p>Returned when the user is successfully registered.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"token\": \"&lt;JWT token&gt;\",\n  \"companyName\": \"TechCorp Solutions\"\n}\n</code></pre>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>JWT token to be used for authenticating subsequent requests. Include it as a Bearer token in the <code>Authorization</code> header.</td>\n</tr>\n<tr>\n<td>companyName</td>\n<td>string</td>\n<td>The company name registered with the account.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"common-error-responses\">Common Error Responses</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>400</td>\n<td>Missing or invalid fields in the request body.</td>\n</tr>\n<tr>\n<td>409</td>\n<td>A user with the provided email already exists.</td>\n</tr>\n<tr>\n<td>500</td>\n<td>Unexpected server error.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"notes\">Notes</h2>\n<ul>\n<li>Store the returned <code>token</code> securely on the client side.</li>\n<li>The token is typically used in the <code>Authorization: Bearer &lt;token&gt;</code> header for protected endpoints.</li>\n</ul>\n","urlObject":{"protocol":"https","path":["api","auth","signup"],"host":["paysphere-p0nt","onrender","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"49ae4301-037d-42aa-8ab1-45e678f85a06"},{"name":"User Login","id":"bc8ccf7f-e308-48ef-ae4d-499f96b6702f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"email\": \"jane@example.com\",\r\n  \"password\": \"securepassword123\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"https://paysphere-p0nt.onrender.com/api/auth/login","description":"<h1 id=\"login\">Login</h1>\n<p>Authenticate an existing paySphere user and obtain a JSON Web Token (JWT) for accessing protected endpoints.</p>\n<p><strong>Method:</strong> <code>POST</code></p>\n<p><strong>Endpoint:</strong> <code>/api/auth/login</code></p>\n<p><strong>Base URL:</strong> <code>https://paysphere-p0nt.onrender.com</code></p>\n<h2 id=\"description\">Description</h2>\n<p>This endpoint verifies the user's credentials (email and password) against the paySphere user store. On successful authentication, it returns a signed JWT that must be included in the <code>Authorization</code> header of subsequent requests to access protected resources.</p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>No authentication required. This is a public endpoint used to issue tokens to registered users.</p>\n<h2 id=\"request\">Request</h2>\n<h3 id=\"headers\">Headers</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Content-Type</td>\n<td>application/json</td>\n<td>Indicates the request body is JSON.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"body-json\">Body (JSON)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>Yes</td>\n<td>The email address the user registered with.</td>\n</tr>\n<tr>\n<td>password</td>\n<td>string</td>\n<td>Yes</td>\n<td>The user's account password.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"example-request-body\">Example Request Body</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"email\": \"user@example.com\",\n  \"password\": \"yourSecurePassword\"\n}\n\n</code></pre>\n<h2 id=\"response\">Response</h2>\n<h3 id=\"200-ok--successful-login\">200 OK — Successful Login</h3>\n<p>Returns a JWT token that can be used for authenticated requests.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n  \"companyName\": \"Acme Corp\"\n}\n\n</code></pre>\n<h3 id=\"400-bad-request\">400 Bad Request</h3>\n<p>Returned when required fields are missing or malformed.</p>\n<h3 id=\"401-unauthorized\">401 Unauthorized</h3>\n<p>Returned when the credentials are invalid (incorrect email or password).</p>\n<h2 id=\"usage-notes\">Usage Notes</h2>\n<ul>\n<li><p>Store the returned <code>token</code> securely on the client (for example, in an HTTP-only cookie or secure storage).</p>\n</li>\n<li><p>Include the token in subsequent requests using the <code>Authorization: Bearer</code> header.</p>\n</li>\n<li><p>Tokens may expire — re-authenticate via this endpoint when a 401 response is received from protected endpoints.</p>\n</li>\n</ul>\n","urlObject":{"protocol":"https","path":["api","auth","login"],"host":["paysphere-p0nt","onrender","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"bc8ccf7f-e308-48ef-ae4d-499f96b6702f"},{"name":"Get Settings","id":"6f915eb9-2b59-445f-9816-62a33d9879f5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY5ZjRlMzM2NGVlNmU3NzYxYTQ4YmYwZiIsImlhdCI6MTc3NzY1NjgxNiwiZXhwIjoxNzc4MjYxNjE2fQ.fvl07dXlBFoaf-M6kwr-vpB0rROS19hu8WriAWbWTLY","type":"text"}],"url":"https://paysphere-p0nt.onrender.com/api/auth/settings","description":"<h1 id=\"get-settings\">Get Settings</h1>\n<p>Retrieves the authenticated user's account settings from the paySphere service.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>GET https://paysphere-p0nt.onrender.com/api/auth/settings</code></p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>This endpoint requires a valid JWT bearer token to be sent in the <code>Authorization</code> header.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Required</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>Authorization</code></td>\n<td><code>Bearer &lt;JWT_TOKEN&gt;</code></td>\n<td>Yes</td>\n</tr>\n</tbody>\n</table>\n</div><p>The token is typically obtained from the <strong>User Login</strong> endpoint and must not be expired.</p>\n<h2 id=\"request\">Request</h2>\n<ul>\n<li><strong>Method:</strong> GET</li>\n<li><strong>Path:</strong> <code>/api/auth/settings</code></li>\n<li><strong>Query Parameters:</strong> None</li>\n<li><strong>Body:</strong> None</li>\n</ul>\n<h2 id=\"response\">Response</h2>\n<p>On success, the endpoint returns the user's settings associated with the authenticated account.</p>\n<h3 id=\"example-success-response-200-ok\">Example success response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"success\": true,\n  \"settings\": {\n    \"userId\": \"69f4e3364ee6e77761a48bf0f\",\n    \"notifications\": true,\n    \"currency\": \"USD\",\n    \"language\": \"en\"\n  }\n}\n</code></pre>\n<h3 id=\"common-errors\">Common errors</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status</th>\n<th>Meaning</th>\n<th>Likely Cause</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>401 Unauthorized</td>\n<td>Missing or invalid token</td>\n<td>Token not sent, malformed, or expired</td>\n</tr>\n<tr>\n<td>403 Forbidden</td>\n<td>Token valid but lacks permission</td>\n<td>User does not have access to settings</td>\n</tr>\n<tr>\n<td>500 Internal Server Error</td>\n<td>Server-side failure</td>\n<td>Temporary issue on the paySphere backend</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"notes\">Notes</h2>\n<ul>\n<li>Tokens expire after a fixed time window. If you receive a 401, re-authenticate via the Login endpoint and retry.</li>\n<li>Do not commit real bearer tokens to version control or share them outside the team.</li>\n</ul>\n","urlObject":{"protocol":"https","path":["api","auth","settings"],"host":["paysphere-p0nt","onrender","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"6f915eb9-2b59-445f-9816-62a33d9879f5"},{"name":"Update Settings","id":"ddf9340c-b96c-4056-98b5-6bddbae18b0e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY5ZjRlMzM2NGVlNmU3NzYxYTQ4YmYwZiIsImlhdCI6MTc3NzY1NjgxNiwiZXhwIjoxNzc4MjYxNjE2fQ.fvl07dXlBFoaf-M6kwr-vpB0rROS19hu8WriAWbWTLY","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"defaultOvertimeRate\": 500,\r\n  \"defaultDailyRate\": 1200\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"https://paysphere-p0nt.onrender.com/api/auth/settings","description":"<h2 id=\"update-settings\">Update Settings</h2>\n<p>Allows an authenticated user to update their account and profile settings in <strong>paySphere</strong>. Use this endpoint to change personal information, notification preferences, and app-level preferences such as language, currency, and theme.</p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>This endpoint requires a valid authentication token. Include a Bearer token in the <code>Authorization</code> header:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Bearer &lt;your_access_token&gt;\n</code></pre><p>Requests without a valid token will be rejected with a <code>401 Unauthorized</code> response.</p>\n<h2 id=\"request\">Request</h2>\n<h3 id=\"headers\">Headers</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Required</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>Authorization</code></td>\n<td><code>Bearer &lt;token&gt;</code></td>\n<td>Yes</td>\n</tr>\n<tr>\n<td><code>Content-Type</code></td>\n<td><code>application/json</code></td>\n<td>Yes</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"body\">Body</h3>\n<p>Send a JSON payload containing the fields you want to update. All fields are optional — only include the ones you wish to change.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>displayName</code></td>\n<td>string</td>\n<td>The user's display name shown across paySphere.</td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>string</td>\n<td>Primary email address used for login and notifications.</td>\n</tr>\n<tr>\n<td><code>phoneNumber</code></td>\n<td>string</td>\n<td>Contact phone number in E.164 format (e.g. <code>+14155552671</code>).</td>\n</tr>\n<tr>\n<td><code>notificationPreferences</code></td>\n<td>object</td>\n<td>Toggle channels such as <code>email</code>, <code>sms</code>, and <code>push</code>.</td>\n</tr>\n<tr>\n<td><code>language</code></td>\n<td>string</td>\n<td>Preferred UI language code (e.g. <code>en</code>, <code>es</code>, <code>fr</code>).</td>\n</tr>\n<tr>\n<td><code>currency</code></td>\n<td>string</td>\n<td>Default currency code (e.g. <code>USD</code>, <code>EUR</code>, <code>INR</code>).</td>\n</tr>\n<tr>\n<td><code>theme</code></td>\n<td>string</td>\n<td>UI theme preference (<code>light</code>, <code>dark</code>, or <code>system</code>).</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n<p>Note: The exact set of updatable fields may vary; the list above is illustrative of typical paySphere settings.</p>\n</blockquote>\n<h2 id=\"response\">Response</h2>\n<h3 id=\"success--200-ok\">Success — <code>200 OK</code></h3>\n<p>Returns the updated settings object.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"success\": true,\n  \"data\": {\n    \"userId\": \"usr_123456\",\n    \"displayName\": \"Dev Patel\",\n    \"email\": \"dev@example.com\",\n    \"phoneNumber\": \"+14155552671\",\n    \"notificationPreferences\": {\n      \"email\": true,\n      \"sms\": false,\n      \"push\": true\n    },\n    \"language\": \"en\",\n    \"currency\": \"USD\",\n    \"theme\": \"dark\",\n    \"updatedAt\": \"2025-01-15T10:30:00Z\"\n  }\n}\n</code></pre>\n<h3 id=\"error-responses\">Error Responses</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status</th>\n<th>Meaning</th>\n<th>Example Cause</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>400 Bad Request</code></td>\n<td>Validation error</td>\n<td>Invalid email format or unsupported currency code.</td>\n</tr>\n<tr>\n<td><code>401 Unauthorized</code></td>\n<td>Missing or invalid token</td>\n<td>Expired or missing Bearer token.</td>\n</tr>\n<tr>\n<td><code>404 Not Found</code></td>\n<td>User not found</td>\n<td>The authenticated user no longer exists.</td>\n</tr>\n<tr>\n<td><code>500 Internal Server Error</code></td>\n<td>Unexpected server error</td>\n<td>Temporary backend issue; retry later.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"example\">Example</h2>\n<h3 id=\"request-1\">Request</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location --request PATCH 'https://api.paysphere.com/v1/settings' \\\n  --header 'Authorization: Bearer &lt;your_access_token&gt;' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n    \"displayName\": \"Dev Patel\",\n    \"language\": \"en\",\n    \"currency\": \"USD\",\n    \"theme\": \"dark\",\n    \"notificationPreferences\": {\n      \"email\": true,\n      \"sms\": false,\n      \"push\": true\n    }\n  }'\n</code></pre>\n<h3 id=\"response-1\">Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"success\": true,\n  \"message\": \"Settings updated successfully.\"\n}\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","auth","settings"],"host":["paysphere-p0nt","onrender","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"ddf9340c-b96c-4056-98b5-6bddbae18b0e"}],"id":"a8a2a446-aa19-4fc5-b6f2-cbac3e40f9c9","description":"<p>Endpoints that handle user onboarding, authentication, and account preferences for the paySphere platform. This folder covers user signup and login flows (issuing JWT tokens for downstream API access), as well as retrieving and updating user-level settings. Use these requests to establish an authenticated session before calling employee or payroll endpoints.</p>\n<p><strong>Included requests:</strong></p>\n<ul>\n<li><code>POST /api/auth/signup</code> — User SignUp</li>\n<li><code>POST /api/auth/login</code> — User Login</li>\n<li><code>GET /api/auth/settings</code> — Get Settings</li>\n<li><code>PUT /api/auth/settings</code> — Update Settings</li>\n</ul>\n","_postman_id":"a8a2a446-aa19-4fc5-b6f2-cbac3e40f9c9"},{"name":"Employee Management","item":[{"name":"Add Employee","id":"98294fb6-ed23-41ff-a1f7-1156b9c8c550","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY5ZjRlMzM2NGVlNmU3NzYxYTQ4YmYwZiIsImlhdCI6MTc3NzY1NjgxNiwiZXhwIjoxNzc4MjYxNjE2fQ.fvl07dXlBFoaf-M6kwr-vpB0rROS19hu8WriAWbWTLY","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"fullName\": \"Robert Smith\",\r\n  \"role\": \"Software Engineer\",\r\n  \"monthlySalary\": 45000,\r\n  \"overtimeRate\": 650\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"https://paysphere-p0nt.onrender.com/api/employees/","description":"<h1 id=\"add-employee\">Add Employee</h1>\n<p>Creates a new employee record in the paySphere system under the authenticated user's company.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>POST https://paysphere-p0nt.onrender.com/api/employees/</code></p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>This endpoint requires a valid Bearer token (JWT) in the <code>Authorization</code> header.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Bearer &lt;your_jwt_token&gt;\n</code></pre><h2 id=\"request-body\">Request Body</h2>\n<p>Send a JSON payload with the following fields:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>fullName</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>Full name of the employee.</td>\n</tr>\n<tr>\n<td><code>role</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>Job title or role of the employee.</td>\n</tr>\n<tr>\n<td><code>monthlySalary</code></td>\n<td>number</td>\n<td>Yes</td>\n<td>Base monthly salary of the employee.</td>\n</tr>\n<tr>\n<td><code>overtimeRate</code></td>\n<td>number</td>\n<td>Yes</td>\n<td>Hourly overtime rate for the employee.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-request-body\">Example Request Body</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"fullName\": \"Robert Smith\",\n  \"role\": \"Software Engineer\",\n  \"monthlySalary\": 45000,\n  \"overtimeRate\": 650\n}\n</code></pre>\n<h2 id=\"response\">Response</h2>\n<h3 id=\"201-created\">201 Created</h3>\n<p>The employee was successfully created. Returns a confirmation message along with the created employee object.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Employee added successfully\",\n  \"employee\": {\n    \"fullName\": \"Robert Smith\",\n    \"role\": \"Software Engineer\",\n    \"monthlySalary\": 45000,\n    \"overtimeRate\": 650,\n    \"companyName\": \"TechCorp Solutions\",\n    \"createdBy\": \"69f4e3364ee6e7761a48bf0f\",\n    \"_id\": \"69f5bd8fec6bd868cdb19c9d\",\n    \"createdAt\": \"2026-05-02T09:02:07.262Z\",\n    \"updatedAt\": \"2026-05-02T09:02:07.262Z\",\n    \"__v\": 0\n  }\n}\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>message</code></td>\n<td>string</td>\n<td>Human-readable status message.</td>\n</tr>\n<tr>\n<td><code>employee.fullName</code></td>\n<td>string</td>\n<td>Full name of the created employee.</td>\n</tr>\n<tr>\n<td><code>employee.role</code></td>\n<td>string</td>\n<td>Role assigned to the employee.</td>\n</tr>\n<tr>\n<td><code>employee.monthlySalary</code></td>\n<td>number</td>\n<td>Monthly salary of the employee.</td>\n</tr>\n<tr>\n<td><code>employee.overtimeRate</code></td>\n<td>number</td>\n<td>Overtime rate of the employee.</td>\n</tr>\n<tr>\n<td><code>employee.companyName</code></td>\n<td>string</td>\n<td>Company the employee belongs to (derived from the authenticated user).</td>\n</tr>\n<tr>\n<td><code>employee.createdBy</code></td>\n<td>string</td>\n<td>ID of the user who created this record.</td>\n</tr>\n<tr>\n<td><code>employee._id</code></td>\n<td>string</td>\n<td>Unique identifier of the employee record.</td>\n</tr>\n<tr>\n<td><code>employee.createdAt</code></td>\n<td>string (ISO 8601)</td>\n<td>Timestamp when the employee was created.</td>\n</tr>\n<tr>\n<td><code>employee.updatedAt</code></td>\n<td>string (ISO 8601)</td>\n<td>Timestamp when the employee was last updated.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"possible-error-responses\">Possible Error Responses</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>400 Bad Request</code></td>\n<td>Missing or invalid fields in the request body.</td>\n</tr>\n<tr>\n<td><code>401 Unauthorized</code></td>\n<td>Missing, invalid, or expired JWT token.</td>\n</tr>\n<tr>\n<td><code>500 Internal Server Error</code></td>\n<td>Unexpected server-side error while creating the employee.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"notes\">Notes</h2>\n<ul>\n<li><code>companyName</code> and <code>createdBy</code> are automatically populated from the authenticated user's token; they should not be sent in the request body.</li>\n<li>Ensure the JWT token is fresh; expired tokens will result in a 401 response.</li>\n</ul>\n","urlObject":{"protocol":"https","path":["api","employees",""],"host":["paysphere-p0nt","onrender","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"98294fb6-ed23-41ff-a1f7-1156b9c8c550"},{"name":"Get Employees","id":"127dcf90-1804-4c23-9aa6-7e87ff546a21","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY5ZjRlMzM2NGVlNmU3NzYxYTQ4YmYwZiIsImlhdCI6MTc3NzY1NjgxNiwiZXhwIjoxNzc4MjYxNjE2fQ.fvl07dXlBFoaf-M6kwr-vpB0rROS19hu8WriAWbWTLY","type":"text"}],"url":"https://paysphere-p0nt.onrender.com/api/employees/","description":"<h1 id=\"get-employees\">Get Employees</h1>\n<p>Retrieves a list of all employees associated with the authenticated user's account in the paySphere system.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>GET https://paysphere-p0nt.onrender.com/api/employees/</code></p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>This endpoint requires a Bearer token (JWT) in the <code>Authorization</code> header.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Required</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>Authorization</code></td>\n<td><code>Bearer &lt;JWT_TOKEN&gt;</code></td>\n<td>Yes</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"request\">Request</h2>\n<ul>\n<li><strong>Method:</strong> <code>GET</code></li>\n<li><strong>Path Parameters:</strong> None</li>\n<li><strong>Query Parameters:</strong> None</li>\n<li><strong>Body:</strong> None</li>\n</ul>\n<h2 id=\"response\">Response</h2>\n<h3 id=\"200-ok\">200 OK</h3>\n<p>Returns a JSON object containing an <code>employees</code> array. Each employee object includes:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>_id</code></td>\n<td>string</td>\n<td>Unique identifier of the employee</td>\n</tr>\n<tr>\n<td><code>fullName</code></td>\n<td>string</td>\n<td>Full name of the employee</td>\n</tr>\n<tr>\n<td><code>role</code></td>\n<td>string</td>\n<td>Job role / designation</td>\n</tr>\n<tr>\n<td><code>monthlySalary</code></td>\n<td>number</td>\n<td>Monthly salary amount</td>\n</tr>\n<tr>\n<td><code>overtimeRate</code></td>\n<td>number</td>\n<td>Hourly overtime rate</td>\n</tr>\n<tr>\n<td><code>companyName</code></td>\n<td>string</td>\n<td>Name of the company the employee belongs to</td>\n</tr>\n<tr>\n<td><code>createdBy</code></td>\n<td>string</td>\n<td>User ID of the account that created this record</td>\n</tr>\n<tr>\n<td><code>createdAt</code></td>\n<td>string (ISO 8601)</td>\n<td>Timestamp when the record was created</td>\n</tr>\n<tr>\n<td><code>updatedAt</code></td>\n<td>string (ISO 8601)</td>\n<td>Timestamp when the record was last updated</td>\n</tr>\n<tr>\n<td><code>__v</code></td>\n<td>number</td>\n<td>Internal version key</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"example-response\">Example Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"employees\": [\n    {\n      \"_id\": \"69f5bd8fec6bd868cdb19c9d\",\n      \"fullName\": \"Robert Smith\",\n      \"role\": \"Software Engineer\",\n      \"monthlySalary\": 45000,\n      \"overtimeRate\": 650,\n      \"companyName\": \"TechCorp Solutions\",\n      \"createdBy\": \"69f4e3364ee6e7761a48bf0f\",\n      \"createdAt\": \"2026-05-02T09:02:07.262Z\",\n      \"updatedAt\": \"2026-05-02T09:02:07.262Z\",\n      \"__v\": 0\n    }\n  ]\n}\n</code></pre>\n<h3 id=\"error-responses\">Error Responses</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>401 Unauthorized</code></td>\n<td>Missing or invalid JWT token</td>\n</tr>\n<tr>\n<td><code>403 Forbidden</code></td>\n<td>Token is valid but lacks permission</td>\n</tr>\n<tr>\n<td><code>500 Internal Server Error</code></td>\n<td>Unexpected server-side error</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"notes\">Notes</h2>\n<ul>\n<li>Ensure the JWT has not expired before calling this endpoint.</li>\n<li>The response only includes employees belonging to the authenticated user (<code>createdBy</code> matches the token subject).</li>\n</ul>\n","urlObject":{"protocol":"https","path":["api","employees",""],"host":["paysphere-p0nt","onrender","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"127dcf90-1804-4c23-9aa6-7e87ff546a21"},{"name":"Get Recent Employees","id":"1f0150d7-0514-4f91-9031-50816fdc79d8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY5ZjRlMzM2NGVlNmU3NzYxYTQ4YmYwZiIsImlhdCI6MTc3NzY1NjgxNiwiZXhwIjoxNzc4MjYxNjE2fQ.fvl07dXlBFoaf-M6kwr-vpB0rROS19hu8WriAWbWTLY","type":"text"}],"url":"https://paysphere-p0nt.onrender.com/api/employees/recent/","description":"<h1 id=\"get-recent-employees\">Get Recent Employees</h1>\n<p>Retrieves a list of the most recently added or updated employees associated with the authenticated user's account in the paySphere system. This endpoint is useful for dashboards and activity feeds where the latest employee records need to be surfaced.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>GET https://paysphere-p0nt.onrender.com/api/employees/recent</code></p>\n<blockquote>\n<p>Note: Confirm the exact path with the paySphere API maintainers if the URL has not yet been configured on this request.</p>\n</blockquote>\n<h2 id=\"authentication\">Authentication</h2>\n<p>This endpoint requires a valid Bearer token (JWT) in the <code>Authorization</code> header.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Required</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>Authorization</code></td>\n<td><code>Bearer &lt;JWT_TOKEN&gt;</code></td>\n<td>Yes</td>\n</tr>\n</tbody>\n</table>\n</div><p>The JWT is typically obtained from the <strong>User Login</strong> endpoint and must not be expired.</p>\n<h2 id=\"request\">Request</h2>\n<ul>\n<li><strong>Method:</strong> <code>GET</code></li>\n<li><strong>Path Parameters:</strong> None</li>\n<li><strong>Body:</strong> None</li>\n</ul>\n<h3 id=\"query-parameters-optional\">Query Parameters (optional)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>limit</code></td>\n<td>integer</td>\n<td>No</td>\n<td>Maximum number of recent employees to return. Defaults to 10 if omitted.</td>\n</tr>\n<tr>\n<td><code>since</code></td>\n<td>string (ISO 8601)</td>\n<td>No</td>\n<td>Return only employees created or updated after this timestamp.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"example-request\">Example Request</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://paysphere-p0nt.onrender.com/api/employees/recent?limit=5\nAuthorization: Bearer &lt;JWT_TOKEN&gt;\n</code></pre><h2 id=\"response\">Response</h2>\n<h3 id=\"200-ok\">200 OK</h3>\n<p>Returns a JSON array of recently added/updated employee objects, ordered from most recent to least recent.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\n  {\n    \"id\": \"emp_123\",\n    \"fullName\": \"Jane Doe\",\n    \"email\": \"jane.doe@example.com\",\n    \"role\": \"Engineer\",\n    \"department\": \"R&amp;D\",\n    \"createdAt\": \"2026-05-01T12:34:56.000Z\",\n    \"updatedAt\": \"2026-05-02T08:15:00.000Z\"\n  }\n]\n</code></pre>\n<h3 id=\"error-responses\">Error Responses</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status</th>\n<th>Meaning</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>401 Unauthorized</code></td>\n<td>Missing or invalid token</td>\n<td>The <code>Authorization</code> header is missing, malformed, or the JWT has expired.</td>\n</tr>\n<tr>\n<td><code>403 Forbidden</code></td>\n<td>Insufficient permissions</td>\n<td>The authenticated user does not have permission to view employees.</td>\n</tr>\n<tr>\n<td><code>500 Internal Server Error</code></td>\n<td>Server-side failure</td>\n<td>Unexpected error while fetching recent employees. Retry later or contact support.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"notes\">Notes</h2>\n<ul>\n<li>Results are scoped to the authenticated user's company/organization.</li>\n<li>Pair this endpoint with <strong>Get Employees</strong> for the full employee listing, or <strong>Add Employee</strong> to create new records.</li>\n</ul>\n","urlObject":{"protocol":"https","path":["api","employees","recent",""],"host":["paysphere-p0nt","onrender","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"1f0150d7-0514-4f91-9031-50816fdc79d8"}],"id":"07f15db1-0911-4a9d-aa34-77f3c562bda3","description":"<p>Endpoints for managing the employee directory within paySphere. This folder lets you add new employees to the organization, list all existing employee records, and fetch the most recently added employees. These requests form the foundation for downstream payroll operations, which depend on up-to-date employee data.</p>\n<p><strong>Included requests:</strong></p>\n<ul>\n<li><code>POST /api/employees/</code> — Add Employee</li>\n<li><code>GET /api/employees/</code> — Get Employees</li>\n<li><code>GET /api/employees/recent/</code> — Get Recent Employees</li>\n</ul>\n","_postman_id":"07f15db1-0911-4a9d-aa34-77f3c562bda3"},{"name":"Payroll Processing","item":[{"name":"Finalize Payroll","id":"a18543a6-46d8-4564-b0a3-3753f722f566","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY5ZjRlMzM2NGVlNmU3NzYxYTQ4YmYwZiIsImlhdCI6MTc3NzY1NjgxNiwiZXhwIjoxNzc4MjYxNjE2fQ.fvl07dXlBFoaf-M6kwr-vpB0rROS19hu8WriAWbWTLY","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"month\": 5,\r\n  \"year\": 2026,\r\n  \"activities\": [\r\n    {\r\n      \"name\": \"Robert Smith\",\r\n      \"tags\": [\r\n        { \"label\": \"2 days leave\" },\r\n        { \"label\": \"10 hrs overtime\" },\r\n        { \"label\": \"5000 bonus\" },\r\n        { \"label\": \"1500 deduction\" }\r\n      ]\r\n    }\r\n  ]\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"https://paysphere-p0nt.onrender.com/api/payroll/finalize/","description":"<h1 id=\"finalize-payroll\">Finalize Payroll</h1>\n<p>Finalizes the monthly payroll for one or more employees by calculating their net salary based on base salary, leave deductions, overtime pay, bonuses, and other deductions. Each finalized payroll entry is persisted and returned with a unique payroll ID.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>POST https://paysphere-p0nt.onrender.com/api/payroll/finalize/</code></p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>Requires a valid JWT bearer token in the <code>Authorization</code> header.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Bearer &lt;token&gt;\n</code></pre><h2 id=\"request-body\">Request Body</h2>\n<p>Send a JSON payload with the following structure:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>month</code></td>\n<td>integer</td>\n<td>Yes</td>\n<td>Payroll month (1–12).</td>\n</tr>\n<tr>\n<td><code>year</code></td>\n<td>integer</td>\n<td>Yes</td>\n<td>Payroll year (e.g., 2026).</td>\n</tr>\n<tr>\n<td><code>activities</code></td>\n<td>array</td>\n<td>Yes</td>\n<td>List of employee payroll activities to finalize.</td>\n</tr>\n<tr>\n<td><code>activities[].name</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>Full name of the employee.</td>\n</tr>\n<tr>\n<td><code>activities[].tags</code></td>\n<td>array</td>\n<td>Yes</td>\n<td>List of payroll adjustment tags for the employee.</td>\n</tr>\n<tr>\n<td><code>activities[].tags[].label</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>Adjustment label. Supported formats: <code>\"&lt;N&gt; days leave\"</code>, <code>\"&lt;N&gt; hrs overtime\"</code>, <code>\"&lt;amount&gt; bonus\"</code>, <code>\"&lt;amount&gt; deduction\"</code>.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-request-body\">Example Request Body</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"month\": 5,\n  \"year\": 2026,\n  \"activities\": [\n    {\n      \"name\": \"Robert Smith\",\n      \"tags\": [\n        { \"label\": \"2 days leave\" },\n        { \"label\": \"10 hrs overtime\" },\n        { \"label\": \"5000 bonus\" },\n        { \"label\": \"1500 deduction\" }\n      ]\n    }\n  ]\n}\n</code></pre>\n<h2 id=\"response\">Response</h2>\n<p>Returns a <code>200 OK</code> with a summary message and a <code>results</code> array containing the computed payroll for each employee.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>message</code></td>\n<td>string</td>\n<td>Human-readable summary of the finalization.</td>\n</tr>\n<tr>\n<td><code>results</code></td>\n<td>array</td>\n<td>Computed payroll records.</td>\n</tr>\n<tr>\n<td><code>results[].employeeName</code></td>\n<td>string</td>\n<td>Employee name.</td>\n</tr>\n<tr>\n<td><code>results[].baseSalary</code></td>\n<td>number</td>\n<td>Base salary used in the calculation.</td>\n</tr>\n<tr>\n<td><code>results[].leaveDays</code></td>\n<td>number</td>\n<td>Number of leave days applied.</td>\n</tr>\n<tr>\n<td><code>results[].leaveDeduction</code></td>\n<td>number</td>\n<td>Amount deducted for leave.</td>\n</tr>\n<tr>\n<td><code>results[].overtimeHours</code></td>\n<td>number</td>\n<td>Overtime hours applied.</td>\n</tr>\n<tr>\n<td><code>results[].overtimePay</code></td>\n<td>number</td>\n<td>Amount added for overtime.</td>\n</tr>\n<tr>\n<td><code>results[].bonus</code></td>\n<td>number</td>\n<td>Bonus amount added.</td>\n</tr>\n<tr>\n<td><code>results[].deductions</code></td>\n<td>number</td>\n<td>Additional deductions applied.</td>\n</tr>\n<tr>\n<td><code>results[].netSalary</code></td>\n<td>number</td>\n<td>Final net salary after adjustments.</td>\n</tr>\n<tr>\n<td><code>results[].payrollId</code></td>\n<td>string</td>\n<td>Unique identifier for the finalized payroll record.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Payroll finalized for 1 employee\",\n  \"results\": [\n    {\n      \"employeeName\": \"Robert Smith\",\n      \"baseSalary\": 45000,\n      \"leaveDays\": 2,\n      \"leaveDeduction\": 2400,\n      \"overtimeHours\": 10,\n      \"overtimePay\": 6500,\n      \"bonus\": 5000,\n      \"deductions\": 1500,\n      \"netSalary\": 52600,\n      \"payrollId\": \"69f5c01d39d45a76df5c4b0f\"\n    }\n  ]\n}\n</code></pre>\n<h2 id=\"calculation-notes\">Calculation Notes</h2>\n<ul>\n<li><strong>Leave deduction</strong> is computed from the employee's daily pay rate and the number of leave days.</li>\n<li><strong>Overtime pay</strong> is computed from the employee's hourly rate and the number of overtime hours.</li>\n<li><strong>Bonus</strong> and <strong>deductions</strong> are applied as flat amounts parsed from the tag labels.</li>\n<li><strong>Net salary</strong> = <code>baseSalary</code> − <code>leaveDeduction</code> + <code>overtimePay</code> + <code>bonus</code> − <code>deductions</code>.</li>\n</ul>\n<h2 id=\"errors\">Errors</h2>\n<ul>\n<li><code>401 Unauthorized</code> — Missing or invalid bearer token.</li>\n<li><code>400 Bad Request</code> — Invalid or missing fields in the request body.</li>\n<li><code>404 Not Found</code> — An employee referenced in <code>activities</code> does not exist.</li>\n</ul>\n","urlObject":{"protocol":"https","path":["api","payroll","finalize",""],"host":["paysphere-p0nt","onrender","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"a18543a6-46d8-4564-b0a3-3753f722f566"},{"name":"Get Payroll Summary","id":"cd3e51d3-e0ce-474b-bee5-d51f73b44817","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY5ZjRlMzM2NGVlNmU3NzYxYTQ4YmYwZiIsImlhdCI6MTc3NzY1NjgxNiwiZXhwIjoxNzc4MjYxNjE2fQ.fvl07dXlBFoaf-M6kwr-vpB0rROS19hu8WriAWbWTLY","type":"text"}],"body":{"mode":"raw","raw":""},"url":"https://paysphere-p0nt.onrender.com/api/payroll/summary/","description":"<h1 id=\"get-payroll-summary\">Get Payroll Summary</h1>\n<p>Retrieves an aggregated summary of payroll information for the authenticated organization/user.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>GET https://paysphere-p0nt.onrender.com/api/payroll/summary/</code></p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>This endpoint requires a Bearer token in the <code>Authorization</code> header.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Bearer &lt;JWT_TOKEN&gt;\n</code></pre><p>The JWT is obtained via the login/authentication flow of the paySphere API.</p>\n<h2 id=\"request\">Request</h2>\n<h3 id=\"headers\">Headers</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Value</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Authorization</td>\n<td>Bearer {{token}}</td>\n<td>Yes</td>\n<td>JWT access token issued at login.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"query-parameters\">Query Parameters</h3>\n<p>None.</p>\n<h3 id=\"path-parameters\">Path Parameters</h3>\n<p>None.</p>\n<h3 id=\"body\">Body</h3>\n<p>None — this is a <code>GET</code> request.</p>\n<h2 id=\"response\">Response</h2>\n<p>Returns a JSON object containing the payroll summary, typically including totals such as gross pay, net pay, deductions, taxes, and employee counts for the current payroll cycle.</p>\n<h3 id=\"example-success-response-200-ok\">Example Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"totalEmployees\": 0,\n  \"totalGrossPay\": 0,\n  \"totalNetPay\": 0,\n  \"totalDeductions\": 0,\n  \"totalTaxes\": 0,\n  \"payPeriod\": \"YYYY-MM\"\n}\n</code></pre>\n<h3 id=\"common-error-responses\">Common Error Responses</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>401 Unauthorized</td>\n<td>Missing or invalid Bearer token.</td>\n</tr>\n<tr>\n<td>403 Forbidden</td>\n<td>Authenticated user does not have permission to view payroll.</td>\n</tr>\n<tr>\n<td>500 Internal Server Error</td>\n<td>Unexpected server-side error.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"notes\">Notes</h2>\n<ul>\n<li>Ensure the Bearer token is valid and not expired before sending the request.</li>\n<li>This endpoint is read-only and safe to retry.</li>\n</ul>\n","urlObject":{"protocol":"https","path":["api","payroll","summary",""],"host":["paysphere-p0nt","onrender","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"cd3e51d3-e0ce-474b-bee5-d51f73b44817"}],"id":"e23ea368-b23a-4bc1-880f-9533e9ad3c9b","description":"<p>Endpoints that drive the payroll lifecycle in paySphere. This folder includes finalizing payroll for the current cycle and retrieving an aggregated payroll summary for the authenticated organization. All requests here require a valid bearer token and assume employees have already been onboarded via the Employee Management folder.</p>\n<p><strong>Included requests:</strong></p>\n<ul>\n<li><code>POST /api/payroll/finalize/</code> — Finalize Payroll</li>\n<li><code>GET /api/payroll/summary/</code> — Get Payroll Summary</li>\n</ul>\n","_postman_id":"e23ea368-b23a-4bc1-880f-9533e9ad3c9b"}]}