{"info":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","description":"<html><head></head><body><p><strong>Postman collection for testing the POS-Padi API</strong></p>\n<p>POS-Padi is a web-based POS management platform designed to give agents and business owners full control over their operations, from tracking profits and resolving disputes to managing terminals and receiving fraud alerts in real-time.</p>\n<p>The platform tackles key problems in the informal POS sector like fraud, delayed dispute resolution, and limited cash access, by offering a smart, centralised system for real-time visibility, financial tools, and customer engagement.</p>\n<h4 id=\"🏗️-architecture\">🏗️ <strong>Architecture</strong></h4>\n<p>This collection documents both backend services:</p>\n<ul>\n<li><p><strong>Django Backend (Auth &amp; Core User System)</strong></p>\n<p>  Handles authentication (JWT), users, agents, customers, and company records.</p>\n</li>\n<li><p><strong>Express Backend (Transaction Layer)</strong></p>\n<p>  Handles disputes, transactions, and real-time notifications.</p>\n</li>\n</ul>\n<p>Both services are deployed separately and consume tokens issued after login.</p>\n<h4 id=\"🔐-authentication\">🔐 <strong>Authentication</strong></h4>\n<p>All endpoints are protected and require a JWT token in the <code>Authorization</code> header:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Bearer &lt;access_token&gt;\n\n</code></pre><p>The Django service generates Tokens upon successful login.</p>\n<p>Check the login response for the JWT access token.</p>\n<h4 id=\"🌍-base-urls\">🌍 <strong>Base URLs</strong></h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Service</th>\n<th>Environment Variable</th>\n<th>URL</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Django Backend</td>\n<td><code>djangoUrl</code></td>\n<td><code>https://pos-padi-django-backend.onrender.com/</code></td>\n</tr>\n<tr>\n<td>Express Backend</td>\n<td><code>nodeUrl</code></td>\n<td><code>https://pos-padi-express-backend.onrender.com/</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr>\n<h4 id=\"📂-collection-features\">📂 <strong>Collection Features</strong></h4>\n<ul>\n<li><p>Grouped folders by service and functionality (e.g., <code>Auth</code>, <code>Customers</code>, <code>Transactions</code>, <code>Disputes</code>)</p>\n</li>\n<li><p>Live examples and prefilled request bodies</p>\n</li>\n<li><p>Tests and pre-request scripts</p>\n</li>\n<li><p>Global variables: <code>authToken</code>, <code>djangoUrl</code>, <code>nodeUrl</code></p>\n</li>\n<li><p>Environment setup file for dev and production</p>\n</li>\n<li><p>Visual tags for HTTP method, auth requirement, and service</p>\n</li>\n</ul>\n<h4 id=\"👥-contributors\">👥 <strong>Contributors</strong></h4>\n<ul>\n<li><p><strong>Johnathan</strong> – Django Developer</p>\n</li>\n<li><p><strong>Anyim Ossi</strong> – Django Developer</p>\n</li>\n<li><p><strong>Michael Peter</strong> – Express Developer</p>\n</li>\n<li><p><strong>Adeyemi</strong> – Express Developer</p>\n</li>\n<li><p><strong>Steve</strong> – Django Developer</p>\n</li>\n<li><p><strong>Ogaga</strong> – Express Developer</p>\n</li>\n<li><p><strong>Kayode</strong> – Express Developer</p>\n</li>\n<li><p><strong>Sanele Skhosana</strong> – Django Developer</p>\n</li>\n<li><p><strong>Oyinda</strong> – Express Developer</p>\n</li>\n</ul>\n<h4 id=\"📌-public-use--licensing\">📌 <strong>Public Use &amp; Licensing</strong></h4>\n<p>This API is part of the POS-Padi MVP project and is intended for <strong>internal frontend use</strong>, contributor collaboration, and (eventually) public developer testing under controlled environments.</p>\n<h4 id=\"🚀-supported-use-cases-mvp\">🚀 <strong>Supported Use Cases (MVP)</strong></h4>\n<ul>\n<li><p>Agent/terminal assignment</p>\n</li>\n<li><p>Daily transaction tracking</p>\n</li>\n<li><p>Customer profile &amp; history</p>\n</li>\n<li><p>Expense tagging &amp; profit breakdown</p>\n</li>\n<li><p>Real-time dispute logging</p>\n</li>\n<li><p>Push alerts for fraud &amp; cash low</p>\n</li>\n</ul>\n<hr>\n<p>Interact securely with the POS-Padi backend.</p>\n<h4 id=\"quick-start\"><strong>QUICK START</strong></h4>\n<p><strong>Log in</strong> via the login user endpoint(Authentication folder) to generate an auth token.</p>\n<p>Token is automatically added to the collection variables.</p>\n<p><code>❗Log in is required.</code></p>\n<p>Follow the implementation docs.</p>\n<hr>\n<hr>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"43614350","collectionId":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","publishedId":"2sB2ixjZkQ","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-04-29T09:08:22.000Z"},"item":[{"name":"Users","item":[{"name":"Authentication","item":[{"name":"Register Owner","event":[{"listen":"test","script":{"id":"305e32a4-fdaf-4775-a0ca-0c4079f05cae","exec":["// Save auth token after successful registration\r","const response = pm.response.json();\r","\r","pm.test(\"Verify successful user registration message\", function () {\r","    pm.expect(response.message).to.eql(\"User registered successfully. Check your email for the OTP to verify your account.\");\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"98477155-68ee-41d1-b8b0-7babb146d728","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"email\": \"testagent1@gmail.com\",\n    \"first_name\": \"test\",\n    \"last_name\": \"agent\",\n    \"phone\": \"+1274520943315\",\n    \"password\": \"test@agent1\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://pos-padi-django-backend.onrender.com/api/v1/users/register/","description":"<p>Registers a new user on the POS-Padi platform. This endpoint allows a new user(Owner/Aggregator) to register by providing their details. An OTP is sent to their email for verification.</p>\n<hr />\n<p><strong>Method:</strong> <code>POST</code></p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>Not required</p>\n<hr />\n<h4 id=\"🧾-request-specifications\">🧾 Request Specifications</h4>\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>email</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>User's email address (must be unique)</td>\n</tr>\n<tr>\n<td><code>first_name</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>User's first name</td>\n</tr>\n<tr>\n<td><code>last_name</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>User's last name</td>\n</tr>\n<tr>\n<td><code>phone</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>User's phone number</td>\n</tr>\n<tr>\n<td><code>nin</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>National Identification Number (optional)</td>\n</tr>\n<tr>\n<td><code>password</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>Minimum 8 characters; required for login</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>400 Bad Request</strong> – Email already in use, missing required fields, or invalid data</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Unexpected server failure</p>\n</li>\n</ul>\n<hr />\n","urlObject":{"path":["users","register",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[]}},"response":[{"id":"f141a0cd-83c8-4aab-b07c-7a78b39b93e5","name":"User registered successfully. Check your email for the OTP to verify your account.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<email>\",\n  \"first_name\": \"<string>\",\n  \"last_name\": \"<string>\",\n  \"phone\": \"+1274520940015\",\n  \"password\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/register/"},"status":"Created","code":201,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"User registered successfully. Check your email for the OTP to verify your account.\"\n}"},{"id":"19fe1bda-62b4-4fe0-8b78-19094d2dd987","name":"Email sending failed.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<email>\",\n  \"first_name\": \"<string>\",\n  \"last_name\": \"<string>\",\n  \"phone\": \"+1274520940015\",\n  \"password\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/register/"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\r\n  \"message\": \"Email sending failed please retry in 3 seconds.\"\r\n}"},{"id":"c3c190e0-89ae-492a-b5ab-54ec101cd90a","name":"User already exists","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"testagent2@gmail.com\",\n  \"first_name\": \"test\",\n  \"last_name\": \"agent\",\n  \"phone\": \"+1274520943315\",\n  \"password\": \"test@agent2\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/register/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 25 Apr 2025 16:52:53 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"53"},{"key":"Connection","value":"keep-alive"},{"key":"allow","value":"POST, OPTIONS"},{"key":"Content-Encoding","value":"br"},{"key":"cross-origin-opener-policy","value":"same-origin"},{"key":"referrer-policy","value":"same-origin"},{"key":"rndr-id","value":"86d64af3-8163-4a33"},{"key":"vary","value":"Accept, origin"},{"key":"vary","value":"Accept-Encoding"},{"key":"x-content-type-options","value":"nosniff"},{"key":"x-frame-options","value":"DENY"},{"key":"x-render-origin-server","value":"gunicorn"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"935f5a6f1d4a8230-IAD"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"email\": [\n        \"user with this email already exists.\"\n    ]\n}"},{"id":"7ccbd74d-728a-4090-8c76-8461f13dbc36","name":"Invalid NIN","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<email>\",\n  \"first_name\": \"<string>\",\n  \"last_name\": \"<string>\",\n  \"phone\": \"+1274520940015\",\n  \"nin\": \"127452094001555\",\n  \"password\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/register/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 25 Apr 2025 16:55:49 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"53"},{"key":"Connection","value":"keep-alive"},{"key":"allow","value":"POST, OPTIONS"},{"key":"Content-Encoding","value":"br"},{"key":"cross-origin-opener-policy","value":"same-origin"},{"key":"referrer-policy","value":"same-origin"},{"key":"rndr-id","value":"74967c63-06b3-485c"},{"key":"vary","value":"Accept, origin"},{"key":"vary","value":"Accept-Encoding"},{"key":"x-content-type-options","value":"nosniff"},{"key":"x-frame-options","value":"DENY"},{"key":"x-render-origin-server","value":"gunicorn"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"935f5eb85d8d5d13-IAD"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"nin\": [\n        \"Ensure this field has no more than 11 characters.\"\n    ]\n}"},{"id":"cf4ee639-0005-4647-a599-fe1f97492924","name":"Invalid Email address","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<invalid_email>\",\n  \"first_name\": \"<string>\",\n  \"last_name\": \"<string>\",\n  \"phone\": \"+1274520940015\",\n  \"password\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/register/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 25 Apr 2025 17:00:05 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"46"},{"key":"Connection","value":"keep-alive"},{"key":"allow","value":"POST, OPTIONS"},{"key":"Content-Encoding","value":"br"},{"key":"cross-origin-opener-policy","value":"same-origin"},{"key":"referrer-policy","value":"same-origin"},{"key":"rndr-id","value":"de76848c-e8d8-408d"},{"key":"vary","value":"Accept, origin"},{"key":"vary","value":"Accept-Encoding"},{"key":"x-content-type-options","value":"nosniff"},{"key":"x-frame-options","value":"DENY"},{"key":"x-render-origin-server","value":"gunicorn"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"935f64f96e79a5f2-IAD"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"email\": [\n        \"Enter a valid email address.\"\n    ]\n}"}],"_postman_id":"98477155-68ee-41d1-b8b0-7babb146d728"},{"name":"Verify Email","id":"ec29960a-2afa-4599-9cd8-c8aff02904ad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<string>\",\n  \"otp\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://pos-padi-django-backend.onrender.com/api/v1/users/verify/","description":"<p>Verifies a newly registered Aggregator's email using a One-Time Password (OTP) that was sent to their email address during registration. Successful verification activates the user account and allows login.</p>\n<hr />\n<p><strong>Method:</strong> <code>POST</code></p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>Not required</p>\n<hr />\n<h4 id=\"🧾-request-specifications\">🧾 Request Specifications</h4>\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>email</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>Email address used during registration</td>\n</tr>\n<tr>\n<td><code>otp</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>The OTP sent to the user's email</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>400 Bad Request</strong> – Invalid or expired OTP, or email mismatch</p>\n</li>\n<li><p><strong>404 Not Found</strong> – No verification record found for the provided email</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Server-side error during OTP validation</p>\n</li>\n</ul>\n","urlObject":{"path":["users","verify",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[]}},"response":[{"id":"691373b7-53ca-443a-8254-3c08e29a6eec","name":"Email verified successfully.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"owner1@test.com\",\n  \"otp\": \"885907\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/verify/"},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Email verified successfully.\"\n}"},{"id":"6187305a-17f6-45da-aee2-34bb673fd486","name":"Invalid or expired OTP.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<string>\",\n  \"otp\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/verify/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Invalid or expired OTP.\"\n}"},{"id":"9cc9118a-4ef5-4a30-aaf6-ce40bf792581","name":"User not found.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<string>\",\n  \"otp\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/verify/"},"status":"Not Found","code":404,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"User not found.\"\n}"}],"_postman_id":"ec29960a-2afa-4599-9cd8-c8aff02904ad"},{"name":"Resend Verification OTP","id":"1a2a219f-0535-4850-8894-9b796a1300db","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://pos-padi-django-backend.onrender.com/api/v1/users/verify/otp/","description":"<p>Resends the One-Time Password (OTP) to the email address of a registered but unverified Aggregator. This is useful when the original OTP has expired or was not received.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>Not required</p>\n<hr />\n<h4 id=\"🧾-request-specifications\">🧾 Request Specifications</h4>\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>email</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>The email address used during registration</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>400 Bad Request</strong> – Email already verified or not associated with a pending registration</p>\n</li>\n<li><p><strong>404 Not Found</strong> – No user found with the provided email</p>\n</li>\n<li><p><strong>429 Too Many Requests</strong> – User has exceeded the allowed OTP resend attempts</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Unexpected server-side failure</p>\n</li>\n</ul>\n<hr />\n","urlObject":{"path":["users","verify","otp",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[]}},"response":[{"id":"fc2c6f5b-34b4-44e3-ae03-1048d7aff672","name":"Check your email for the OTP to verify your account.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/verify/otp/"},"status":"Created","code":201,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Check your email for the OTP to verify your account.\"\n}"},{"id":"420e6ce3-f370-47d5-9088-2e06e4cc57fe","name":"Invalid header found.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/verify/otp/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""},{"id":"e036429f-a8e3-401c-9a2a-8ffe3e7c0c79","name":"User with this email does not exist or email is verified.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/verify/otp/"},"status":"Not Found","code":404,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"User with this email does not exist or email is verified.\"\n}"},{"id":"98ac72cf-2f5e-4795-974d-32162464b5a9","name":"Email sending failed.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/verify/otp/"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"1a2a219f-0535-4850-8894-9b796a1300db"},{"name":"Login User","event":[{"listen":"test","script":{"id":"9d3642e2-b53d-43bc-9064-999b83c9bebc","exec":["// Save auth token from login response\r","const response = pm.response.json();\r","\r","// Test for successful status code\r","pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","// Test for presence of access token\r","pm.test(\"Access token exists in the response\", function () {\r","    pm.expect(response.access).to.exist;\r","});\r","\r","// Test for presence of refresh token\r","pm.test(\"Refresh token exists in the response\", function () {\r","    pm.expect(response.refresh).to.exist;\r","});\r","\r","if (response.access) {\r","    pm.collectionVariables.set(\"authToken\", response.access);\r","    console.log(response.access);\r","    console.log(\"✅ Auth token stored in collection variables.\");\r","} else {\r","    console.warn(\"⚠️ Access token not found in login response.\");\r","}\r","\r","if (response.refresh) {\r","    pm.collectionVariables.set(\"refreshToken\", response.refresh);\r","    console.log(response.refresh);\r","    console.log(\"✅ Refresh token stored in collection variables.\");\r","} else {\r","    console.warn(\"⚠️ Refresh token not found in login response.\");\r","}"],"type":"text/javascript","packages":{}}}],"id":"160c9637-b72c-401e-98ea-a67690d653fd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"owner1@test.com\",\n  \"password\": \"Jonathan1@\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://pos-padi-django-backend.onrender.com/api/v1/users/login/","description":"<p>Authenticates a verified user (Aggregator, Agent, or Admin) and returns a refresh and access JWT token used for accessing protected resources. This token must be included in the <code>Authorization</code> header of all subsequent requests.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>Not required</p>\n<hr />\n<h4 id=\"🧾-request-specifications\">🧾 Request Specifications</h4>\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>email</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>The registered and verified email address</td>\n</tr>\n<tr>\n<td><code>password</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>User’s password</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>400 Bad Request</strong> – Invalid email or password</p>\n</li>\n<li><p><strong>403 Forbidden</strong> – Account not yet verified</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Unexpected server issue during login</p>\n</li>\n</ul>\n<hr />\n","urlObject":{"path":["users","login",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[]}},"response":[{"id":"312bb364-f9b7-4698-a51e-c9c31b28783d","name":"Login successful. Returns access and refresh tokens.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<email>\",\n  \"password\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://pos-padi-django-backend.onrender.com/api/v1/users/login/"},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"refresh\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTc2MDg4Njk3NCwiaWF0IjoxNzQ1MzM0OTc0LCJqdGkiOiI2MDE2MWVmOTU0MmM0OTBiODcxMzI3MWViOWY3NWFiOSIsInVzZXJfaWQiOiI5MzdiZjMwOC03OTI5LTRlMDEtODA1MC01NmQ2YTY4MzUwODcifQ.yeKU5bSIYV5RqIbP8iTFjTCrAgTvnHt70MXXfVVcRB0\",\n    \"access\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzQ1OTM5Nzc0LCJpYXQiOjE3NDUzMzQ5NzQsImp0aSI6IjMzM2ZiNzc4OGFiZTQ0YjY5OTQ4NTE3ODE0MzgxMWNkIiwidXNlcl9pZCI6IjkzN2JmMzA4LTc5MjktNGUwMS04MDUwLTU2ZDZhNjgzNTA4NyIsInJvbGUiOiJvd25lciJ9.4Xb23yAwh1oh0vdn6FQJjTLjUQbQlYlWybwK6Gq4LIs\"\n    \"role\": \"owner\",\n    \"full_name\": \"test test\"\n}"},{"id":"38c87ad6-d4fe-4a91-aa07-f35cc725bfb0","name":"Invalid credentials.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<email>\",\n  \"password\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://pos-padi-django-backend.onrender.com/api/v1/users/login/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"non_field_errors\": [\n        \"Invalid email or password.\"\n    ]\n}"}],"_postman_id":"160c9637-b72c-401e-98ea-a67690d653fd"},{"name":"Refresh Access Token","event":[{"listen":"test","script":{"id":"e62ea3f4-ceeb-4103-9371-87b64d420666","exec":["const response = pm.response.json();\r","\r","// Test for successful status code\r","pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","// Test for access token\r","pm.test(\"Access token exists in the response\", function () {\r","    pm.expect(response.access).to.exist;\r","    pm.expect(response.access).to.be.a('string');\r","});\r","\r","// Save auth token from refresh response\r","if (response.access) {\r","    pm.collectionVariables.set(\"authToken\", response.access);\r","    console.log(\"✅ Auth token stored in collection variables.\");\r","} else {\r","    console.warn(\"⚠️ Token not found in refresh token response.\");\r","}\r","\r",""],"type":"text/javascript","packages":{}}}],"id":"c88c0059-6773-43c4-99b6-7de71dd1a566","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"refresh\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://pos-padi-django-backend.onrender.com/api/v1/users/refresh-token/","description":"<p>Issues a new JWT access token using a valid refresh token. This allows users to stay authenticated without needing to log in again, ensuring a seamless and secure session renewal experience.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>Not required — uses a refresh token in the request body.</p>\n<hr />\n<h4 id=\"🧾-request-specifications\">🧾 Request Specifications</h4>\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>refresh</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>A valid refresh token issued during login</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>401 Unauthorized</strong> – Expired, invalid, or blacklisted refresh token</p>\n</li>\n<li><p><strong>400 Bad Request</strong> – Missing or malformed refresh token</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Server error during token regeneration</p>\n</li>\n</ul>\n","urlObject":{"path":["users","refresh-token",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[]}},"response":[{"id":"1482b697-ec6a-44db-8632-2bcb175e50bd","name":"Access token refreshed successfully.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"body":{"mode":"raw","raw":"{\n  \"refresh\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/refresh-token/"},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"access\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzQ2MDA1MjU0LCJpYXQiOjE3NDU0MDA0NDMsImp0aSI6ImY5M2U4YzlkNmRkNzQzNGY4ODI1NGFjMjYxY2EzN2Q0IiwidXNlcl9pZCI6IjkzN2JmMzA4LTc5MjktNGUwMS04MDUwLTU2ZDZhNjgzNTA4NyJ9.aJXq8Sjb_jDJl1x2xqR0qUMMY1b1Cc-_ZvZ_tJkXf2M\"\n}"},{"id":"015a88b0-df5e-4ea7-9c27-4c337f2fcbc0","name":"Invalid or expired refresh token.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"body":{"mode":"raw","raw":"{\n  \"refresh\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/refresh-token/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Invalid or expired refresh token.\"\n}"}],"_postman_id":"c88c0059-6773-43c4-99b6-7de71dd1a566"},{"name":"Logout User","event":[{"listen":"test","script":{"id":"95e434cc-d8b9-44a3-a153-aae4fb093f3b","exec":["// test to see if access is denied after log out"],"type":"text/javascript","packages":{}}}],"id":"a55648da-3a35-4c6b-9aa5-de492f19d9de","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"refresh\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://pos-padi-django-backend.onrender.com/api/v1/users/logout/","description":"<p>Logs out the currently authenticated user by invalidating/ blacklisting their refresh token. This action prevents reuse of the token for future access and is essential for securing user sessions on shared or public devices.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – The user must be logged in and include a valid <code>Authorization</code> token.</p>\n<hr />\n<h4 id=\"🧾-request-specifications\">🧾 Request Specifications</h4>\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>refresh</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>The refresh token to be revoked during logout</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>401 Unauthorized</strong> – Missing or invalid access token</p>\n</li>\n<li><p><strong>400 Bad Request</strong> – Invalid or expired refresh token</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Logout failed due to internal error</p>\n</li>\n</ul>\n<hr />\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["users","logout",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[]}},"response":[{"id":"99fbfbcf-e7ce-48a6-afba-e2946456af7e","name":"Logout successful.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"body":{"mode":"raw","raw":"{\n  \"refresh\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/logout/"},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Logout successful.\"\n}"},{"id":"efa5978f-7859-4a11-9bbd-5c70a0da7f7a","name":"Invalid or expired token.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"body":{"mode":"raw","raw":"{\n  \"refresh\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/logout/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Invalid or expired token.\"\n}"}],"_postman_id":"a55648da-3a35-4c6b-9aa5-de492f19d9de"}],"id":"e9a1117b-9351-410c-9d34-090d6de6a27a","description":"<p>Handles secure access to the platform. This folder includes endpoints for user registration, login, logout, password management, email verification, and user session summary. All authenticated routes require a valid JWT token.</p>\n","_postman_id":"e9a1117b-9351-410c-9d34-090d6de6a27a","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}}},{"name":"User Password","item":[{"name":"Forgot Password","id":"7863476b-2440-4dfa-a1c2-b2f938703f1f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"agent1@test.com\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://pos-padi-django-backend.onrender.com/api/v1/users/forgot-password/","description":"<p>Initiates the password reset process by sending a One-Time Password (OTP) to the user’s registered email. This endpoint is used when a user has forgotten their password and needs to create a new one.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>Not required</p>\n<hr />\n<h4 id=\"🧾-request-specifications\">🧾 Request Specifications</h4>\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>email</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>The email address associated with the account</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>404 Not Found</strong> – No account found with the provided email</p>\n</li>\n<li><p><strong>429 Too Many Requests</strong> – OTP resend limit exceeded</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Server issue during OTP generation or delivery</p>\n</li>\n</ul>\n<hr />\n","urlObject":{"path":["users","forgot-password",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[]}},"response":[{"id":"db8d1bf4-b058-405f-9c8e-5374a4f1054f","name":"OTP sent to your email.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/forgot-password/"},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"OTP sent to your email.\"\n}"},{"id":"c6a29964-9aaf-4e6f-944e-b19b28e28041","name":"User with this email does not exist or is not verified.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/forgot-password/"},"status":"Not Found","code":404,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"User with this email does not exist or is not verified.\"\n}"},{"id":"fc5fda7a-dab5-4b96-aa21-14c46b566f39","name":"Failed to send email.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/forgot-password/"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"7863476b-2440-4dfa-a1c2-b2f938703f1f"},{"name":"Change Password","id":"f1e81bf6-5710-4b6d-96e7-efd5b6b4b7ee","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"current_password\": \"<string>\",\n  \"new_password\": \"<string>\",\n  \"confirm_password\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://pos-padi-django-backend.onrender.com/api/v1/users/change-password/","description":"<p>This endpoint allows an authenticated user to change their password by providing the current password, a new password, and confirming the new password.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["users","change-password",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[]}},"response":[{"id":"0e893ac0-df10-48cc-8656-964c9fa24b11","name":"Password changed successfully.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"body":{"mode":"raw","raw":"{\n  \"current_password\": \"<string>\",\n  \"new_password\": \"<string>\",\n  \"confirm_password\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/change-password/"},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""},{"id":"640b6031-3dd0-4bfc-8266-a60e2af5ab0f","name":"Invalid current password or passwords do not match.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"body":{"mode":"raw","raw":"{\n  \"current_password\": \"<string>\",\n  \"new_password\": \"<string>\",\n  \"confirm_password\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/change-password/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"f1e81bf6-5710-4b6d-96e7-efd5b6b4b7ee"},{"name":"Reset Password","id":"6f6f3522-4829-4927-b5bc-a7e940962f0e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<string>\",\n  \"otp\": \"<string>\",\n  \"new_password\": \"<string>\",\n  \"confirm_password\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://pos-padi-django-backend.onrender.com/api/v1/users/reset-password/","description":"<p>Completes the password reset process by allowing the user to submit a valid OTP and set a new password. This is used after initiating a \"Forgot Password\" request.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>Not required</p>\n<hr />\n<h4 id=\"🧾-request-specifications\">🧾 Request Specifications</h4>\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>email</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>The registered email address</td>\n</tr>\n<tr>\n<td><code>otp</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>The OTP code sent to the user’s email</td>\n</tr>\n<tr>\n<td><code>new_password</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>The new password (must meet security rules)</td>\n</tr>\n<tr>\n<td>confirm_password</td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>Confirm the new password</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>400 Bad Request</strong> – Invalid OTP, missing fields, or weak password</p>\n</li>\n<li><p><strong>404 Not Found</strong> – No active password reset request found for the email</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Failed to reset password due to a server issue</p>\n</li>\n</ul>\n<hr />\n","urlObject":{"path":["users","reset-password",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[]}},"response":[{"id":"51eb430d-eb42-4e0b-8f45-43a3cd158135","name":"Password reset successful.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<string>\",\n  \"otp\": \"<string>\",\n  \"new_password\": \"<string>\",\n  \"confirm_password\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/reset-password/"},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Password reset successful.\"\n}"},{"id":"d468ac06-4822-44d4-ad20-e5974bd324de","name":"Invalid or expired OTP, or passwords do not match.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<string>\",\n  \"otp\": \"<string>\",\n  \"new_password\": \"<string>\",\n  \"confirm_password\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/reset-password/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Invalid or expired OTP.\"\n}"},{"id":"0bc8e3fd-a56a-4b93-9c84-beafa06b85d8","name":"User not found.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<string>\",\n  \"otp\": \"<string>\",\n  \"new_password\": \"<string>\",\n  \"confirm_password\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/reset-password/"},"status":"Not Found","code":404,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"User not found.\"\n}"}],"_postman_id":"6f6f3522-4829-4927-b5bc-a7e940962f0e"}],"id":"9a8e5eb3-07a4-416d-a8fe-48997a812fb5","_postman_id":"9a8e5eb3-07a4-416d-a8fe-48997a812fb5","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}}},{"name":"User Data Summary","item":[{"name":"Get User Data","event":[{"listen":"test","script":{"id":"aa39dfe0-b42e-44c6-9775-9f9b21f488f7","exec":["pm.test(\"Response status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","pm.test(\"Response does not contain null values\", function () {\r","    const responseData = xml2Json(pm.response.text());\r","    \r","    pm.expect(responseData).to.not.include(null);\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"ffa9d153-1b00-4840-a89e-b7ef4741bfea","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://pos-padi-django-backend.onrender.com/api/v1/users/summary/","description":"<p>Retrieves key details of the currently authenticated user, including identity, role, permissions, and company association. This endpoint is typically used to initialize user-specific data for dashboards and role-based access control.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – The request must include a valid <code>Authorization</code> header with a bearer token.</p>\n<hr />\n<h4 id=\"🧾-request-specifications\">🧾 Request Specifications</h4>\n<p><em>No request body required</em></p>\n<hr />\n<h4 id=\"📦-response-details-example-fields-see-request-example-for-more-details\">📦 Response Details (example fields, see request example for more details)</h4>\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 user ID</td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>String</td>\n<td>User's email address</td>\n</tr>\n<tr>\n<td><code>first_name</code></td>\n<td>String</td>\n<td>User's first name</td>\n</tr>\n<tr>\n<td><code>last_name</code></td>\n<td>String</td>\n<td>User's last name</td>\n</tr>\n<tr>\n<td><code>role</code></td>\n<td>String</td>\n<td>User role: <code>agent</code>, <code>aggregator</code>, or <code>admin</code></td>\n</tr>\n<tr>\n<td><code>company</code></td>\n<td>Object</td>\n<td>Company data if user is linked to one</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>401 Unauthorized</strong> – Missing or invalid token</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Failed to fetch user data</p>\n</li>\n</ul>\n","urlObject":{"path":["users","summary",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[]}},"response":[{"id":"39f8404d-ae1a-4309-a399-97217ba0d9cd","name":"Get summary of all user data (Owner)","originalRequest":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"https://pos-padi-django-backend.onrender.com/api/v1/users/summary/"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"user\": {\n        \"email\": \"owner1@test.com\",\n        \"first_name\": \"test\",\n        \"last_name\": \"test\",\n        \"phone\": \"+234000000000\",\n        \"nin\": \"00000000000\",\n        \"role\": \"owner\",\n        \"photo\": null\n    },\n    \"company\": [\n        {\n            \"id\": \"5acdb442-d873-4aea-8ebd-6e006ee0e0a3\",\n            \"owner\": {\n                \"email\": \"owner1@test.com\",\n                \"first_name\": \"test\",\n                \"last_name\": \"test\",\n                \"phone\": \"+234000000000\",\n                \"nin\": \"00000000000\",\n                \"role\": \"owner\",\n                \"photo\": null\n            },\n            \"created_at\": \"2025-04-19T09:04:06.308890Z\",\n            \"updated_at\": \"2025-04-19T09:04:06.308916Z\",\n            \"is_active\": true,\n            \"name\": \"Mighty POS\",\n            \"state\": \"lagos\",\n            \"lga\": \"Lagos\",\n            \"area\": \"Ikeja\"\n        }\n    ],\n    \"agents\": [\n        {\n            \"id\": \"173ce71c-1a93-4e5d-823c-a0aa95eee945\",\n            \"user_id\": {\n                \"email\": \"agent1@test.com\",\n                \"first_name\": \"Agent\",\n                \"last_name\": \"Agent\",\n                \"phone\": \"+234000000000\",\n                \"nin\": \"00000000000\",\n                \"role\": \"agent\",\n                \"photo\": null\n            },\n            \"created_at\": \"2025-04-19T09:04:27.031230Z\",\n            \"updated_at\": \"2025-04-19T09:04:27.033905Z\",\n            \"is_active\": true,\n            \"agent_id\": 726244,\n            \"commission\": \"0.100\",\n            \"rating\": \"0.0\",\n            \"status\": \"inactive\",\n            \"company\": \"5acdb442-d873-4aea-8ebd-6e006ee0e0a3\"\n        }\n    ],\n    \"transactions\": [],\n    \"customers\": []"},{"id":"33aed390-86c1-4226-8ade-d3889212688a","name":"Get summary of all user data (Agent)","originalRequest":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"https://pos-padi-django-backend.onrender.com/api/v1/users/summary/"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"user\": {\n        \"id\": \"02e09d15-5c31-4e62-bd0b-8fdb1575ec3c\",\n        \"user_id\": {\n            \"email\": \"agent2@test.com\",\n            \"first_name\": \"Jonathan\",\n            \"last_name\": \"Mensah\",\n            \"phone\": \"+234000000000\",\n            \"nin\": \"00000000000\",\n            \"role\": \"agent\",\n            \"photo\": null\n        },\n        \"created_at\": \"2025-04-25T14:15:57.712282Z\",\n        \"updated_at\": \"2025-04-25T14:15:58.187255Z\",\n        \"is_active\": true,\n        \"agent_id\": \"392323\",\n        \"commission\": null,\n        \"rating\": \"0.0\",\n        \"status\": \"active\",\n        \"company\": \"5d42a8bd-0a76-4ff6-83f1-c1cecfbfe0e0\"\n    },\n    \"company\": {\n        \"id\": \"5d42a8bd-0a76-4ff6-83f1-c1cecfbfe0e0\",\n        \"owner\": {\n            \"email\": \"owner1@test.com\",\n            \"first_name\": \"test\",\n            \"last_name\": \"test\",\n            \"phone\": \"+234000000000\",\n            \"nin\": \"00000000000\",\n            \"role\": \"owner\",\n            \"photo\": null\n        },\n        \"created_at\": \"2025-04-24T20:10:41.169709Z\",\n        \"updated_at\": \"2025-04-25T20:25:49.957516Z\",\n        \"is_active\": true,\n        \"name\": \"Mighty POS\",\n        \"state\": \"Abuja\",\n        \"lga\": \"Victoria Island\",\n        \"area\": \"Oba\"\n    },\n    \"transactions\": [\n        {\n            \"id\": \"03d17855-5928-463c-b935-f662fc6c97e1\",\n            \"amount\": \"17500.00\",\n            \"fee\": \"200.00\",\n            \"type\": \"credit\",\n            \"status\": \"successful\",\n            \"status_display\": \"Successful\",\n            \"created_at\": \"2025-04-25T19:57:43.680000Z\"\n        }\n    ],\n    \"customers_data\": [],\n    \"notifications\": []\n}"}],"_postman_id":"ffa9d153-1b00-4840-a89e-b7ef4741bfea"}],"id":"09a050f2-87dc-4b80-a1c5-43b99ab4fe10","description":"<p>Provides endpoints to fetch a summary of the authenticated user’s data, including roles, permissions, and general account metadata. These endpoints are useful for initializing frontend dashboards and personalizing user experiences after login.</p>\n","_postman_id":"09a050f2-87dc-4b80-a1c5-43b99ab4fe10","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}}},{"name":"User Preferences","item":[{"name":"Toggle email setting","id":"bac76d4c-f6e9-4cb0-8ae5-e4040d36ef90","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"url":"https://pos-padi-django-backend.onrender.com/api/v1/users/email-toggle-setting/","description":"<p>This endpoint allows a user to toggle their email setting.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["users","email-toggle-setting",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[]}},"response":[{"id":"a735f2ff-1e04-495c-862a-5fe65a1f6484","name":"Email settings updated successfully.","originalRequest":{"method":"PATCH","header":[{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"url":"{{baseUrl}}/users/email-toggle-setting/"},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"bac76d4c-f6e9-4cb0-8ae5-e4040d36ef90"},{"name":"Toggle push notification setting","id":"04944d2b-4dd2-4119-b774-3ea610c3b5ad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"url":"https://pos-padi-django-backend.onrender.com/api/v1/users/push-notification-setting/","description":"<p>This endpoint allows a user to toggle their push notification settings.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["users","push-notification-setting",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[]}},"response":[{"id":"c652d553-16dd-4bcd-b9f8-3950e84930c0","name":"Push notification settings updated successfully.","originalRequest":{"method":"PATCH","header":[{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"url":"{{baseUrl}}/users/push-notification-setting/"},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"04944d2b-4dd2-4119-b774-3ea610c3b5ad"},{"name":"Update user profile","id":"d7f9d52a-dcc6-4af1-a398-161915dd2d2f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"first_name\": \"<string>\",\n  \"last_name\": \"<string>\",\n  \"phone\": \"<string>\",\n  \"photo\": \"<binary>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://pos-padi-django-backend.onrender.com/api/v1/users/update-profile/","description":"<p>This endpoint allows a user to update their profile information.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["users","update-profile",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[]}},"response":[{"id":"c3a658c2-ecd9-47d1-b91b-273b793e2691","name":"Profile updated successfully.","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"body":{"mode":"raw","raw":"{\n  \"first_name\": \"<string>\",\n  \"last_name\": \"<string>\",\n  \"phone\": \"<string>\",\n  \"photo\": \"<binary>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/update-profile/"},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""},{"id":"edb3fdde-b3d9-4d92-afa3-bb92562bc07e","name":"Invalid data.","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"body":{"mode":"raw","raw":"{\n  \"first_name\": \"<string>\",\n  \"last_name\": \"<string>\",\n  \"phone\": \"<string>\",\n  \"photo\": \"<binary>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/update-profile/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"d7f9d52a-dcc6-4af1-a398-161915dd2d2f"}],"id":"a15a708e-b50a-4e85-bac5-18a20ad270be","_postman_id":"a15a708e-b50a-4e85-bac5-18a20ad270be","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}}}],"id":"833d4c28-b847-4afe-8bf7-0f138eaad31f","description":"<p>Contains endpoints related to user identity, access control, and account lifecycle management. This includes authentication flows (login, registration, password reset), email verification processes, and endpoints for retrieving key user data summaries. These APIs are essential for establishing secure user sessions and personalizing the platform experience.</p>\n","_postman_id":"833d4c28-b847-4afe-8bf7-0f138eaad31f","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}}},{"name":"Companies","item":[{"name":"Create New Company","id":"62aec5eb-1f57-4d17-bc12-cd6c23d0e1eb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"<string>\",\n  \"address\": \"<string>\",\n  \"state\": \"<string>\",\n  \"lga\": \"<string>\",\n  \"area\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://pos-padi-django-backend.onrender.com/api/v1djangoUrl}}/companies/","description":"<p>Creates a new company record on the POS-Padi platform. Companies represent business entities under which agents and terminals operate. Only users with the <code>owner</code> or <code>admin</code> role are authorized to perform this action.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Owner</strong>: Can register and manage their own company.</p>\n</li>\n<li><p><strong>Admin</strong>: Can create and manage companies across the platform.</p>\n</li>\n<li><p><strong>Agent</strong>: ❌ Not permitted to access this endpoint.</p>\n</li>\n</ul>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["companies",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1djangoUrl}}"],"query":[],"variable":[]}},"response":[{"id":"d08c03d5-5e4f-4be3-97ff-2072a642429c","name":"Company created successfully.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"<string>\",\n  \"address\": \"<string>\",\n  \"state\": \"<string>\",\n  \"lga\": \"<string>\",\n  \"area\": \"<string>\",\n  \"owner\": {\n    \"email\": \"<email>\",\n    \"first_name\": \"<string>\",\n    \"last_name\": \"<string>\",\n    \"phone\": \"+17185689075324\",\n    \"password\": \"<string>\",\n    \"nin\": \"<string>\"\n  }\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/companies/"},"status":"Created","code":201,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""},{"id":"20f82ab8-a1ee-46cb-aa96-dc93ac61fe6a","name":"Invalid data provided.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"<string>\",\n  \"address\": \"<string>\",\n  \"state\": \"<string>\",\n  \"lga\": \"<string>\",\n  \"area\": \"<string>\",\n  \"owner\": {\n    \"email\": \"<email>\",\n    \"first_name\": \"<string>\",\n    \"last_name\": \"<string>\",\n    \"phone\": \"+17185689075324\",\n    \"password\": \"<string>\",\n    \"nin\": \"<string>\"\n  }\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/companies/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"62aec5eb-1f57-4d17-bc12-cd6c23d0e1eb"},{"name":"Retrieve Company Details","id":"449c051a-9aee-4289-ad2c-82a3aad6d2d7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://pos-padi-django-backend.onrender.com/api/v1/companies/?search=<string>&ordering=<string>&page=<integer>","description":"<p>Fetches a list of companies on the POS-Padi platform. This endpoint supports pagination, sorting, and keyword-based search. Only <code>admin</code> and <code>owner</code> Roles can access this endpoint. Agents are not permitted.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Owner</strong>: Can retrieve only their own company details.</p>\n</li>\n<li><p><strong>Admin</strong>: Can retrieve any or all company records in the system.</p>\n</li>\n<li><p><strong>Agent</strong>: ❌ Access is restricted.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications-query-parameters\">🧾 Request Specifications (Query Parameters)</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>search</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>A search term to filter companies by name</td>\n</tr>\n<tr>\n<td><code>ordering</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Field to order results by (e.g., <code>name</code>, <code>state</code>)</td>\n</tr>\n<tr>\n<td><code>page</code></td>\n<td>Integer</td>\n<td>❌ No</td>\n<td>Page number for paginated results</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n</blockquote>\n<p>Example usage:<br /><code>https://pos-padi-django-backend.onrender.com/api/v1/companies/?search=mighty&amp;ordering=name&amp;page=2</code></p>\n<hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>403 Forbidden</strong> – User lacks permission</p>\n</li>\n<li><p><strong>400 Bad Request</strong> – Invalid query parameter</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Data retrieval failed</p>\n</li>\n</ul>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["companies",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[{"description":{"content":"<p>A search term.</p>\n","type":"text/plain"},"key":"search","value":"<string>"},{"description":{"content":"<p>Which field to use when ordering the results.</p>\n","type":"text/plain"},"key":"ordering","value":"<string>"},{"description":{"content":"<p>A page number within the paginated result set.</p>\n","type":"text/plain"},"key":"page","value":"<integer>"}],"variable":[]}},"response":[{"id":"4227b823-441f-46de-be2d-bb30d02c0c95","name":"List of companies retrieved successfully.","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"url":{"raw":"https://pos-padi-django-backend.onrender.com/api/v1/companies/?search=<string>&ordering=<string>&page=<integer>","host":["https://pos-padi-django-backend.onrender.com/api/v1"],"path":["companies",""],"query":[{"key":"search","value":"<string>","description":"A search term."},{"key":"ordering","value":"<string>","description":"Which field to use when ordering the results."},{"key":"page","value":"<integer>","description":"A page number within the paginated result set."}]}},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""},{"id":"1e4f81c2-e147-42ce-a139-2e95ca88bc19","name":"Permission denied.","originalRequest":{"method":"GET","header":[{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"url":{"raw":"{{baseUrl}}/companies/?search=<string>&ordering=<string>&page=<integer>","host":["{{baseUrl}}"],"path":["companies",""],"query":[{"description":"A search term.","key":"search","value":"<string>"},{"description":"Which field to use when ordering the results.","key":"ordering","value":"<string>"},{"description":"A page number within the paginated result set.","key":"page","value":"<integer>"}]}},"status":"Forbidden","code":403,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"449c051a-9aee-4289-ad2c-82a3aad6d2d7"},{"name":"Retrieve Company Metrics","id":"013072ae-7574-4fa4-8660-5ba503e23125","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://pos-padi-django-backend.onrender.com/api/v1/companies/dashboard/?start_date=<string>&end_date=<string>&agent_id=<string>","description":"<p>Returns summary performance metrics for a company, such as transaction volume, revenue, and activity distribution. This endpoint is typically used to power dashboards and business insights. Only users with the <code>owner</code> or <code>admin</code> role can access this data.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Owner</strong>: Can retrieve metrics for their own company and filter by individual agents.</p>\n</li>\n<li><p><strong>Admin</strong>: Can retrieve metrics for any company across the platform.</p>\n</li>\n<li><p><strong>Agent</strong>: ❌ Not permitted to access metrics.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications-query-parameters\">🧾 Request Specifications (Query Parameters)</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>start_date</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Start date for filtering metrics (<code>YYYY-MM-DD</code>)</td>\n</tr>\n<tr>\n<td><code>end_date</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>End date for filtering metrics (<code>YYYY-MM-DD</code>)</td>\n</tr>\n<tr>\n<td><code>agent_id</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Filter results by a specific agent ID</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n</blockquote>\n<p>Example usage:<br /><code>https://pos-padi-django-backend.onrender.com/api/v1/companies/metrics/?start_date=2024-01-01&amp;end_date=2024-03-01&amp;agent_id=agt_93b84</code></p>\n<hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>403 Forbidden</strong> – User lacks permission</p>\n</li>\n<li><p><strong>400 Bad Request</strong> – Invalid date format or query structure</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Error occurred while calculating metrics</p>\n</li>\n</ul>\n<hr />\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["companies","dashboard",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[{"description":{"content":"<p>Start date for filtering metrics (YYYY-MM-DD).</p>\n","type":"text/plain"},"key":"start_date","value":"<string>"},{"description":{"content":"<p>End date for filtering metrics (YYYY-MM-DD).</p>\n","type":"text/plain"},"key":"end_date","value":"<string>"},{"description":{"content":"<p>Agent ID for filtering metrics.</p>\n","type":"text/plain"},"key":"agent_id","value":"<string>"}],"variable":[]}},"response":[{"id":"892fd5b5-d577-4089-837f-ec8c2952511f","name":"Metrics retrieved successfully.","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"url":{"raw":"{{baseUrl}}/companies/dashboard/?start_date=<string>&end_date=<string>&agent_id=<string>","host":["{{baseUrl}}"],"path":["companies","dashboard",""],"query":[{"key":"start_date","value":"<string>","description":"Start date for filtering metrics (YYYY-MM-DD)."},{"key":"end_date","value":"<string>","description":"End date for filtering metrics (YYYY-MM-DD)."},{"key":"agent_id","value":"<string>","description":"Agent ID for filtering metrics."}]}},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Metrics retrieved successfully\",\n    \"data\": {\n        \"total_transactions\": 0,\n        \"total_successful\": 0,\n        \"total_failed\": 0,\n        \"total_amount\": 0.0,\n        \"total_agents\": 0,\n        \"total_customers\": 0,\n        \"top_agents\": []\n    }\n}"},{"id":"b6c98d57-94b1-4ae3-8f9b-65c6dba3ea0c","name":"Invalid date format or other errors.","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"url":{"raw":"{{baseUrl}}/companies/dashboard/?start_date=<string>&end_date=<string>&agent_id=<string>","host":["{{baseUrl}}"],"path":["companies","dashboard",""],"query":[{"key":"start_date","value":"<string>","description":"Start date for filtering metrics (YYYY-MM-DD)."},{"key":"end_date","value":"<string>","description":"End date for filtering metrics (YYYY-MM-DD)."},{"key":"agent_id","value":"<string>","description":"Agent ID for filtering metrics."}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Invalid date format\",\n    \"error\": \"Invalid date format. Use YYYY-MM-DD.\"\n}"},{"id":"124644df-47a3-488d-93e6-852b3ce1a54d","name":"Agent not found.","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"url":{"raw":"{{baseUrl}}/companies/dashboard/?start_date=<string>&end_date=<string>&agent_id=<string>","host":["{{baseUrl}}"],"path":["companies","dashboard",""],"query":[{"key":"start_date","value":"<string>","description":"Start date for filtering metrics (YYYY-MM-DD)."},{"key":"end_date","value":"<string>","description":"End date for filtering metrics (YYYY-MM-DD)."},{"key":"agent_id","value":"<string>","description":"Agent ID for filtering metrics."}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Agent not found\",\n    \"error\": \"Agent with the provided ID does not exist in this company.\"\n}"}],"_postman_id":"013072ae-7574-4fa4-8660-5ba503e23125"},{"name":"Update a Company","id":"085168e2-a4dd-437e-82c6-df05772481e3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"<string>\",\n  \"state\": \"<string>\",\n  \"lga\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://pos-padi-django-backend.onrender.com/api/v1/companies/:id/","description":"<p>Updates the details of an existing company on the POS-Padi platform. This endpoint is used to modify company-level information such as name, location, or administrative identifiers. Only users with the <code>owner</code> or <code>admin</code> role are authorized to make updates.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Owner</strong>: Can update their own company's details.</p>\n</li>\n<li><p><strong>Admin</strong>: Can update any company in the system.</p>\n</li>\n<li><p><strong>Agent</strong>: ❌ Not permitted to use this endpoint.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications\">🧾 Request Specifications</h4>\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>name</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>New company name</td>\n</tr>\n<tr>\n<td><code>state</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Updated state of operation</td>\n</tr>\n<tr>\n<td><code>lga</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Updated Local Government Area</td>\n</tr>\n<tr>\n<td><code>area</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Updated area or neighborhood</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n<p>⚠️ At least one field must be provided to trigger an update. </p>\n</blockquote>\n<hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>403 Forbidden</strong> – User lacks permission (agent role or not the company owner)</p>\n</li>\n<li><p><strong>404 Not Found</strong> – Company Name not found or not linked to user</p>\n</li>\n<li><p><strong>400 Bad Request</strong> – No valid fields provided or validation failed</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Error occurred while saving changes</p>\n</li>\n</ul>\n<hr />\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["companies",":id",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[{"description":{"content":"<p>(Required) A unique value identifying this company.</p>\n","type":"text/plain"},"type":"any","value":"<string>","key":"id"}]}},"response":[{"id":"ee5f4207-98d5-487e-89fe-3cf0f3f010de","name":"Company updated successfully.","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"<string>\",\n  \"state\": \"<string>\",\n  \"lga\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":{"raw":"{{baseUrl}}/companies/:id/","host":["{{baseUrl}}"],"path":["companies",":id",""],"variable":[{"key":"id"}]}},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""},{"id":"121e3a7b-3a8b-4a94-bbb9-6b57783e41ca","name":"Invalid data provided.","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"<string>\",\n  \"state\": \"<string>\",\n  \"lga\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":{"raw":"{{baseUrl}}/companies/:id/","host":["{{baseUrl}}"],"path":["companies",":id",""],"variable":[{"key":"id"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""},{"id":"cb663d44-572a-41c0-9206-751d9e4a9b5e","name":"Company not found.","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"<string>\",\n  \"state\": \"<string>\",\n  \"lga\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":{"raw":"{{baseUrl}}/companies/:id/","host":["{{baseUrl}}"],"path":["companies",":id",""],"variable":[{"key":"id"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"085168e2-a4dd-437e-82c6-df05772481e3"},{"name":"Delete a Company","id":"e795dd11-dd56-47b3-b9ea-7434b817266f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"https://pos-padi-django-backend.onrender.com/api/v1/companies/:id/","description":"<p>Deactivate a company from the POS-Padi platform using its unique ID. This action is irreversible and should be used with caution. Only users with the <code>admin</code> role are authorized to perform this operation.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Admin</strong>: Can delete any company in the system.</p>\n</li>\n<li><p><strong>Owner</strong>: ❌ Not permitted to delete companies.</p>\n</li>\n<li><p><strong>Agent</strong>: ❌ Not permitted to access this endpoint.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications-path-parameter\">🧾 Request Specifications (Path Parameter)</h4>\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>id</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>The unique ID of the company to delete</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n</blockquote>\n<p>Example: <code>https://pos-padi-django-backend.onrender.com/api/v1/companies/123e4567-e89b-12d3-a456-426614174000/</code></p>\n<hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>403 Forbidden</strong> – User does not have permission to delete companies</p>\n</li>\n<li><p><strong>404 Not Found</strong> – Company with the given ID does not exist</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Failed to process deletion request</p>\n</li>\n</ul>\n<hr />\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["companies",":id",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[{"description":{"content":"<p>(Required) A unique value identifying this company.</p>\n","type":"text/plain"},"type":"any","value":"<string>","key":"id"}]}},"response":[{"id":"5d2aa6a6-dfa5-4729-8496-8118ea781014","name":"Company deactivated successfully.","originalRequest":{"method":"DELETE","header":[{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"url":{"raw":"{{baseUrl}}/companies/:id/","host":["{{baseUrl}}"],"path":["companies",":id",""],"variable":[{"key":"id"}]}},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""},{"id":"ccf16a3f-c9eb-487d-80c5-3dccb5a3eacf","name":"Company not found.","originalRequest":{"method":"DELETE","header":[{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"url":{"raw":"{{baseUrl}}/companies/:id/","host":["{{baseUrl}}"],"path":["companies",":id",""],"variable":[{"key":"id"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"e795dd11-dd56-47b3-b9ea-7434b817266f"}],"id":"d2b83891-5e53-4aae-945e-95018745aaf7","description":"<p>Provides endpoints for managing business entities and their associated POS terminals. Only <strong>Owners</strong> and <strong>Admins</strong> are authorised to perform these actions, such as creating companies, registering terminals, assigning agents, and monitoring activity. These APIs support centralised business management and real-time oversight of terminal operations.</p>\n","_postman_id":"d2b83891-5e53-4aae-945e-95018745aaf7","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}}},{"name":"Agents","item":[{"name":"Create New Agent","id":"b35907a8-fbf8-4788-af02-5bf109c7e897","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"first_name\": \"Agent\",\n    \"last_name\": \"Agent\",\n    \"email\": \"agent1@test.com\",\n    \"phone\": \"+234000000000\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://pos-padi-django-backend.onrender.com/api/v1/agents/","description":"<p>Registers a new Agent under the authenticated user's company. This endpoint is used by Owners or Admins to onboard field agents and assign them to one or more terminals for transaction handling.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Owner</strong>: Can create agents within their own company.</p>\n</li>\n<li><p><strong>Admin</strong>: Can create agents under any company.</p>\n</li>\n<li><p><strong>Agent</strong>: ❌ Not authorized to perform this action.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications\">🧾 Request Specifications</h4>\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>first_name</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>Agent’s first name</td>\n</tr>\n<tr>\n<td><code>last_name</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>Agent’s last name</td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>Email address (must be unique)</td>\n</tr>\n<tr>\n<td><code>phone</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>Phone number of the agent</td>\n</tr>\n<tr>\n<td><code>assigned_terminal_id</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Terminal to assign the agent to (if applicable)</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n<p>&lt;p &gt;Additional metadata like address, gender, or NIN can be included depending on system configuration.&lt;/p&gt; </p>\n</blockquote>\n<hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>403 Forbidden</strong> – User lacks permission (e.g., agent role)</p>\n</li>\n<li><p><strong>400 Bad Request</strong> – Missing fields or email already exists</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Unexpected error while creating the agent</p>\n</li>\n</ul>\n<hr />\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["agents",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[]}},"response":[{"id":"c79a2dd9-0241-49dc-9c9b-dec318da85fa","name":"Agent created successfully.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"body":{"mode":"raw","raw":"{\n    \"first_name\": \"Agent\",\n    \"last_name\": \"Agent\",\n    \"email\": \"agent2@test.com\",\n    \"phone\": \"+234000000000\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://pos-padi-django-backend.onrender.com/api/v1/agents/"},"status":"Created","code":201,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"a1ee6364-0f54-43e7-b6f4-18894018d913\",\n    \"user_id\": {\n        \"email\": \"agent2@test.com\",\n        \"first_name\": \"Agent\",\n        \"last_name\": \"Agent\",\n        \"phone\": \"+234000000000\",\n        \"nin\": \"00000000000\",\n        \"role\": \"agent\",\n        \"photo\": null\n    },\n    \"created_at\": \"2025-04-23T16:36:59.621340Z\",\n    \"updated_at\": \"2025-04-23T16:36:59.625387Z\",\n    \"is_active\": true,\n    \"agent_id\": 373823,\n    \"commission\": \"0.100\",\n    \"rating\": \"0.0\",\n    \"status\": \"active\",\n    \"company\": \"5acdb442-d873-4aea-8ebd-6e006ee0e0a3\"\n}"},{"id":"d5a0080f-c243-420d-bfa0-cec514a19185","name":"Invalid data provided.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<email>\",\n  \"first_name\": \"<string>\",\n  \"last_name\": \"<string>\",\n  \"phone\": \"<string>\",\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/agents/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""},{"id":"1cc17892-dcf0-48d0-852d-aced29aa2546","name":"Permission denied.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<email>\",\n  \"first_name\": \"<string>\",\n  \"last_name\": \"<string>\",\n  \"phone\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/agents/"},"status":"Forbidden","code":403,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"b35907a8-fbf8-4788-af02-5bf109c7e897"},{"name":"Onboard Agent","id":"d324e4c0-0440-49b0-9292-71579ce306bb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"password\": \"Jonathan1@\",\n    \"confirm_password\": \"Jonathan1@\"\n}","options":{"raw":{"language":"json"}}},"url":"https://pos-padi-django-backend.onrender.com/api/v1/agents/onboard/?token=<jwt_token>","description":"<p>Finalizes the agent onboarding process by allowing the agent to set a password. This is typically used after an agent account is pre-created by an owner or admin, and the agent is given a link or instruction to complete registration.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>Not required – this is a public setup step typically performed once.</p>\n<hr />\n<h4 id=\"🧾-request-specifications\">🧾 Request Specifications</h4>\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>password</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>Desired password (must meet security rules)</td>\n</tr>\n<tr>\n<td><code>confirm_password</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>Must match the <code>password</code> field</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n<p>&lt;p &gt;This request is generally tied to a tokenized URL or context to associate the agent with their pending profile.&lt;/p&gt; </p>\n</blockquote>\n<hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>400 Bad Request</strong> – Passwords do not match or are too weak</p>\n</li>\n<li><p><strong>410 Gone</strong> – Onboarding token/session has expired</p>\n</li>\n<li><p><strong>404 Not Found</strong> – No pending agent account found for onboarding</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Unexpected failure during account activation</p>\n</li>\n</ul>\n<hr />\n","urlObject":{"path":["agents","onboard",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[{"key":"token","value":"<jwt_token>"}],"variable":[]}},"response":[{"id":"16dfe144-c010-4db5-b0e8-8b81f0b207ac","name":"Onboard Agent","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"password\": \"Jonathan1@\",\n    \"confirm_password\": \"Jonathan1@\"\n}","options":{"raw":{"language":"json"}}},"url":"https://pos-padi-django-backend.onrender.com/api/v1/agents/onboard/"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Password set successfully. You can now log in.\"\n}"}],"_postman_id":"d324e4c0-0440-49b0-9292-71579ce306bb"},{"name":"Login Agent","event":[{"listen":"test","script":{"id":"9d3642e2-b53d-43bc-9064-999b83c9bebc","exec":["// Save auth token from login response\r","const response = pm.response.json();\r","\r","// Test for successful status code\r","pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","// Test for presence of access token\r","pm.test(\"Access token exists in the response\", function () {\r","    pm.expect(response.access).to.exist;\r","});\r","\r","// Test for presence of refresh token\r","pm.test(\"Refresh token exists in the response\", function () {\r","    pm.expect(response.refresh).to.exist;\r","});\r","\r","if (response.access) {\r","    pm.collectionVariables.set(\"authToken\", response.access);\r","    console.log(response.access);\r","    console.log(\"✅ Auth token stored in collection variables.\");\r","} else {\r","    console.warn(\"⚠️ Access token not found in login response.\");\r","}\r","\r","if (response.refresh) {\r","    pm.collectionVariables.set(\"refreshToken\", response.refresh);\r","    console.log(response.refresh);\r","    console.log(\"✅ Refresh token stored in collection variables.\");\r","} else {\r","    console.warn(\"⚠️ Refresh token not found in login response.\");\r","}"],"type":"text/javascript","packages":{}}}],"id":"dec1c36c-f039-4028-8b1b-d0fd2fb4a0ab","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"owner1@test.com\",\n  \"password\": \"Jonathan1@\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://pos-padi-django-backend.onrender.com/api/v1/users/login/","description":"<p>Authenticates an onboarded Agent and returns a JWT token used for accessing protected resources. Returns access and refresh tokens. This token must be included in the <code>Authorization</code> header of all subsequent requests.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>Not required</p>\n<hr />\n<h4 id=\"🧾-request-specifications\">🧾 Request Specifications</h4>\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>email</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>The registered and verified email address</td>\n</tr>\n<tr>\n<td><code>password</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>User’s password</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>400 Bad Request</strong> – Invalid email or password</p>\n</li>\n<li><p><strong>403 Forbidden</strong> – Account not yet verified</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Unexpected server issue during login</p>\n</li>\n</ul>\n<hr />\n","urlObject":{"path":["users","login",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[]}},"response":[{"id":"9556889b-7def-4a81-8acf-6caf772ed23c","name":"Login successful. Returns access and refresh tokens.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<email>\",\n  \"password\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/login/"},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"refresh\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTc2MDg4Njk3NCwiaWF0IjoxNzQ1MzM0OTc0LCJqdGkiOiI2MDE2MWVmOTU0MmM0OTBiODcxMzI3MWViOWY3NWFiOSIsInVzZXJfaWQiOiI5MzdiZjMwOC03OTI5LTRlMDEtODA1MC01NmQ2YTY4MzUwODcifQ.yeKU5bSIYV5RqIbP8iTFjTCrAgTvnHt70MXXfVVcRB0\",\n    \"access\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzQ1OTM5Nzc0LCJpYXQiOjE3NDUzMzQ5NzQsImp0aSI6IjMzM2ZiNzc4OGFiZTQ0YjY5OTQ4NTE3ODE0MzgxMWNkIiwidXNlcl9pZCI6IjkzN2JmMzA4LTc5MjktNGUwMS04MDUwLTU2ZDZhNjgzNTA4NyIsInJvbGUiOiJvd25lciJ9.4Xb23yAwh1oh0vdn6FQJjTLjUQbQlYlWybwK6Gq4LIs\"\n}"},{"id":"e97ffb1e-e5e3-48cd-9ed8-41493cb5419c","name":"Invalid credentials.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"<email>\",\n  \"password\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/users/login/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"non_field_errors\": [\n        \"Invalid email or password.\"\n    ]\n}"}],"_postman_id":"dec1c36c-f039-4028-8b1b-d0fd2fb4a0ab"},{"name":"Activate/Deactivate Agent","id":"3bb467e4-8740-42b8-a212-40376f5de196","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"url":"https://pos-padi-django-backend.onrender.com/api/v1/agents/:id/","description":"<p>Updates the status of an agent.<br />Each request inverts the status of the specified agent; Active/Inactive</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["agents",":id",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[{"description":{"content":"<p>A unique value identifying this agent.</p>\n","type":"text/plain"},"type":"any","value":"<string>","key":"id"}]}},"response":[],"_postman_id":"3bb467e4-8740-42b8-a212-40376f5de196"},{"name":"List All Agents","id":"031a85f7-eb93-4ab8-896d-53d923732d0a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://pos-padi-django-backend.onrender.com/api/v1/agents/?search=<string>&ordering=<string>&page=<integer>","description":"<p>Retrieves a paginated list of agents associated with the authenticated user’s company. Supports basic search and ordering functionality. Only <code>owner</code> and <code>admin</code> roles can access this endpoint.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Owner</strong>: Retrieves agents linked to their own company.</p>\n</li>\n<li><p><strong>Admin</strong>: Retrieves all agents across the platform.</p>\n</li>\n<li><p><strong>Agent</strong>: ❌ Not authorized to access this endpoint.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications-query-parameters\">🧾 Request Specifications (Query Parameters)</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>search</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Filter agents by name, phone, or email</td>\n</tr>\n<tr>\n<td><code>ordering</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Order results by a field (e.g., <code>first_name</code>)</td>\n</tr>\n<tr>\n<td><code>page</code></td>\n<td>Integer</td>\n<td>❌ No</td>\n<td>Paginate through the result set</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n</blockquote>\n<p>Example: <code>https://pos-padi-django-backend.onrender.com/api/v1/agents/?search=Grace&amp;page=2&amp;ordering=first_name</code></p>\n<hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>403 Forbidden</strong> – Insufficient permission (agent role)</p>\n</li>\n<li><p><strong>400 Bad Request</strong> – Invalid query parameters</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Failed to retrieve agent data</p>\n</li>\n</ul>\n<hr />\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["agents",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[{"description":{"content":"<p>A search term.</p>\n","type":"text/plain"},"key":"search","value":"<string>"},{"description":{"content":"<p>Which field to use when ordering the results.</p>\n","type":"text/plain"},"key":"ordering","value":"<string>"},{"description":{"content":"<p>A page number within the paginated result set.</p>\n","type":"text/plain"},"key":"page","value":"<integer>"}],"variable":[]}},"response":[{"id":"b1765b17-c241-4296-927c-0650ef2534eb","name":"List of agents retrieved successfully.","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"url":{"raw":"{{baseUrl}}/agents/?search=<string>&ordering=<string>&page=<integer>","host":["{{baseUrl}}"],"path":["agents",""],"query":[{"key":"search","value":"<string>","description":"A search term."},{"key":"ordering","value":"<string>","description":"Which field to use when ordering the results."},{"key":"page","value":"<integer>","description":"A page number within the paginated result set."}]}},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"\"count\": 9,\n    \"next\": null,\n    \"previous\": null,\n    \"results\": [\n        {\n            \"id\": \"b982853e-c95d-4a49-beb1-380780884845\",\n            \"user_id\": {\n                \"email\": \"agent4@test.com\",\n                \"first_name\": \"Agent\",\n                \"last_name\": \"Agent\",\n                \"phone\": \"+234000000000\",\n                \"nin\": \"00000000000\",\n                \"role\": \"agent\",\n                \"photo\": null\n            },\n            \"created_at\": \"2025-04-23T18:03:08.609030Z\",\n            \"updated_at\": \"2025-04-23T18:03:08.611961Z\",\n            \"is_active\": true,\n            \"agent_id\": \"123348\",\n            \"commission\": \"0.100\",\n            \"rating\": \"0.0\",\n            \"status\": \"active\",\n            \"company\": \"5acdb442-d873-4aea-8ebd-6e006ee0e0a3\"\n        },\n        {\n            \"id\": \"e96bafa3-c080-4003-8a94-b9a768cc8c63\",\n            \"user_id\": {\n                \"email\": \"agent3@test.com\",\n                \"first_name\": \"Agent\",\n                \"last_name\": \"Agent\",\n                \"phone\": \"+234000000000\",\n                \"nin\": \"00000000000\",\n                \"role\": \"agent\",\n                \"photo\": null\n            },\n            \"created_at\": \"2025-04-23T18:01:34.889634Z\",\n            \"updated_at\": \"2025-04-23T18:01:34.894484Z\",\n            \"is_active\": true,\n            \"agent_id\": \"276607\",\n            \"commission\": \"0.100\",\n            \"rating\": \"0.0\",\n            \"status\": \"active\",\n            \"company\": \"5acdb442-d873-4aea-8ebd-6e006ee0e0a3\"\n        },\n        {\n            \"id\": \"42d90137-6e86-4efa-b873-f068f530b948\",\n            \"user_id\": {\n                \"email\": \"agent5@test.com\",\n                \"first_name\": \"Agent\",\n                \"last_name\": \"Agent\",\n                \"phone\": \"+234000000000\",\n                \"nin\": \"00000000000\",\n                \"role\": \"agent\",\n                \"photo\": null\n            },\n            \"created_at\": \"2025-04-23T18:27:42.712519Z\",\n            \"updated_at\": \"2025-04-23T18:27:42.714773Z\",\n            \"is_active\": true,\n            \"agent_id\": \"278799\",\n            \"commission\": \"0.100\",\n            \"rating\": \"0.0\",\n            \"status\": \"active\",\n            \"company\": \"5acdb442-d873-4aea-8ebd-6e006ee0e0a3\"\n        },\n        {\n            \"id\": \"a1ee6364-0f54-43e7-b6f4-18894018d913\",\n            \"user_id\": {\n                \"email\": \"agent2@test.com\",\n                \"first_name\": \"Agent\",\n                \"last_name\": \"Agent\",\n                \"phone\": \"+234000000000\",\n                \"nin\": \"00000000000\",\n                \"role\": \"agent\",\n                \"photo\": null\n            },\n            \"created_at\": \"2025-04-23T16:36:59.621340Z\",\n            \"updated_at\": \"2025-04-23T16:36:59.625387Z\",\n            \"is_active\": true,\n            \"agent_id\": \"373823\",\n            \"commission\": \"0.100\",\n            \"rating\": \"0.0\",\n            \"status\": \"active\",\n            \"company\": \"5acdb442-d873-4aea-8ebd-6e006ee0e0a3\"\n        },\n        {\n            \"id\": \"f2378e10-468b-483d-a43e-1fa109301d13\",\n            \"user_id\": {\n                \"email\": \"agent7@test.com\",\n                \"first_name\": \"Agent\",\n                \"last_name\": \"Agent\",\n                \"phone\": \"+234000000000\",\n                \"nin\": \"00000000000\",\n                \"role\": \"agent\",\n                \"photo\": null\n            },\n            \"created_at\": \"2025-04-23T18:38:12.779738Z\",\n            \"updated_at\": \"2025-04-23T18:38:12.782444Z\",\n            \"is_active\": true,\n            \"agent_id\": \"392220\",\n            \"commission\": \"0.100\",\n            \"rating\": \"0.0\",\n            \"status\": \"active\",\n            \"company\": \"5acdb442-d873-4aea-8ebd-6e006ee0e0a3\"\n        },\n        {\n            \"id\": \"76f666ef-c936-4274-954d-09af9022106a\",\n            \"user_id\": {\n                \"email\": \"agent9@test.com\",\n                \"first_name\": \"Agent\",\n                \"last_name\": \"Agent\",\n                \"phone\": \"+234000000000\",\n                \"nin\": \"00000000000\",\n                \"role\": \"agent\",\n                \"photo\": null\n            },\n            \"created_at\": \"2025-04-23T18:57:02.001367Z\",\n            \"updated_at\": \"2025-04-23T18:57:02.003551Z\",\n            \"is_active\": true,\n            \"agent_id\": \"411276\",\n            \"commission\": \"0.100\",\n            \"rating\": \"0.0\",\n            \"status\": \"active\",\n            \"company\": \"5acdb442-d873-4aea-8ebd-6e006ee0e0a3\"\n        },\n        {\n            \"id\": \"8e475ef8-ffc7-4b43-8ff6-74d50721e4fd\",\n            \"user_id\": {\n                \"email\": \"agent6@test.com\",\n                \"first_name\": \"Agent\",\n                \"last_name\": \"Agent\",\n                \"phone\": \"+234000000000\",\n                \"nin\": \"00000000000\",\n                \"role\": \"agent\",\n                \"photo\": null\n            },\n            \"created_at\": \"2025-04-23T18:33:58.613140Z\",\n            \"updated_at\": \"2025-04-23T18:33:58.615029Z\",\n            \"is_active\": true,\n            \"agent_id\": \"469869\",\n            \"commission\": \"0.100\",\n            \"rating\": \"0.0\",\n            \"status\": \"active\",\n            \"company\": \"5acdb442-d873-4aea-8ebd-6e006ee0e0a3\"\n        },\n        {\n            \"id\": \"173ce71c-1a93-4e5d-823c-a0aa95eee945\",\n            \"user_id\": {\n                \"email\": \"agent1@test.com\",\n                \"first_name\": \"Agent\",\n                \"last_name\": \"Agent\",\n                \"phone\": \"+234000000000\",\n                \"nin\": \"00000000000\",\n                \"role\": \"agent\",\n                \"photo\": null\n            },\n            \"created_at\": \"2025-04-19T09:04:27.031230Z\",\n            \"updated_at\": \"2025-04-19T09:04:27.033905Z\",\n            \"is_active\": true,\n            \"agent_id\": \"726244\",\n            \"commission\": \"0.100\",\n            \"rating\": \"0.0\",\n            \"status\": \"inactive\",\n            \"company\": \"5acdb442-d873-4aea-8ebd-6e006ee0e0a3\"\n        },\n        {\n            \"id\": \"cf9233b6-e525-425f-bc0a-e8365366a068\",\n            \"user_id\": {\n                \"email\": \"agent8@test.com\",\n                \"first_name\": \"Agent\",\n                \"last_name\": \"Agent\",\n                \"phone\": \"+234000000000\",\n                \"nin\": \"00000000000\",\n                \"role\": \"agent\",\n                \"photo\": null\n            },\n            \"created_at\": \"2025-04-23T18:41:29.142938Z\",\n            \"updated_at\": \"2025-04-23T18:41:29.147353Z\",\n            \"is_active\": true,\n            \"agent_id\": \"860377\",\n            \"commission\": \"0.100\",\n            \"rating\": \"0.0\",\n            \"status\": \"active\",\n            \"company\": \"5acdb442-d873-4aea-8ebd-6e006ee0e0a3\"\n        }\n    ]\n}"},{"id":"e2abd3aa-a0c9-40a6-81ce-ee697b8cf3e1","name":"Agent created successfully.","originalRequest":{"method":"GET","header":[{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"url":{"raw":"{{baseUrl}}/agents/?search=<string>&ordering=<string>&page=<integer>","host":["{{baseUrl}}"],"path":["agents",""],"query":[{"description":"A search term.","key":"search","value":"<string>"},{"description":"Which field to use when ordering the results.","key":"ordering","value":"<string>"},{"description":"A page number within the paginated result set.","key":"page","value":"<integer>"}]}},"status":"Created","code":201,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""},{"id":"5f74b1a8-8bdf-41bb-bcb0-f9d51c299d0a","name":"Invalid data provided.","originalRequest":{"method":"GET","header":[{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"url":{"raw":"{{baseUrl}}/agents/?search=<string>&ordering=<string>&page=<integer>","host":["{{baseUrl}}"],"path":["agents",""],"query":[{"description":"A search term.","key":"search","value":"<string>"},{"description":"Which field to use when ordering the results.","key":"ordering","value":"<string>"},{"description":"A page number within the paginated result set.","key":"page","value":"<integer>"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""},{"id":"183f4a63-fc2e-4982-93d8-515d033c1f03","name":"Permission denied.","originalRequest":{"method":"GET","header":[{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"url":{"raw":"{{baseUrl}}/agents/?search=<string>&ordering=<string>&page=<integer>","host":["{{baseUrl}}"],"path":["agents",""],"query":[{"description":"A search term.","key":"search","value":"<string>"},{"description":"Which field to use when ordering the results.","key":"ordering","value":"<string>"},{"description":"A page number within the paginated result set.","key":"page","value":"<integer>"}]}},"status":"Forbidden","code":403,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"031a85f7-eb93-4ab8-896d-53d923732d0a"},{"name":"Retrieve an Agent","id":"bbb63be4-8de4-40bb-a90f-a609d2c3e5ab","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://pos-padi-django-backend.onrender.com/api/v1/agents/:id/","description":"<p>Fetches the details of a specific agent using their unique ID. This endpoint is used to display agent profiles, status, or assignments. Only accessible to users with the <code>owner</code> or <code>admin</code> role.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Owner</strong>: Can retrieve agents assigned to their own company only.</p>\n</li>\n<li><p><strong>Admin</strong>: Can retrieve any agent on the platform.</p>\n</li>\n<li><p><strong>Agent</strong>: ❌ Cannot access this endpoint.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications-path-parameter\">🧾 Request Specifications (Path Parameter)</h4>\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>id</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>The unique ID of the agent</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n</blockquote>\n<p>Example: <code>https://pos-padi-django-backend.onrender.com/api/v1/agents/507f191e810c19729de860ea/</code></p>\n<hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>403 Forbidden</strong> – Accessing an agent not linked to your company</p>\n</li>\n<li><p><strong>404 Not Found</strong> – Agent with the given ID does not exist</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Unexpected server issue</p>\n</li>\n</ul>\n<hr />\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["agents",":id",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[{"description":{"content":"<p>(Required) A unique value identifying this agent.</p>\n","type":"text/plain"},"type":"any","value":"<string>","key":"id"}]}},"response":[{"id":"7ece40f1-b7da-4d2b-8056-df97314cd62b","name":"Agent details retrieved successfully.","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/agents/173ce71c-1a93-4e5d-823c-a0aa95eee945/"},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"173ce71c-1a93-4e5d-823c-a0aa95eee945\",\n    \"user_id\": {\n        \"email\": \"agent1@test.com\",\n        \"first_name\": \"Agent\",\n        \"last_name\": \"Agent\",\n        \"phone\": \"+234000000000\",\n        \"nin\": \"00000000000\",\n        \"role\": \"agent\",\n        \"photo\": null\n    },\n    \"created_at\": \"2025-04-19T09:04:27.031230Z\",\n    \"updated_at\": \"2025-04-19T09:04:27.033905Z\",\n    \"is_active\": true,\n    \"agent_id\": \"726244\",\n    \"commission\": \"0.100\",\n    \"rating\": \"0.0\",\n    \"status\": \"inactive\",\n    \"company\": \"5acdb442-d873-4aea-8ebd-6e006ee0e0a3\"\n}"},{"id":"604f458b-55a9-4dea-b4cb-ac8e38a79c19","name":"Agent not found.","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Basic <credentials>","description":"Added as a part of security scheme: basic"}],"url":{"raw":"{{baseUrl}}/agents/:id/","host":["{{baseUrl}}"],"path":["agents",":id",""],"variable":[{"key":"id","value":""}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"detail\": \"No Agent matches the given query.\"\n}"}],"_postman_id":"bbb63be4-8de4-40bb-a90f-a609d2c3e5ab"}],"id":"2807528e-c53f-4fa6-b020-dc28d37c90a0","description":"<p>Provides control over POS agents. Includes endpoints for onboarding, managing, or removing agents, as well as fetching detailed agent data.</p>\n","_postman_id":"2807528e-c53f-4fa6-b020-dc28d37c90a0","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}}},{"name":"Customers","item":[{"name":"Create a Customer","id":"2ac70f11-1d84-45f2-91fd-71db44ccc7f0","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{}},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"description":"<p>(Required) </p>\n","key":"first_name","value":"Jonathan","type":"text"},{"key":"last_name","value":"Mensah","description":"<p>(Required) </p>\n","type":"text","uuid":"cfbc55bb-4f7c-4773-8c57-5048ccbc82a1"},{"key":"email","type":"text","description":"<p>(Required)</p>\n","value":"customer11@test.com"},{"key":"phone","value":"1234567890","type":"text","uuid":"c6dcb86f-aac5-4e2c-aeab-e2b2c6f53f3b"}]},"url":"https://pos-padi-django-backend.onrender.com/api/v1/customers/","description":"<p>Creates a new customer profile linked to the authenticated user. This enables agents and owners to associate transactions with specific customers and improve engagement and service quality.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Agent</strong>: Can create customers for personal use and transaction history.</p>\n</li>\n<li><p><strong>Owner</strong>: Can create customers on behalf of agents or for direct use.</p>\n</li>\n<li><p><strong>Admin</strong>: ❌ Typically not involved in customer creation.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications\">🧾 Request Specifications</h4>\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>first_name</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>Customer's first name</td>\n</tr>\n<tr>\n<td><code>last_name</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>Customer's last name</td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Optional email address</td>\n</tr>\n<tr>\n<td><code>phone</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>Customer’s phone number</td>\n</tr>\n<tr>\n<td><code>photo</code></td>\n<td>String (URL/base64)</td>\n<td>❌ No</td>\n<td>Optional profile image or avatar</td>\n</tr>\n<tr>\n<td><code>tag</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Custom label for customer (e.g., VIP, Inactive)</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>400 Bad Request</strong> – Missing required fields or invalid phone/email format</p>\n</li>\n<li><p><strong>409 Conflict</strong> – Customer with phone/email already exists for user</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Failure while creating customer record</p>\n</li>\n</ul>\n<hr />\n","urlObject":{"path":["customers",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[]}},"response":[{"id":"30ece9d3-2628-4f1d-8d10-3d449b758746","name":"Customer created successfully.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"multipart/form-data"},{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"body":{"mode":"formdata","formdata":[{"description":"(Required) ","key":"user","value":"<string>","type":"text"},{"description":"(Required) ","key":"name","value":"<string>","type":"text"},{"key":"photo","type":"file","src":[]},{"description":"Customer classification for segmentation (This can only be one of vip,frequent,regular,inactive)","key":"tag","value":"inactive","type":"text"}]},"url":"{{baseUrl}}/customers/"},"status":"Created","code":201,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""},{"id":"217966a5-06d8-4dd0-8934-867d787e3bf5","name":"Invalid data provided.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"multipart/form-data"},{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"body":{"mode":"formdata","formdata":[{"description":"(Required) ","key":"user","value":"<string>","type":"text"},{"description":"(Required) ","key":"name","value":"<string>","type":"text"},{"key":"photo","type":"file","src":[]},{"description":"Customer classification for segmentation (This can only be one of vip,frequent,regular,inactive)","key":"tag","value":"inactive","type":"text"}]},"url":"{{baseUrl}}/customers/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"2ac70f11-1d84-45f2-91fd-71db44ccc7f0"},{"name":"Retrieve a Customer","id":"3cdb8e2c-4f71-4162-b415-9e6fd19b4fff","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://pos-padi-django-backend.onrender.com/api/v1/customers/:id/","description":"<p>Fetches the profile of a specific customer using their unique ID. Useful for viewing customer details, tags, and transaction history.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Agent</strong>: Can retrieve customers they created.</p>\n</li>\n<li><p><strong>Owner</strong>: Can retrieve all customers within their company.</p>\n</li>\n<li><p><strong>Admin</strong>: ❌ Not permitted to access individual customer records.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications-path-parameter\">🧾 Request Specifications (Path Parameter)</h4>\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>id</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>The unique ID of the customer</td>\n</tr>\n</tbody>\n</table>\n</div><p>Example: <code>https://pos-padi-django-backend.onrender.com/api/v1/customers/649f3a1be6b8e/</code></p>\n<hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>403 Forbidden</strong> – Attempt to access a customer outside the user's scope</p>\n</li>\n<li><p><strong>404 Not Found</strong> – Customer ID not found</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Unexpected error during retrieval</p>\n</li>\n</ul>\n<hr />\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["customers",":id",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[{"description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"<string>","key":"id"}]}},"response":[{"id":"3ea109f6-90bd-4a3d-90f3-54746ad793e9","name":"Customer details retrieved successfully.","originalRequest":{"method":"GET","header":[{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"url":{"raw":"{{baseUrl}}/customers/:id/","host":["{{baseUrl}}"],"path":["customers",":id",""],"variable":[{"key":"id"}]}},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""},{"id":"8fd7587e-9999-4427-9790-96e562654de2","name":"Customer not found.","originalRequest":{"method":"GET","header":[{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"url":{"raw":"{{baseUrl}}/customers/:id/","host":["{{baseUrl}}"],"path":["customers",":id",""],"variable":[{"key":"id"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"3cdb8e2c-4f71-4162-b415-9e6fd19b4fff"},{"name":"Update a Customer","id":"7c8e30fb-90d8-40ab-b7c4-d210edd63a6a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"multipart/form-data"}],"body":{"mode":"formdata","formdata":[{"description":"<p>(Required) </p>\n","key":"user","value":"<string>","type":"text"},{"description":"<p>(Required) </p>\n","key":"name","value":"<string>","type":"text"},{"key":"photo","type":"file","value":null},{"description":"<p>Customer classification for segmentation (This can only be one of vip,frequent,regular,inactive)</p>\n","key":"tag","value":"vip","type":"text"}]},"url":"https://pos-padi-django-backend.onrender.com/api/v1/customers/:id/","description":"<p>Updates one or more fields of an existing customer’s profile. Used for correcting records, updating tags, or modifying contact details.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Agent</strong>: Can update only their own customers.</p>\n</li>\n<li><p><strong>Owner</strong>: Can update any customer associated with their agents or company.</p>\n</li>\n<li><p><strong>Admin</strong>: ❌ Not permitted to update customer records.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications-path--json-body\">🧾 Request Specifications (Path + JSON Body)</h4>\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>id</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>The unique ID of the customer</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>JSON Body (Any field can be updated):</strong></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>first_name</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>New first name</td>\n</tr>\n<tr>\n<td><code>last_name</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>New last name</td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Updated email</td>\n</tr>\n<tr>\n<td><code>phone</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Updated phone number</td>\n</tr>\n<tr>\n<td><code>photo</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>New profile image (URL or base64)</td>\n</tr>\n<tr>\n<td><code>tag</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Updated tag (e.g., VIP, Inactive)</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>403 Forbidden</strong> – User attempting to update a customer they don't own</p>\n</li>\n<li><p><strong>404 Not Found</strong> – Customer not found</p>\n</li>\n<li><p><strong>400 Bad Request</strong> – Invalid update payload</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Update failed</p>\n</li>\n</ul>\n<hr />\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["customers",":id",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[{"description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"<string>","key":"id"}]}},"response":[{"id":"36afc270-6571-4af8-81f4-9bc43fa82962","name":"Customer updated successfully.","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"multipart/form-data"},{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"body":{"mode":"formdata","formdata":[{"description":"(Required) ","key":"user","value":"<string>","type":"text"},{"description":"(Required) ","key":"name","value":"<string>","type":"text"},{"key":"photo","type":"file","src":[]},{"description":"Customer classification for segmentation (This can only be one of vip,frequent,regular,inactive)","key":"tag","value":"vip","type":"text"}]},"url":{"raw":"{{baseUrl}}/customers/:id/","host":["{{baseUrl}}"],"path":["customers",":id",""],"variable":[{"key":"id"}]}},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""},{"id":"f42c6dda-6a1a-4f36-89bd-a184e8a8759a","name":"Invalid data provided.","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"multipart/form-data"},{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"body":{"mode":"formdata","formdata":[{"description":"(Required) ","key":"user","value":"<string>","type":"text"},{"description":"(Required) ","key":"name","value":"<string>","type":"text"},{"key":"photo","type":"file","src":[]},{"description":"Customer classification for segmentation (This can only be one of vip,frequent,regular,inactive)","key":"tag","value":"vip","type":"text"}]},"url":{"raw":"{{baseUrl}}/customers/:id/","host":["{{baseUrl}}"],"path":["customers",":id",""],"variable":[{"key":"id"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""},{"id":"3a43638d-d3c3-4d6b-89b6-fb7f21744d89","name":"Customer not found.","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"multipart/form-data"},{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"body":{"mode":"formdata","formdata":[{"description":"(Required) ","key":"user","value":"<string>","type":"text"},{"description":"(Required) ","key":"name","value":"<string>","type":"text"},{"key":"photo","type":"file","src":[]},{"description":"Customer classification for segmentation (This can only be one of vip,frequent,regular,inactive)","key":"tag","value":"vip","type":"text"}]},"url":{"raw":"{{baseUrl}}/customers/:id/","host":["{{baseUrl}}"],"path":["customers",":id",""],"variable":[{"key":"id"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"7c8e30fb-90d8-40ab-b7c4-d210edd63a6a"},{"name":"Delete a Customer","id":"20c3bd4e-85e5-4fff-8b47-787785bc0dd4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"https://pos-padi-django-backend.onrender.com/api/v1/customers/:id/","description":"<p>Deletes a specific customer record by ID. This is a hard delete and should be used with caution. Only allowed for customers created by the authenticated user or those under their supervision.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Agent</strong>: Can delete only their own customers.</p>\n</li>\n<li><p><strong>Owner</strong>: Can delete any customer under their company.</p>\n</li>\n<li><p><strong>Admin</strong>: ❌ Not permitted to delete customers.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications-path-parameter\">🧾 Request Specifications (Path Parameter)</h4>\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>id</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>The unique ID of the customer</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>403 Forbidden</strong> – Attempt to delete a customer outside the user’s scope</p>\n</li>\n<li><p><strong>404 Not Found</strong> – No customer with the specified ID exists</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Failed to process deletion</p>\n</li>\n</ul>\n<hr />\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["customers",":id",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[{"description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"<string>","key":"id"}]}},"response":[{"id":"c2c6f76c-ab10-4a0b-928c-927c20bf8424","name":"Customer deleted successfully.","originalRequest":{"method":"DELETE","header":[{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"url":{"raw":"{{baseUrl}}/customers/:id/","host":["{{baseUrl}}"],"path":["customers",":id",""],"variable":[{"key":"id"}]}},"status":"No Content","code":204,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""},{"id":"02c9db9c-cb91-43c5-9d4a-edc064506bad","name":"Customer not found.","originalRequest":{"method":"DELETE","header":[{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"url":{"raw":"{{baseUrl}}/customers/:id/","host":["{{baseUrl}}"],"path":["customers",":id",""],"variable":[{"key":"id"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"20c3bd4e-85e5-4fff-8b47-787785bc0dd4"},{"name":"Customer Transactions","id":"6e406661-8cd3-472a-919c-1ff49a9f33e0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"https://pos-padi-django-backend.onrender.com/api/v1/customers/:id/transactions/","description":"<p>Returns a paginated list of all transactions associated with a specific customer. Useful for viewing a customer's transaction history for service follow-up, reporting, or CRM insights.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Agent</strong>: Can only fetch transactions for their own customers.</p>\n</li>\n<li><p><strong>Owner</strong>: Can access customer transactions under their company.</p>\n</li>\n<li><p><strong>Admin</strong>: ❌ Not permitted to access customer-level transaction data.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications-path-parameter\">🧾 Request Specifications (Path Parameter)</h4>\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>id</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>The unique ID of the customer</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Optional Query Parameters:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>page</code></td>\n<td>Integer</td>\n<td>❌ No</td>\n<td>Paginate through transaction results</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n</blockquote>\n<p>Example: <code>https://pos-padi-django-backend.onrender.com/api/v1/customers/abc123/transactions/?page=2</code></p>\n<hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>403 Forbidden</strong> – Accessing a customer outside your scope</p>\n</li>\n<li><p><strong>404 Not Found</strong> – Customer does not exist</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Failure fetching transaction history</p>\n</li>\n</ul>\n<hr />\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["customers",":id","transactions",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[{"description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"<string>","key":"id"}]}},"response":[{"id":"60a59419-517c-4ee0-bc43-85060afe2653","name":"Untitled Response","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"},{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"url":{"raw":"{{baseUrl}}/customers/:id/transactions/","host":["{{baseUrl}}"],"path":["customers",":id","transactions",""],"variable":[{"key":"id"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"[\n  {\n    \"id\": \"<string>\",\n    \"amount\": \"<string>\",\n    \"fee\": \"<string>\",\n    \"type\": \"<string>\",\n    \"status\": \"failed\",\n    \"status_display\": \"<string>\",\n    \"created_at\": \"<dateTime>\"\n  },\n  {\n    \"id\": \"<string>\",\n    \"amount\": \"<string>\",\n    \"fee\": \"<string>\",\n    \"type\": \"<string>\",\n    \"status\": \"failed\",\n    \"status_display\": \"<string>\",\n    \"created_at\": \"<dateTime>\"\n  }\n]"}],"_postman_id":"6e406661-8cd3-472a-919c-1ff49a9f33e0"},{"name":"Customer Transaction Summary","id":"eb04b049-2034-44b6-a901-faf5b754b9cb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"https://pos-padi-django-backend.onrender.com/api/v1/customers/:id/transaction_summary/","description":"<p>Returns a summarized breakdown of all transactions linked to a specific customer — including total count, value, and categorized performance metrics.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Agent</strong>: Can view summary for customers they manage.</p>\n</li>\n<li><p><strong>Owner</strong>: Can view summary for all customers under their company.</p>\n</li>\n<li><p><strong>Admin</strong>: ❌ No access to customer-level summaries.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications-path-parameter\">🧾 Request Specifications (Path Parameter)</h4>\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>id</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>The unique ID of the customer</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n</blockquote>\n<p>Example: <code>https://pos-padi-django-backend.onrender.com/api/v1/customers/abc123/transactions/summary/</code></p>\n<hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>403 Forbidden</strong> – Unauthorized access to customer summary</p>\n</li>\n<li><p><strong>404 Not Found</strong> – Customer not found</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Failed to retrieve summary metrics</p>\n</li>\n</ul>\n<hr />\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["customers",":id","transaction_summary",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[],"variable":[{"description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"<string>","key":"id"}]}},"response":[{"id":"6abd8041-907e-426f-b56a-30550ff2a3e7","name":"Transaction summary","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"},{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"url":{"raw":"{{baseUrl}}/customers/:id/transaction_summary/","host":["{{baseUrl}}"],"path":["customers",":id","transaction_summary",""],"variable":[{"key":"id"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"examples\": {\n    \"response\": {\n      \"value\": {\n        \"total_transactions\": 10,\n        \"successful_transactions\": 8,\n        \"failed_transactions\": 2,\n        \"total_amount\": 1500\n      }\n    }\n  }\n}"}],"_postman_id":"eb04b049-2034-44b6-a901-faf5b754b9cb"},{"name":"List All Customers","id":"d40f0f0f-a8fb-4760-b1c1-655beef30810","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://pos-padi-django-backend.onrender.com/api/v1/customers/?search=<string>&ordering=<string>&page=<integer>","description":"<p>Retrieves a paginated list of customers created by the authenticated user or their organization. This supports search, sorting, and tagging for CRM purposes.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Agent</strong>: Can list only the customers they created.</p>\n</li>\n<li><p><strong>Owner</strong>: Can list all customers created by their agents.</p>\n</li>\n<li><p><strong>Admin</strong>: Can access all customers.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications-query-parameters\">🧾 Request Specifications (Query Parameters)</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>search</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Filter by name, phone, or email</td>\n</tr>\n<tr>\n<td><code>tag</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Filter by customer tag (e.g., VIP, Inactive)</td>\n</tr>\n<tr>\n<td><code>ordering</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Field to sort by (e.g., <code>first_name</code>, <code>created_at</code>)</td>\n</tr>\n<tr>\n<td><code>page</code></td>\n<td>Integer</td>\n<td>❌ No</td>\n<td>Page number for paginated results</td>\n</tr>\n</tbody>\n</table>\n</div><p>Example: <code>https://pos-padi-django-backend.onrender.com/api/v1/customers/?search=grace&amp;tag=vip&amp;page=1</code></p>\n<hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>403 Forbidden</strong> – User lacks access permission</p>\n</li>\n<li><p><strong>400 Bad Request</strong> – Invalid query parameters</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Failed to fetch customer records</p>\n</li>\n</ul>\n<hr />\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["customers",""],"host":["https://pos-padi-django-backend.onrender.com/api/v1"],"query":[{"description":{"content":"<p>A search term.</p>\n","type":"text/plain"},"key":"search","value":"<string>"},{"description":{"content":"<p>Which field to use when ordering the results.</p>\n","type":"text/plain"},"key":"ordering","value":"<string>"},{"description":{"content":"<p>A page number within the paginated result set.</p>\n","type":"text/plain"},"key":"page","value":"<integer>"}],"variable":[]}},"response":[{"id":"4b4f3dd8-4ba1-4d65-8472-d19e5c3cdc93","name":"List of customers retrieved successfully.","originalRequest":{"method":"GET","header":[{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"url":{"raw":"{{baseUrl}}/customers/?search=<string>&ordering=<string>&page=<integer>","host":["{{baseUrl}}"],"path":["customers",""],"query":[{"description":"A search term.","key":"search","value":"<string>"},{"description":"Which field to use when ordering the results.","key":"ordering","value":"<string>"},{"description":"A page number within the paginated result set.","key":"page","value":"<integer>"}]}},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""},{"id":"1ceb2a9b-4b14-415d-be08-490f20e8ae5f","name":"Permission denied.","originalRequest":{"method":"GET","header":[{"description":"Added as a part of security scheme: basic","key":"Authorization","value":"Basic <credentials>"}],"url":{"raw":"{{baseUrl}}/customers/?search=<string>&ordering=<string>&page=<integer>","host":["{{baseUrl}}"],"path":["customers",""],"query":[{"description":"A search term.","key":"search","value":"<string>"},{"description":"Which field to use when ordering the results.","key":"ordering","value":"<string>"},{"description":"A page number within the paginated result set.","key":"page","value":"<integer>"}]}},"status":"Forbidden","code":403,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"d40f0f0f-a8fb-4760-b1c1-655beef30810"}],"id":"c0835b92-3a0e-4462-94de-7bc9ea9549b9","description":"<p>Manages customer profiles and relationships. Enables agents to log customer contact info, update records, and link customers to their transaction history for personalized service and CRM features.</p>\n","_postman_id":"c0835b92-3a0e-4462-94de-7bc9ea9549b9","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}}},{"name":"Transactions","item":[{"name":"Create New Transaction","id":"c9379de4-1bfd-4643-aef8-11f443ddbc50","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"customer_id\": \"a3317cae-2ac2-4cea-bfc2-04970fdece71\",\n  \"amount\": 5000,\n  \"fee\": 50,\n  \"type\": \"Withdrawal\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://pos-padi-express-backend.onrender.com/api/v1/transactions","description":"<p>Creates a new transaction record tied to a specific agent and (optionally) a customer. This endpoint logs key transaction data such as amount, fee, type, and status. It's primarily used by agents and owners to record POS activities in real time.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Agent</strong>: Can create transactions for themselves (their own <code>agent_id</code> only).</p>\n</li>\n<li><p><strong>Owner</strong>: Can create transactions on behalf of any agent within their company.</p>\n</li>\n<li><p><strong>Admin</strong>: ❌ Cannot create transactions directly.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications-json-body\">🧾 Request Specifications (JSON Body)</h4>\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>agent_id</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>ID of the agent recording the transaction</td>\n</tr>\n<tr>\n<td><code>customer_id</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>(Optional) ID of the customer involved</td>\n</tr>\n<tr>\n<td><code>description</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Optional notes about the transaction</td>\n</tr>\n<tr>\n<td><code>amount</code></td>\n<td>Number</td>\n<td>✅ Yes</td>\n<td>Transaction amount</td>\n</tr>\n<tr>\n<td><code>fee</code></td>\n<td>Number</td>\n<td>✅ Yes</td>\n<td>Fee charged on the transaction</td>\n</tr>\n<tr>\n<td><code>type</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>Type of transaction (<code>deposit</code>, <code>withdrawal</code>, etc.)</td>\n</tr>\n<tr>\n<td><code>status</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>Transaction status (<code>pending</code>, <code>success</code>, <code>failed</code>)</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>400 Bad Request</strong> – Missing required fields or invalid values</p>\n</li>\n<li><p><strong>403 Forbidden</strong> – Agent ID does not belong to the authenticated user</p>\n</li>\n<li><p><strong>404 Not Found</strong> – Agent or customer ID does not exist</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Failed to record transaction</p>\n</li>\n</ul>\n<hr />\n","urlObject":{"path":["api","v1","transactions"],"host":["https://pos-padi-express-backend.onrender.com"],"query":[],"variable":[]}},"response":[{"id":"1fab54d1-1170-42c5-9922-6b38c2598484","name":"Transaction created successfully.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"agent_id\": \"<string>\",\n  \"customer_id\": \"<string>\",\n  \"description\": \"<string>\",\n  \"amount\": \"<number>\",\n  \"fee\": \"<number>\",\n  \"type\": \"<string>\",\n  \"status\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/api/v1/transactions"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\"\n}"},{"id":"99d791d9-9d6b-4b90-a8b0-f178bc22ac74","name":"Bad request. Validation failed for the input data.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"agent_id\": \"<string>\",\n  \"customer_id\": \"<string>\",\n  \"description\": \"<string>\",\n  \"amount\": \"<number>\",\n  \"fee\": \"<number>\",\n  \"type\": \"<string>\",\n  \"status\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/api/v1/transactions"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\",\n  \"message\": \"<string>\",\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"}],"_postman_id":"c9379de4-1bfd-4643-aef8-11f443ddbc50"},{"name":"Update a Transaction","id":"1c12ebad-94d7-4f83-8eaa-419bee26a436","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"customer_id\": \"<string>\",\n  \"amount\": \"<number>\",\n  \"fee\": \"<number>\",\n  \"type\": \"<string>\",\n  \"status\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://pos-padi-express-backend.onrender.com/api/v1/transactions/:id","description":"<p>Modifies the details of a previously recorded transaction. This may be necessary to correct input errors, update status, or associate a customer with the transaction. Only users with appropriate ownership or assignment can update transactions.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Agent</strong>: Can update only their own transactions.</p>\n</li>\n<li><p><strong>Owner</strong>: Can update any transaction recorded by their agents.</p>\n</li>\n<li><p><strong>Admin</strong>: ❌ Cannot update transaction records.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications\">🧾 Request Specifications</h4>\n<p><strong>Path Parameter:</strong></p>\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>id</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>Unique ID of the transaction</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Request Body Fields:</strong></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>customer_id</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Link or update the customer for this transaction</td>\n</tr>\n<tr>\n<td><code>amount</code></td>\n<td>Number</td>\n<td>❌ No</td>\n<td>Adjusted transaction amount</td>\n</tr>\n<tr>\n<td><code>fee</code></td>\n<td>Number</td>\n<td>❌ No</td>\n<td>Update the transaction fee</td>\n</tr>\n<tr>\n<td><code>type</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Transaction type (<code>deposit</code>, <code>withdrawal</code>, etc.)</td>\n</tr>\n<tr>\n<td><code>status</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Transaction status (<code>success</code>, <code>failed</code>, etc.)</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n<p>&lt;p &gt;At least one field must be included in the request to trigger an update.&lt;/p&gt; </p>\n</blockquote>\n<hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>403 Forbidden</strong> – User does not have permission to update this transaction</p>\n</li>\n<li><p><strong>404 Not Found</strong> – Transaction with the provided ID does not exist</p>\n</li>\n<li><p><strong>400 Bad Request</strong> – No valid fields provided or validation failed</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Server encountered an error during update</p>\n</li>\n</ul>\n<hr />\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["api","v1","transactions",":id"],"host":["https://pos-padi-express-backend.onrender.com"],"query":[],"variable":[{"description":{"content":"<p>(Required) The ID of the transaction to update.</p>\n","type":"text/plain"},"type":"any","value":"<string>","key":"id"}]}},"response":[{"id":"2bd2c758-8722-4fcb-94d8-b86194ddad0b","name":"Transaction updated successfully.","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"customer_id\": \"<string>\",\n  \"amount\": \"<number>\",\n  \"fee\": \"<number>\",\n  \"type\": \"<string>\",\n  \"status\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":{"raw":"{{baseUrl}}/api/v1/transactions/:id","host":["{{baseUrl}}"],"path":["api","v1","transactions",":id"],"variable":[{"key":"id"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\"\n}"},{"id":"408f121f-9f2f-4099-bc3c-b9f79e480281","name":"Bad request. Validation failed for the input data.","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"customer_id\": \"<string>\",\n  \"amount\": \"<number>\",\n  \"fee\": \"<number>\",\n  \"type\": \"<string>\",\n  \"status\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":{"raw":"{{baseUrl}}/api/v1/transactions/:id","host":["{{baseUrl}}"],"path":["api","v1","transactions",":id"],"variable":[{"key":"id"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\",\n  \"message\": \"<string>\",\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"},{"id":"d73b0e0d-1428-42f5-98e1-119f1cae8d51","name":"Transaction not found.","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"customer_id\": \"<string>\",\n  \"amount\": \"<number>\",\n  \"fee\": \"<number>\",\n  \"type\": \"<string>\",\n  \"status\": \"<string>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":{"raw":"{{baseUrl}}/api/v1/transactions/:id","host":["{{baseUrl}}"],"path":["api","v1","transactions",":id"],"variable":[{"key":"id"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\",\n  \"message\": \"<string>\"\n}"}],"_postman_id":"1c12ebad-94d7-4f83-8eaa-419bee26a436"},{"name":"Get All Transactions","event":[{"listen":"test","script":{"id":"865f84c3-60e8-43a5-b909-c4223b331920","exec":["// Test for response status code\r","pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","// Test for response time\r","pm.test(\"Response time is less than 3000ms\", function () {\r","    pm.expect(pm.response.responseTime).to.be.below(3000);\r","});\r","\r","// Test for successful message\r","pm.test(\"Response contains successful message\", function () {\r","    pm.expect(pm.response.json().message).to.equal(\"Transactions retrieved successfully\");\r","});\r","\r","// Test for storing one transaction id as collection variable \"sampleID\"\r","const transactionId = pm.response.json().data[0].id;\r","pm.collectionVariables.set(\"sampleTransactionID\", transactionId);\r",""],"type":"text/javascript","packages":{}}}],"id":"6a0563ea-6b08-4974-b123-477aafef9fb3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://pos-padi-express-backend.onrender.com/api/v1/transactions","description":"<p>Retrieves a paginated and filterable list of transactions. This endpoint supports advanced query parameters for sorting, searching, and refining transaction history by amount, date, agent, customer, and other criteria.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Agent</strong>: Retrieves only their own transactions.</p>\n</li>\n<li><p><strong>Owner</strong>: Can retrieve all transactions within their company.</p>\n</li>\n<li><p><strong>Admin</strong>: ❌ Not authorized to access transaction lists.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications-query-parameters\">🧾 Request Specifications (Query Parameters)</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>page</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Page number of paginated results</td>\n</tr>\n<tr>\n<td><code>limit</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Number of results per page</td>\n</tr>\n<tr>\n<td><code>sort_key</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Field to sort by (e.g., <code>type</code>, <code>amount</code>, <code>date</code>)</td>\n</tr>\n<tr>\n<td><code>sort_direction</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Sort order: <code>asc</code> or <code>desc</code></td>\n</tr>\n<tr>\n<td><code>search</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>General keyword search across relevant fields</td>\n</tr>\n<tr>\n<td><code>date_from</code></td>\n<td>Date</td>\n<td>❌ No</td>\n<td>Filter transactions created on or after this date</td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td>Date</td>\n<td>❌ No</td>\n<td>Filter transactions created on or before this date</td>\n</tr>\n<tr>\n<td><code>agent_id</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Filter by a specific agent</td>\n</tr>\n<tr>\n<td><code>customer_id</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Filter by a specific customer</td>\n</tr>\n<tr>\n<td><code>status</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Filter by transaction status (e.g., <code>success</code>)</td>\n</tr>\n<tr>\n<td><code>type</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Filter by transaction type (<code>deposit</code>, etc.)</td>\n</tr>\n<tr>\n<td><code>min_amount</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Minimum transaction amount</td>\n</tr>\n<tr>\n<td><code>max_amount</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Maximum transaction amount</td>\n</tr>\n<tr>\n<td><code>min_fee</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Minimum transaction fee</td>\n</tr>\n<tr>\n<td><code>max_fee</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Maximum transaction fee</td>\n</tr>\n<tr>\n<td><code>min_rating</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Minimum customer rating</td>\n</tr>\n<tr>\n<td><code>max_rating</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Maximum customer rating</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n</blockquote>\n<p>Example:<br /><code>https://pos-padi-express-backend.onrender.com/transactions/?page=1&amp;sort_key=type&amp;sort_direction=asc&amp;date_from=2024-01-01&amp;agent_id=agt_9824</code></p>\n<hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>403 Forbidden</strong> – User is not authorized to access transaction data</p>\n</li>\n<li><p><strong>400 Bad Request</strong> – Invalid query parameters or date formats</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Query failed or server error occurred</p>\n</li>\n</ul>\n<hr />\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["api","v1","transactions"],"host":["https://pos-padi-express-backend.onrender.com"],"query":[{"disabled":true,"description":{"content":"<p>The page number for pagination.</p>\n","type":"text/plain"},"key":"page","value":"<string>"},{"disabled":true,"description":{"content":"<p>The number of items per page for pagination.</p>\n","type":"text/plain"},"key":"limit","value":"<string>"},{"disabled":true,"description":{"content":"<p>The field to sort the results by.</p>\n","type":"text/plain"},"key":"sort_key","value":"type"},{"disabled":true,"description":{"content":"<p>The direction to sort the results (ascending or descending).</p>\n","type":"text/plain"},"key":"sort_direction","value":"asc"},{"disabled":true,"description":{"content":"<p>A search term to filter transactions.</p>\n","type":"text/plain"},"key":"search","value":"<string>"},{"disabled":true,"description":{"content":"<p>The start date for filtering transactions.</p>\n","type":"text/plain"},"key":"date_from","value":"<date>"},{"disabled":true,"description":{"content":"<p>The end date for filtering transactions.</p>\n","type":"text/plain"},"key":"date_to","value":"<date>"},{"disabled":true,"description":{"content":"<p>The agent ID(s) to filter transactions.</p>\n","type":"text/plain"},"key":"agent_id","value":"<string>"},{"disabled":true,"description":{"content":"<p>The customer ID(s) to filter transactions.</p>\n","type":"text/plain"},"key":"customer_id","value":"<string>"},{"disabled":true,"description":{"content":"<p>The status to filter transactions.</p>\n","type":"text/plain"},"key":"status","value":"<string>"},{"disabled":true,"description":{"content":"<p>The type of transaction (e.g., credit or debit).</p>\n","type":"text/plain"},"key":"type","value":"<string>"},{"disabled":true,"description":{"content":"<p>The minimum amount to filter transactions.</p>\n","type":"text/plain"},"key":"min_amount","value":"<string>"},{"disabled":true,"description":{"content":"<p>The maximum amount to filter transactions.</p>\n","type":"text/plain"},"key":"max_amount","value":"<string>"},{"disabled":true,"description":{"content":"<p>The minimum fee to filter transactions.</p>\n","type":"text/plain"},"key":"min_fee","value":"<string>"},{"disabled":true,"description":{"content":"<p>The maximum fee to filter transactions.</p>\n","type":"text/plain"},"key":"max_fee","value":"<string>"},{"disabled":true,"description":{"content":"<p>The minimum rating to filter transactions.</p>\n","type":"text/plain"},"key":"min_rating","value":"<string>"},{"disabled":true,"description":{"content":"<p>The maximum rating to filter transactions.</p>\n","type":"text/plain"},"key":"max_rating","value":"<string>"}],"variable":[]}},"response":[{"id":"fdf150ef-c53c-4c54-a060-5db7418c4f2a","name":"List All Transactions","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://pos-padi-express-backend.onrender.com/api/v1/transactions","host":["https://pos-padi-express-backend.onrender.com"],"path":["api","v1","transactions"],"query":[{"key":"page","value":"<string>","description":"The page number for pagination.","disabled":true},{"key":"limit","value":"<string>","description":"The number of items per page for pagination.","disabled":true},{"key":"sort_key","value":"type","description":"The field to sort the results by.","disabled":true},{"key":"sort_direction","value":"asc","description":"The direction to sort the results (ascending or descending).","disabled":true},{"key":"search","value":"<string>","description":"A search term to filter transactions.","disabled":true},{"key":"date_from","value":"<date>","description":"The start date for filtering transactions.","disabled":true},{"key":"date_to","value":"<date>","description":"The end date for filtering transactions.","disabled":true},{"key":"agent_id","value":"<string>","description":"The agent ID(s) to filter transactions.","disabled":true},{"key":"customer_id","value":"<string>","description":"The customer ID(s) to filter transactions.","disabled":true},{"key":"status","value":"<string>","description":"The status to filter transactions.","disabled":true},{"key":"type","value":"<string>","description":"The type of transaction (e.g., credit or debit).","disabled":true},{"key":"min_amount","value":"<string>","description":"The minimum amount to filter transactions.","disabled":true},{"key":"max_amount","value":"<string>","description":"The maximum amount to filter transactions.","disabled":true},{"key":"min_fee","value":"<string>","description":"The minimum fee to filter transactions.","disabled":true},{"key":"max_fee","value":"<string>","description":"The maximum fee to filter transactions.","disabled":true},{"key":"min_rating","value":"<string>","description":"The minimum rating to filter transactions.","disabled":true},{"key":"max_rating","value":"<string>","description":"The maximum rating to filter transactions.","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 05 May 2025 16:23:43 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"517"},{"key":"Connection","value":"keep-alive"},{"key":"access-control-allow-credentials","value":"true"},{"key":"access-control-allow-origin","value":"*"},{"key":"Content-Encoding","value":"br"},{"key":"content-security-policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"cross-origin-opener-policy","value":"same-origin"},{"key":"cross-origin-resource-policy","value":"same-origin"},{"key":"etag","value":"W/\"4b2-6OgXouvVwKHYdSa9lsbl8Oc/IzM\""},{"key":"origin-agent-cluster","value":"?1"},{"key":"ratelimit-limit","value":"100"},{"key":"ratelimit-policy","value":"100;w=600"},{"key":"ratelimit-remaining","value":"97"},{"key":"ratelimit-reset","value":"95"},{"key":"referrer-policy","value":"no-referrer"},{"key":"rndr-id","value":"b8f0c505-5686-47fd"},{"key":"strict-transport-security","value":"max-age=31536000; includeSubDomains"},{"key":"vary","value":"Accept-Encoding"},{"key":"x-content-type-options","value":"nosniff"},{"key":"x-dns-prefetch-control","value":"off"},{"key":"x-download-options","value":"noopen"},{"key":"x-frame-options","value":"SAMEORIGIN"},{"key":"x-permitted-cross-domain-policies","value":"none"},{"key":"x-render-origin-server","value":"Render"},{"key":"x-xss-protection","value":"0"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"93b1957bef5820d0-IAD"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Transactions retrieved successfully\",\n    \"data\": [\n        {\n            \"id\": \"1a88653d-0a66-4471-af6c-1c3af9d2da83\",\n            \"agent_id\": \"751636\",\n            \"customer_id\": \"PADI48305\",\n            \"description\": \"purchase\",\n            \"reference\": \"5F558BE5E15E\",\n            \"amount\": 25000,\n            \"fee\": 400,\n            \"type\": \"deposit\",\n            \"status\": \"success\",\n            \"rating\": null,\n            \"is_active\": true,\n            \"created_at\": \"2025-05-04T13:54:29.095Z\",\n            \"updated_at\": \"2025-05-04T13:54:29.095Z\"\n        },\n        {\n            \"id\": \"0d54bd61-be02-407c-a13f-3e138c10bc81\",\n            \"agent_id\": \"609849\",\n            \"customer_id\": \"590827\",\n            \"description\": \"Second test transaction\",\n            \"reference\": \"AF1A15EF5A1F\",\n            \"amount\": 20500,\n            \"fee\": 300,\n            \"type\": \"credit\",\n            \"status\": \"successful\",\n            \"rating\": null,\n            \"is_active\": true,\n            \"created_at\": \"2025-04-25T20:11:45.245Z\",\n            \"updated_at\": \"2025-04-25T20:11:45.245Z\"\n        },\n        {\n            \"id\": \"03d17855-5928-463c-b935-f662fc6c97e1\",\n            \"agent_id\": \"392323\",\n            \"customer_id\": \"868545\",\n            \"description\": \"First test transaction\",\n            \"reference\": \"772CE7D29AFD\",\n            \"amount\": 17500,\n            \"fee\": 200,\n            \"type\": \"credit\",\n            \"status\": \"successful\",\n            \"rating\": null,\n            \"is_active\": true,\n            \"created_at\": \"2025-04-25T19:57:43.680Z\",\n            \"updated_at\": \"2025-04-25T19:57:43.680Z\"\n        }\n    ],\n    \"meta\": {\n        \"pagination\": {\n            \"page\": 1,\n            \"limit\": 10,\n            \"count\": 3,\n            \"total_records\": 3,\n            \"total_pages\": 1,\n            \"has_previous\": false,\n            \"has_next\": false,\n            \"description\": \"1 to 3 of 3\"\n        }\n    }\n}"}],"_postman_id":"6a0563ea-6b08-4974-b123-477aafef9fb3"},{"name":"Get Transaction by ID","id":"3b7b2838-4da3-4a68-8eaa-69e5f68c4c49","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"https://pos-padi-express-backend.onrender.com/api/v1/transactions/:id","description":"<p>Retrieves the full details of a specific transaction. Useful for displaying receipts, audit logs, or transaction troubleshooting.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Agent</strong>: Can access only their own transactions.</p>\n</li>\n<li><p><strong>Owner</strong>: Can access any transaction tied to their terminals or agents.</p>\n</li>\n<li><p><strong>Admin</strong>: ❌ Not permitted to access transaction-level details.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications-path-parameter\">🧾 Request Specifications (Path Parameter)</h4>\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>id</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>Unique ID of the transaction</td>\n</tr>\n</tbody>\n</table>\n</div><p>Example: <code>https://pos-padi-express-backend.onrender.com/transactions/tx_82e47e192</code></p>\n<hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>403 Forbidden</strong> – User not authorized to view this transaction</p>\n</li>\n<li><p><strong>404 Not Found</strong> – No transaction found with the given ID</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Failed to fetch transaction details</p>\n</li>\n</ul>\n<hr />\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["api","v1","transactions",":id"],"host":["https://pos-padi-express-backend.onrender.com"],"query":[],"variable":[{"description":{"content":"<p>(Required) The ID of the transaction to retrieve.</p>\n","type":"text/plain"},"type":"any","value":"","key":"id"}]}},"response":[{"id":"4f896d1b-19d8-4b2e-a473-c6c76ef1ff0b","name":"Successful","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"raw":"https://pos-padi-express-backend.onrender.com/api/v1/transactions/:id","host":["https://pos-padi-express-backend.onrender.com"],"path":["api","v1","transactions",":id"],"variable":[{"key":"id","value":"","description":"(Required) The ID of the transaction to retrieve."}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 05 May 2025 16:30:01 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"256"},{"key":"Connection","value":"keep-alive"},{"key":"access-control-allow-credentials","value":"true"},{"key":"access-control-allow-origin","value":"*"},{"key":"Content-Encoding","value":"br"},{"key":"content-security-policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"cross-origin-opener-policy","value":"same-origin"},{"key":"cross-origin-resource-policy","value":"same-origin"},{"key":"etag","value":"W/\"182-Hp/XkEQ/RPEoeZidHXwGD5bxI4k\""},{"key":"origin-agent-cluster","value":"?1"},{"key":"ratelimit-limit","value":"100"},{"key":"ratelimit-policy","value":"100;w=600"},{"key":"ratelimit-remaining","value":"99"},{"key":"ratelimit-reset","value":"600"},{"key":"referrer-policy","value":"no-referrer"},{"key":"rndr-id","value":"655ead20-98f2-4956"},{"key":"strict-transport-security","value":"max-age=31536000; includeSubDomains"},{"key":"vary","value":"Accept-Encoding"},{"key":"x-content-type-options","value":"nosniff"},{"key":"x-dns-prefetch-control","value":"off"},{"key":"x-download-options","value":"noopen"},{"key":"x-frame-options","value":"SAMEORIGIN"},{"key":"x-permitted-cross-domain-policies","value":"none"},{"key":"x-render-origin-server","value":"Render"},{"key":"x-xss-protection","value":"0"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"93b19eb10bfc5728-IAD"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Transaction retrieved successfully\",\n    \"data\": {\n        \"id\": \"1a88653d-0a66-4471-af6c-1c3af9d2da83\",\n        \"agent_id\": \"751636\",\n        \"customer_id\": \"PADI48305\",\n        \"description\": \"purchase\",\n        \"reference\": \"5F558BE5E15E\",\n        \"amount\": 25000,\n        \"fee\": 400,\n        \"type\": \"deposit\",\n        \"status\": \"success\",\n        \"rating\": null,\n        \"is_active\": true,\n        \"created_at\": \"2025-05-04T13:54:29.095Z\",\n        \"updated_at\": \"2025-05-04T13:54:29.095Z\"\n    }\n}"},{"id":"88b2d312-236d-448d-9ccf-2ca858261ccd","name":"Transaction Not Found","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"raw":"https://pos-padi-express-backend.onrender.com/api/v1/transactions/:id","host":["https://pos-padi-express-backend.onrender.com"],"path":["api","v1","transactions",":id"],"variable":[{"key":"id","value":"","description":"(Required) The ID of the transaction to retrieve."}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 05 May 2025 16:32:20 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"51"},{"key":"Connection","value":"keep-alive"},{"key":"access-control-allow-credentials","value":"true"},{"key":"access-control-allow-origin","value":"*"},{"key":"Content-Encoding","value":"br"},{"key":"content-security-policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"cross-origin-opener-policy","value":"same-origin"},{"key":"cross-origin-resource-policy","value":"same-origin"},{"key":"etag","value":"W/\"33-ZdzCv2IPLABKMQLUVIj1EOFqdLo\""},{"key":"origin-agent-cluster","value":"?1"},{"key":"ratelimit-limit","value":"100"},{"key":"ratelimit-policy","value":"100;w=600"},{"key":"ratelimit-remaining","value":"98"},{"key":"ratelimit-reset","value":"460"},{"key":"referrer-policy","value":"no-referrer"},{"key":"rndr-id","value":"058959c1-e801-485b"},{"key":"strict-transport-security","value":"max-age=31536000; includeSubDomains"},{"key":"vary","value":"Accept-Encoding"},{"key":"x-content-type-options","value":"nosniff"},{"key":"x-dns-prefetch-control","value":"off"},{"key":"x-download-options","value":"noopen"},{"key":"x-frame-options","value":"SAMEORIGIN"},{"key":"x-permitted-cross-domain-policies","value":"none"},{"key":"x-render-origin-server","value":"Render"},{"key":"x-xss-protection","value":"0"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"93b1a21e6a75d63c-IAD"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Transaction not found\"\n}"}],"_postman_id":"3b7b2838-4da3-4a68-8eaa-69e5f68c4c49"},{"name":"Get Transaction Statistics","id":"c40dfb3e-91e6-4b43-8492-bff9cd50d27e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"https://pos-padi-express-backend.onrender.com/api/v1/transactions/stats","description":"<p>Returns aggregated transaction statistics across the entire company. This includes total volume, total fees, success/failure rates, and other insights. Only accessible to company owners.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Owner</strong>: ✅ Has full access to their company-wide transaction stats.</p>\n</li>\n<li><p><strong>Agent</strong>: ❌ Cannot access this endpoint.</p>\n</li>\n<li><p><strong>Admin</strong>: ❌ Not authorized to view stats.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications-query-parameters\">🧾 Request Specifications (Query Parameters)</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>start_date</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Start date for stats filter (<code>YYYY-MM-DD</code>)</td>\n</tr>\n<tr>\n<td><code>end_date</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>End date for stats filter (<code>YYYY-MM-DD</code>)</td>\n</tr>\n</tbody>\n</table>\n</div><p>Example: <code>https://pos-padi-express-backend.onrender.com/transactions/stats?start_date=2024-01-01&amp;end_date=2024-03-01</code></p>\n<hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>403 Forbidden</strong> – Only owners can access this resource</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Failed to generate statistics</p>\n</li>\n</ul>\n<hr />\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["api","v1","transactions","stats"],"host":["https://pos-padi-express-backend.onrender.com"],"query":[],"variable":[]}},"response":[{"id":"e954294e-f74d-422f-acfa-39fa31018dde","name":"Successfully retrieved transaction statistics.","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"{{baseUrl}}/api/v1/transactions/stats"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\"\n}"},{"id":"580c9a90-f31b-4cd5-8a5b-f1ec7b2f5af3","name":"Forbidden. User does not have the required role.","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"{{baseUrl}}/api/v1/transactions/stats"},"status":"Forbidden","code":403,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\",\n  \"message\": \"<string>\"\n}"}],"_postman_id":"c40dfb3e-91e6-4b43-8492-bff9cd50d27e"},{"name":"Get Transaction Statistics for an Agent","id":"2051f7b3-f1fc-4a96-aa8a-326b7e4ded67","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"https://pos-padi-express-backend.onrender.com/api/v1/transactions/agent/:agent_id/stats","description":"<p>Returns a summary of transactions performed by a specific agent. This includes volume, performance, and status metrics. Accessible by the agent and their owner.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Owner</strong>: ✅ Can retrieve statistics for any of their agents.</p>\n</li>\n<li><p><strong>Agent</strong>: ✅ Can retrieve their own transaction stats.</p>\n</li>\n<li><p><strong>Admin</strong>: ❌ Not permitted to access agent-specific data.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications\">🧾 Request Specifications</h4>\n<p><strong>Path Parameter:</strong></p>\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>id</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>The unique ID of the agent</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Optional Query Parameters:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>start_date</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Start date for filtering (<code>YYYY-MM-DD</code>)</td>\n</tr>\n<tr>\n<td><code>end_date</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>End date for filtering (<code>YYYY-MM-DD</code>)</td>\n</tr>\n</tbody>\n</table>\n</div><p>Example: <code>https://pos-padi-express-backend.onrender.com/transactions/agents/agt_345/stats?start_date=2024-04-01</code></p>\n<hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>403 Forbidden</strong> – Agent not allowed to access another agent’s data</p>\n</li>\n<li><p><strong>404 Not Found</strong> – Agent does not exist</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Stats retrieval failed</p>\n</li>\n</ul>\n<hr />\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["api","v1","transactions","agent",":agent_id","stats"],"host":["https://pos-padi-express-backend.onrender.com"],"query":[],"variable":[{"description":{"content":"<p>(Required) The ID of the agent whose transaction statistics are being retrieved.</p>\n","type":"text/plain"},"type":"any","value":"<string>","key":"agent_id"}]}},"response":[{"id":"c0666458-6a73-4752-8445-8a12ce6e34a7","name":"Successfully retrieved transaction statistics for the agent.","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"raw":"{{baseUrl}}/api/v1/transactions/agent/:agent_id/stats","host":["{{baseUrl}}"],"path":["api","v1","transactions","agent",":agent_id","stats"],"variable":[{"key":"agent_id"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\"\n}"},{"id":"d1e228c7-a933-4fa2-8e11-dcdc9c0bd3b9","name":"Forbidden. User does not have the required role.","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"raw":"{{baseUrl}}/api/v1/transactions/agent/:agent_id/stats","host":["{{baseUrl}}"],"path":["api","v1","transactions","agent",":agent_id","stats"],"variable":[{"key":"agent_id"}]}},"status":"Forbidden","code":403,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\",\n  \"message\": \"<string>\"\n}"},{"id":"4ae0c4f1-92c2-4a0d-ab30-57d41113b623","name":"Agent not found.","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"raw":"{{baseUrl}}/api/v1/transactions/agent/:agent_id/stats","host":["{{baseUrl}}"],"path":["api","v1","transactions","agent",":agent_id","stats"],"variable":[{"key":"agent_id"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\",\n  \"message\": \"<string>\"\n}"}],"_postman_id":"2051f7b3-f1fc-4a96-aa8a-326b7e4ded67"}],"id":"4f4d6a05-8d11-4b8e-a26d-eea59b82fc2f","description":"<p>Contains endpoints to create, retrieve, and analyse financial transactions. Supports real-time logging and fetching of transaction data, filters by ID or terminal, and provides daily statistical summaries.</p>\n<p>NOTE: Responses vary based on the sender's role(agent or owner).</p>\n","_postman_id":"4f4d6a05-8d11-4b8e-a26d-eea59b82fc2f","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}}},{"name":"Disputes","item":[{"name":"Create a new dispute","id":"306eaa9a-34ab-4e31-964e-c9aff94dc5d4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"transaction_id\": \"<uuid>\",\n  \"status\": \"Pending\",\n  \"resolution_notes\": \"<string>\",\n  \"is_active\": \"<boolean>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://pos-padi-express-backend.onrender.com/api/v1/disputes","description":"<p>Creates a new dispute record for a failed or problematic transaction. This allows agents or owners to flag suspicious or unresolved transaction cases for review and resolution.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Agent</strong>: ✅ Can raise disputes for their own transactions.</p>\n</li>\n<li><p><strong>Owner</strong>: ✅ Can raise disputes for any transaction under their company.</p>\n</li>\n<li><p><strong>Admin</strong>: ❌ Cannot create disputes directly.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications-json-body\">🧾 Request Specifications (JSON Body)</h4>\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>transaction_id</code></td>\n<td>UUID</td>\n<td>✅ Yes</td>\n<td>The ID of the transaction being disputed</td>\n</tr>\n<tr>\n<td><code>status</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>Initial status of the dispute (e.g., <code>Pending</code>)</td>\n</tr>\n<tr>\n<td><code>resolution_notes</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Notes explaining the issue or desired resolution</td>\n</tr>\n<tr>\n<td><code>is_active</code></td>\n<td>Boolean</td>\n<td>✅ Yes</td>\n<td>Whether the dispute is still open or resolved</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n<p>&lt;p &gt;The system may automatically attach user/agent metadata on submission.&lt;/p&gt; </p>\n</blockquote>\n<hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>400 Bad Request</strong> – Missing required fields or invalid input</p>\n</li>\n<li><p><strong>403 Forbidden</strong> – User not allowed to dispute the transaction</p>\n</li>\n<li><p><strong>404 Not Found</strong> – Transaction does not exist</p>\n</li>\n<li><p><strong>409 Conflict</strong> – Dispute already exists for this transaction</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Dispute creation failed</p>\n</li>\n</ul>\n<hr />\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["api","v1","disputes"],"host":["https://pos-padi-express-backend.onrender.com"],"query":[],"variable":[]}},"response":[{"id":"08307cf1-454c-4716-8347-030bb49f7397","name":"Dispute created successfully.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"transaction_id\": \"<uuid>\",\n  \"status\": \"Pending\",\n  \"resolution_notes\": \"<string>\",\n  \"is_active\": \"<boolean>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/api/v1/disputes"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\"\n}"},{"id":"5e924898-bc5c-4ee1-bcf6-2d1e9e4f57ca","name":"Bad request. Validation failed for the input data.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"transaction_id\": \"<uuid>\",\n  \"status\": \"Pending\",\n  \"resolution_notes\": \"<string>\",\n  \"is_active\": \"<boolean>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{baseUrl}}/api/v1/disputes"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\",\n  \"message\": \"<string>\",\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"}],"_postman_id":"306eaa9a-34ab-4e31-964e-c9aff94dc5d4"},{"name":"Update an existing dispute","id":"b67fcd1b-ae26-4640-a89f-9de2aee96873","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"status\": \"Rejected\",\n  \"resolution_notes\": \"<string>\",\n  \"updated_at\": \"<dateTime>\",\n  \"is_active\": \"<boolean>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://pos-padi-express-backend.onrender.com/api/v1/disputes/:id","description":"<p>Updates the status or notes of an already logged dispute. This is typically used by owners or agents to add more context, mark resolution, or change the dispute's activity state.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Agent</strong>: ✅ Can update their own disputes.</p>\n</li>\n<li><p><strong>Owner</strong>: ✅ Can update disputes raised by their agents.</p>\n</li>\n<li><p><strong>Admin</strong>: ❌ Cannot update disputes.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications\">🧾 Request Specifications</h4>\n<p><strong>Path Parameter:</strong></p>\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>id</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>Unique ID of the dispute to update</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Request Body Fields:</strong></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>status</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>New status of the dispute (e.g., <code>Resolved</code>, <code>Rejected</code>)</td>\n</tr>\n<tr>\n<td><code>resolution_notes</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Additional context or resolution details</td>\n</tr>\n<tr>\n<td><code>is_active</code></td>\n<td>Boolean</td>\n<td>❌ No</td>\n<td>Toggle the active status of the dispute</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n<p>&lt;p &gt;At least one field must be included to update the dispute.&lt;/p&gt; </p>\n</blockquote>\n<hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>403 Forbidden</strong> – User not authorized to update this dispute</p>\n</li>\n<li><p><strong>404 Not Found</strong> – Dispute ID not found</p>\n</li>\n<li><p><strong>400 Bad Request</strong> – Invalid or empty request body</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Update failed</p>\n</li>\n</ul>\n<hr />\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["api","v1","disputes",":id"],"host":["https://pos-padi-express-backend.onrender.com"],"query":[],"variable":[{"description":{"content":"<p>(Required) The ID of the dispute to update.</p>\n","type":"text/plain"},"type":"any","value":"<uuid>","key":"id"}]}},"response":[{"id":"25a6cf8f-9bad-406e-9dcd-84e5ca12e673","name":"Dispute updated successfully.","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"status\": \"Rejected\",\n  \"resolution_notes\": \"<string>\",\n  \"updated_at\": \"<dateTime>\",\n  \"is_active\": \"<boolean>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":{"raw":"{{baseUrl}}/api/v1/disputes/:id","host":["{{baseUrl}}"],"path":["api","v1","disputes",":id"],"variable":[{"key":"id"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\"\n}"},{"id":"6347ace4-5a5d-4104-b821-5f7ede5aecb9","name":"Bad request. Validation failed for the input data.","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"status\": \"Rejected\",\n  \"resolution_notes\": \"<string>\",\n  \"updated_at\": \"<dateTime>\",\n  \"is_active\": \"<boolean>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":{"raw":"{{baseUrl}}/api/v1/disputes/:id","host":["{{baseUrl}}"],"path":["api","v1","disputes",":id"],"variable":[{"key":"id"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\",\n  \"message\": \"<string>\",\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"},{"id":"bc26a8b0-d9f2-4f99-bc86-97ef978929e5","name":"Dispute not found.","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"status\": \"Rejected\",\n  \"resolution_notes\": \"<string>\",\n  \"updated_at\": \"<dateTime>\",\n  \"is_active\": \"<boolean>\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":{"raw":"{{baseUrl}}/api/v1/disputes/:id","host":["{{baseUrl}}"],"path":["api","v1","disputes",":id"],"variable":[{"key":"id"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\",\n  \"message\": \"<string>\"\n}"}],"_postman_id":"b67fcd1b-ae26-4640-a89f-9de2aee96873"},{"name":"Get all disputes","id":"31d9eb82-0ed6-4064-b6dd-bc4a2c622c57","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"https://pos-padi-express-backend.onrender.com/api/v1/disputes?page=<string>&limit=<string>&sort_key=is_active&sort_direction=asc&search=<string>&date_from=<date>&date_to=<date>&transaction_id=<string>&status=Rejected&is_active=<boolean>","description":"<p>Fetches a paginated and filterable list of all disputes submitted under the user's scope. This is useful for dispute resolution dashboards, audit reviews, and support visibility.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Agent</strong>: ✅ Can retrieve disputes they created.</p>\n</li>\n<li><p><strong>Owner</strong>: ✅ Can retrieve all disputes filed under their company.</p>\n</li>\n<li><p><strong>Admin</strong>: ❌ Cannot retrieve disputes.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications-query-parameters\">🧾 Request Specifications (Query Parameters)</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>page</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Page number of paginated results</td>\n</tr>\n<tr>\n<td><code>limit</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Number of results per page</td>\n</tr>\n<tr>\n<td><code>sort_key</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Field to sort by (e.g., <code>is_active</code>)</td>\n</tr>\n<tr>\n<td><code>sort_direction</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Sort order: <code>asc</code> or <code>desc</code></td>\n</tr>\n<tr>\n<td><code>search</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Filter by transaction reference or note text</td>\n</tr>\n<tr>\n<td><code>date_from</code></td>\n<td>Date</td>\n<td>❌ No</td>\n<td>Filter disputes submitted after this date</td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td>Date</td>\n<td>❌ No</td>\n<td>Filter disputes submitted before this date</td>\n</tr>\n<tr>\n<td><code>transaction_id</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Filter disputes linked to a specific transaction</td>\n</tr>\n<tr>\n<td><code>status</code></td>\n<td>String</td>\n<td>❌ No</td>\n<td>Filter by dispute status (e.g., <code>Rejected</code>)</td>\n</tr>\n<tr>\n<td><code>is_active</code></td>\n<td>Boolean</td>\n<td>❌ No</td>\n<td>Filter active or resolved disputes</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n</blockquote>\n<p>Example:<br /><code>https://pos-padi-express-backend.onrender.com/disputes/?status=Rejected&amp;is_active=true&amp;date_from=2024-01-01&amp;page=1</code></p>\n<hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>403 Forbidden</strong> – User lacks permission to access certain dispute records</p>\n</li>\n<li><p><strong>400 Bad Request</strong> – Invalid query parameter or type</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Failed to retrieve disputes</p>\n</li>\n</ul>\n<hr />\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["api","v1","disputes"],"host":["https://pos-padi-express-backend.onrender.com"],"query":[{"description":{"content":"<p>The page number for pagination.</p>\n","type":"text/plain"},"key":"page","value":"<string>"},{"description":{"content":"<p>The number of items per page for pagination.</p>\n","type":"text/plain"},"key":"limit","value":"<string>"},{"description":{"content":"<p>The field to sort the results by.</p>\n","type":"text/plain"},"key":"sort_key","value":"is_active"},{"description":{"content":"<p>The direction to sort the results (ascending or descending).</p>\n","type":"text/plain"},"key":"sort_direction","value":"asc"},{"description":{"content":"<p>A search term to filter disputes.</p>\n","type":"text/plain"},"key":"search","value":"<string>"},{"description":{"content":"<p>The start date for filtering disputes.</p>\n","type":"text/plain"},"key":"date_from","value":"<date>"},{"description":{"content":"<p>The end date for filtering disputes.</p>\n","type":"text/plain"},"key":"date_to","value":"<date>"},{"description":{"content":"<p>The transaction ID(s) to filter disputes.</p>\n","type":"text/plain"},"key":"transaction_id","value":"<string>"},{"description":{"content":"<p>The status of the disputes to filter by.</p>\n","type":"text/plain"},"key":"status","value":"Rejected"},{"description":{"content":"<p>Filter disputes by their active status.</p>\n","type":"text/plain"},"key":"is_active","value":"<boolean>"}],"variable":[]}},"response":[{"id":"7a8861b7-7c2e-4651-b4db-c419e928d844","name":"List of disputes retrieved successfully.","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"raw":"{{baseUrl}}/api/v1/disputes?page=<string>&limit=<string>&sort_key=is_active&sort_direction=asc&search=<string>&date_from=<date>&date_to=<date>&transaction_id=<string>&status=Rejected&is_active=<boolean>","host":["{{baseUrl}}"],"path":["api","v1","disputes"],"query":[{"description":"The page number for pagination.","key":"page","value":"<string>"},{"description":"The number of items per page for pagination.","key":"limit","value":"<string>"},{"description":"The field to sort the results by.","key":"sort_key","value":"is_active"},{"description":"The direction to sort the results (ascending or descending).","key":"sort_direction","value":"asc"},{"description":"A search term to filter disputes.","key":"search","value":"<string>"},{"description":"The start date for filtering disputes.","key":"date_from","value":"<date>"},{"description":"The end date for filtering disputes.","key":"date_to","value":"<date>"},{"description":"The transaction ID(s) to filter disputes.","key":"transaction_id","value":"<string>"},{"description":"The status of the disputes to filter by.","key":"status","value":"Rejected"},{"description":"Filter disputes by their active status.","key":"is_active","value":"<boolean>"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\"\n}"},{"id":"f1e8265e-6a31-41e5-bc0e-ebca33d08f6d","name":"Bad request. Validation failed for the input data.","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"raw":"{{baseUrl}}/api/v1/disputes?page=<string>&limit=<string>&sort_key=is_active&sort_direction=asc&search=<string>&date_from=<date>&date_to=<date>&transaction_id=<string>&status=Rejected&is_active=<boolean>","host":["{{baseUrl}}"],"path":["api","v1","disputes"],"query":[{"description":"The page number for pagination.","key":"page","value":"<string>"},{"description":"The number of items per page for pagination.","key":"limit","value":"<string>"},{"description":"The field to sort the results by.","key":"sort_key","value":"is_active"},{"description":"The direction to sort the results (ascending or descending).","key":"sort_direction","value":"asc"},{"description":"A search term to filter disputes.","key":"search","value":"<string>"},{"description":"The start date for filtering disputes.","key":"date_from","value":"<date>"},{"description":"The end date for filtering disputes.","key":"date_to","value":"<date>"},{"description":"The transaction ID(s) to filter disputes.","key":"transaction_id","value":"<string>"},{"description":"The status of the disputes to filter by.","key":"status","value":"Rejected"},{"description":"Filter disputes by their active status.","key":"is_active","value":"<boolean>"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\",\n  \"message\": \"<string>\",\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"}],"_postman_id":"31d9eb82-0ed6-4064-b6dd-bc4a2c622c57"}],"id":"82f83b37-7319-4a9e-97f6-192b9d65b9a0","description":"<p>Enables agents to report failed or reversed transactions and track their resolution statuses. Business owners can monitor and escalate disputes for quicker resolution and improved customer experience.</p>\n","_postman_id":"82f83b37-7319-4a9e-97f6-192b9d65b9a0","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}}},{"name":"Notifications","item":[{"name":"Retrieve a Notification by ID","id":"bcbe84e5-95d0-41c7-90f1-665d284d80e6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"https://pos-padi-express-backend.onrender.com/api/v1/notifications/:id","description":"<p>Fetches the full details of a specific notification using its unique identifier. Useful for viewing contextual or previously missed system messages.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Agent</strong>: ✅ Can retrieve their own notifications.</p>\n</li>\n<li><p><strong>Owner</strong>: ✅ Can retrieve notifications addressed to them.</p>\n</li>\n<li><p><strong>Admin</strong>: ✅ Can retrieve any notification in the system.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications-path-parameter\">🧾 Request Specifications (Path Parameter)</h4>\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>id</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>The unique ID of the notification</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n</blockquote>\n<p>Example: <code>https://pos-padi-express-backend.onrender.com/notifications/64a123fc91c8a2b7f2db27e1</code></p>\n<hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>403 Forbidden</strong> – Attempt to access another user’s notification</p>\n</li>\n<li><p><strong>404 Not Found</strong> – Notification ID not found</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Failed to retrieve notification</p>\n</li>\n</ul>\n<hr />\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["api","v1","notifications",":id"],"host":["https://pos-padi-express-backend.onrender.com"],"query":[],"variable":[{"description":{"content":"<p>(Required) The unique identifier of the notification to retrieve.</p>\n","type":"text/plain"},"type":"any","value":"<string>","key":"id"}]}},"response":[{"id":"7260637b-0a02-4bee-80c1-e6e4aad6a921","name":"Successfully retrieved the notification.","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"raw":"{{baseUrl}}/api/v1/notifications/:id","host":["{{baseUrl}}"],"path":["api","v1","notifications",":id"],"variable":[{"key":"id"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"<string>\",\n  \"status\": \"<string>\",\n  \"data\": {\n    \"id\": \"<integer>\",\n    \"userId\": \"<string>\",\n    \"title\": \"<string>\",\n    \"message\": \"<string>\",\n    \"data\": {\n      \"ind0b\": \"<string>\"\n    },\n    \"deliveredAt\": \"<dateTime>\",\n    \"type\": \"<string>\",\n    \"read\": \"<boolean>\",\n    \"createdAt\": \"<dateTime>\",\n    \"readAt\": \"<dateTime>\"\n  }\n}"},{"id":"e75d82db-4122-43bf-b5ad-4178c7f339b9","name":"Bad request. Validation failed for the input data.","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"raw":"{{baseUrl}}/api/v1/notifications/:id","host":["{{baseUrl}}"],"path":["api","v1","notifications",":id"],"variable":[{"key":"id"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\",\n  \"message\": \"<string>\",\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"},{"id":"f3b950ba-3925-4170-bb22-e941bab44556","name":"Notification not found.","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"raw":"{{baseUrl}}/api/v1/notifications/:id","host":["{{baseUrl}}"],"path":["api","v1","notifications",":id"],"variable":[{"key":"id"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\",\n  \"message\": \"<string>\"\n}"},{"id":"2301548a-d46d-493a-9546-7f6e505e2382","name":"Internal server error.","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"raw":"{{baseUrl}}/api/v1/notifications/:id","host":["{{baseUrl}}"],"path":["api","v1","notifications",":id"],"variable":[{"key":"id"}]}},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\",\n  \"message\": \"<string>\"\n}"}],"_postman_id":"bcbe84e5-95d0-41c7-90f1-665d284d80e6"},{"name":"Mark a Notification as Read","id":"61e6eb8d-41ff-49ae-ac63-3f91197c55bd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Accept","value":"application/json"}],"url":"https://pos-padi-express-backend.onrender.com/api/v1/notifications/:id/read","description":"<p>Marks a specific notification as read by updating its status. This is used to clear or acknowledge previously delivered alerts in the user interface.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Agent</strong>: ✅ Can mark their own notifications as read.</p>\n</li>\n<li><p><strong>Owner</strong>: ✅ Can mark their own notifications as read.</p>\n</li>\n<li><p><strong>Admin</strong>: ✅ Can mark any notification as read, typically for testing or management.</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications-path-parameter\">🧾 Request Specifications (Path Parameter)</h4>\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>id</code></td>\n<td>String</td>\n<td>✅ Yes</td>\n<td>Unique identifier of the notification to mark as read</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n</blockquote>\n<p>Example: <code>https://pos-padi-express-backend.onrender.com/notifications/64a123fc91c8a2b7f2db27e1/read</code></p>\n<hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>403 Forbidden</strong> – Attempting to modify another user’s notification</p>\n</li>\n<li><p><strong>404 Not Found</strong> – Notification does not exist</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Update failed</p>\n</li>\n</ul>\n<hr />\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["api","v1","notifications",":id","read"],"host":["https://pos-padi-express-backend.onrender.com"],"query":[],"variable":[{"description":{"content":"<p>(Required) The ID of the notification to mark as read</p>\n","type":"text/plain"},"type":"any","value":"<string>","key":"id"}]}},"response":[{"id":"ccc55953-cfec-4077-8d62-e558a8ecc3cc","name":"Notification updated successfully.","originalRequest":{"method":"PATCH","header":[{"key":"Accept","value":"application/json"}],"url":{"raw":"{{baseUrl}}/api/v1/notifications/:id/read","host":["{{baseUrl}}"],"path":["api","v1","notifications",":id","read"],"variable":[{"key":"id"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"<string>\",\n  \"status\": \"<string>\"\n}"},{"id":"a23caeae-83d2-46b2-be8f-e7ff47be365a","name":"Bad request. Invalid input or missing required parameters.","originalRequest":{"method":"PATCH","header":[{"key":"Accept","value":"application/json"}],"url":{"raw":"{{baseUrl}}/api/v1/notifications/:id/read","host":["{{baseUrl}}"],"path":["api","v1","notifications",":id","read"],"variable":[{"key":"id"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\",\n  \"message\": \"<string>\",\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"},{"id":"7b774539-25bc-4eab-bf8f-85a259671103","name":"Notification not found.","originalRequest":{"method":"PATCH","header":[{"key":"Accept","value":"application/json"}],"url":{"raw":"{{baseUrl}}/api/v1/notifications/:id/read","host":["{{baseUrl}}"],"path":["api","v1","notifications",":id","read"],"variable":[{"key":"id"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\",\n  \"message\": \"<string>\"\n}"},{"id":"0d7daa6b-7271-4c32-a00c-697f746a4794","name":"Internal server error.","originalRequest":{"method":"PATCH","header":[{"key":"Accept","value":"application/json"}],"url":{"raw":"{{baseUrl}}/api/v1/notifications/:id/read","host":["{{baseUrl}}"],"path":["api","v1","notifications",":id","read"],"variable":[{"key":"id"}]}},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\",\n  \"message\": \"<string>\"\n}"}],"_postman_id":"61e6eb8d-41ff-49ae-ac63-3f91197c55bd"},{"name":"Retrieve All Notifications (Paginated)","id":"b0d4dae0-f2b6-4402-9107-fdd9ed0e2a4e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"https://pos-padi-express-backend.onrender.com/api/v1/notifications?page=<integer>&limit=<integer>","description":"<p>Returns a paginated list of notifications for the authenticated user. This is typically used to populate a notifications dropdown or inbox view.</p>\n<hr />\n<h4 id=\"🔐-authentication\">🔐 Authentication</h4>\n<p>✅ Required – Must include a valid JWT token</p>\n<hr />\n<h3 id=\"🔐-role-based-behavior\">🔐 Role-Based Behavior</h3>\n<ul>\n<li><p><strong>Agent</strong>: ✅ Can view only their own notifications.</p>\n</li>\n<li><p><strong>Owner</strong>: ✅ Can view only their own notifications.</p>\n</li>\n<li><p><strong>Admin</strong>: ✅ Can retrieve all notifications (optional behavior depending on implementation).</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"🧾-request-specifications-query-parameters\">🧾 Request Specifications (Query Parameters)</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>page</code></td>\n<td>Integer</td>\n<td>❌ No</td>\n<td>The current page number</td>\n</tr>\n<tr>\n<td><code>limit</code></td>\n<td>Integer</td>\n<td>❌ No</td>\n<td>Number of notifications per page</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n</blockquote>\n<p>Example: <code>https://pos-padi-express-backend.onrender.com/notifications/?page=1&amp;limit=10</code></p>\n<hr />\n<h4 id=\"❌-error-responses\">❌ Error Responses</h4>\n<ul>\n<li><p><strong>403 Forbidden</strong> – Attempt to view notifications outside user scope</p>\n</li>\n<li><p><strong>400 Bad Request</strong> – Invalid pagination parameters</p>\n</li>\n<li><p><strong>500 Internal Server Error</strong> – Failed to fetch notifications</p>\n</li>\n</ul>\n<hr />\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}},"urlObject":{"path":["api","v1","notifications"],"host":["https://pos-padi-express-backend.onrender.com"],"query":[{"description":{"content":"<p>(Required) The page number to retrieve.</p>\n","type":"text/plain"},"key":"page","value":"<integer>"},{"description":{"content":"<p>(Required) The number of notifications per page.</p>\n","type":"text/plain"},"key":"limit","value":"<integer>"}],"variable":[]}},"response":[{"id":"e3368398-3e22-4faf-9ac2-50e67afda505","name":"Notifications retrieved successfully.","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"raw":"{{baseUrl}}/api/v1/notifications?page=<integer>&limit=<integer>","host":["{{baseUrl}}"],"path":["api","v1","notifications"],"query":[{"description":"(Required) The page number to retrieve.","key":"page","value":"<integer>"},{"description":"(Required) The number of notifications per page.","key":"limit","value":"<integer>"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"<string>\",\n  \"status\": \"<string>\",\n  \"data\": {\n    \"notifications\": [\n      {\n        \"id\": \"<integer>\",\n        \"userId\": \"<string>\",\n        \"title\": \"<string>\",\n        \"message\": \"<string>\",\n        \"data\": {},\n        \"deliveredAt\": \"<dateTime>\",\n        \"type\": \"<string>\",\n        \"read\": \"<boolean>\",\n        \"createdAt\": \"<dateTime>\",\n        \"readAt\": \"<dateTime>\"\n      },\n      {\n        \"id\": \"<integer>\",\n        \"userId\": \"<string>\",\n        \"title\": \"<string>\",\n        \"message\": \"<string>\",\n        \"data\": {},\n        \"deliveredAt\": \"<dateTime>\",\n        \"type\": \"<string>\",\n        \"read\": \"<boolean>\",\n        \"createdAt\": \"<dateTime>\",\n        \"readAt\": \"<dateTime>\"\n      }\n    ],\n    \"pagination\": {\n      \"page\": \"<integer>\",\n      \"limit\": \"<integer>\",\n      \"totalPages\": \"<integer>\",\n      \"totalItems\": \"<integer>\"\n    }\n  }\n}"},{"id":"51b7cb02-b3bd-40f8-837e-4a116aa175e0","name":"Bad request. Validation failed for the input data.","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"raw":"{{baseUrl}}/api/v1/notifications?page=<integer>&limit=<integer>","host":["{{baseUrl}}"],"path":["api","v1","notifications"],"query":[{"description":"(Required) The page number to retrieve.","key":"page","value":"<integer>"},{"description":"(Required) The number of notifications per page.","key":"limit","value":"<integer>"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\",\n  \"message\": \"<string>\",\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"},{"id":"537b694b-ab4e-4234-a29a-377aa59d5d92","name":"Internal server error.","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"raw":"{{baseUrl}}/api/v1/notifications?page=<integer>&limit=<integer>","host":["{{baseUrl}}"],"path":["api","v1","notifications"],"query":[{"description":"(Required) The page number to retrieve.","key":"page","value":"<integer>"},{"description":"(Required) The number of notifications per page.","key":"limit","value":"<integer>"}]}},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"success\": \"<boolean>\",\n  \"message\": \"<string>\"\n}"}],"_postman_id":"b0d4dae0-f2b6-4402-9107-fdd9ed0e2a4e"}],"id":"e5b98275-17c5-4f85-ad1f-da9c259b86aa","description":"<p>Manages system notifications and alerts. Includes endpoints to send, receive, update, and delete in-app notifications—useful for failed transactions, fraud alerts, dispute status, and other system events.</p>\n","_postman_id":"e5b98275-17c5-4f85-ad1f-da9c259b86aa","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","id":"7ed69a69-89aa-4bdd-9996-5f3eb5634f52","name":"POS-Padi API","type":"collection"}}}],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]}},"event":[{"listen":"prerequest","script":{"id":"ae92c799-d0ca-40da-9ff3-2c3a6b9b2de9","type":"text/javascript","packages":{},"exec":[""]}},{"listen":"test","script":{"id":"1b8a9c02-f816-47b8-bd1a-f13afa01ca3a","type":"text/javascript","packages":{},"exec":[""]}}],"variable":[{"key":"djangoUrl","value":"https://pos-padi-django-backend.onrender.com/api/v1"},{"key":"nodeUrl","value":"https://pos-padi-express-backend.onrender.com","type":"string"},{"key":"authToken","value":"","type":"string"},{"key":"refreshToken","value":""},{"key":"sampleTransactionID","value":""}]}