{"info":{"name":"SACCO Management API v1","description":"Server-to-server integration API \u2014 Sanctum bearer-token auth. A token IS a staff user: it carries that user's own role and branch access on every request. Generate a token from Settings > API Tokens inside the app; it is shown once at creation time.\n\nbase_url is already pre-filled to where this collection was downloaded from \u2014 just set the {{token}} collection variable after importing.","schema":"https:\/\/schema.getpostman.com\/json\/collection\/v2.1.0\/collection.json"},"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{token}}","type":"string"}]},"variable":[{"key":"base_url","value":"https:\/\/pawaloans.openteq.co.ke\/api\/v1","type":"string"},{"key":"token","value":"","type":"string"},{"key":"loan_id","value":"1","type":"string"},{"key":"id_number","value":"12345678","type":"string"},{"key":"member_id","value":"1","type":"string"},{"key":"savings_account_id","value":"1","type":"string"},{"key":"share_account_id","value":"1","type":"string"}],"item":[{"name":"Repayments","item":[{"name":"Record a repayment (by National ID \u2014 for an external HR\/payroll system)","request":{"method":"POST","header":[{"key":"Accept","value":"application\/json"},{"key":"Idempotency-Key","value":"payroll-run-42-emp-1023","description":"Recommended for automated callers \u2014 a retry with the same key replays the original response instead of double-posting. See the Developer Portal docs."}],"url":{"raw":"{{base_url}}\/repayments","host":["{{base_url}}"],"path":["repayments"]},"body":{"mode":"raw","options":{"raw":{"language":"json"}},"raw":"{\n  \"id_number\": \"{{id_number}}\",\n  \"amount\": 5000,\n  \"payment_date\": \"2026-08-12\",\n  \"payment_method\": \"mpesa\",\n  \"reference_number\": \"QGH7XYZ001\",\n  \"phone_number\": \"254712345678\",\n  \"notes\": \"Paid via mobile banking\"\n}"}},"response":[{"name":"201 Created","code":201,"body":"{\n  \"data\": {\n    \"id\": 42,\n    \"receipt_number\": \"RCT000042\",\n    \"loan_id\": 1,\n    \"amount\": 5000,\n    \"principal_portion\": 4200,\n    \"interest_portion\": 800,\n    \"penalty_portion\": 0,\n    \"excess_amount\": 0,\n    \"payment_date\": \"2026-08-12\",\n    \"payment_method\": \"mpesa\",\n    \"reference_number\": \"QGH7XYZ001\"\n  }\n}"},{"name":"422 More than one active loan for this National ID","code":422,"body":"{\n  \"message\": \"This member has more than one active loan \u2014 include loan_number to specify which one.\",\n  \"loans\": [\n    { \"loan_number\": \"L00001\", \"status\": \"active\", \"total_balance\": 8500 },\n    { \"loan_number\": \"L00002\", \"status\": \"overdue\", \"total_balance\": 15750 }\n  ]\n}"},{"name":"422 Loan not open for repayment","code":422,"body":"{\n  \"message\": \"This loan is not open for repayment.\"\n}"},{"name":"422 Validation error","code":422,"body":"{\n  \"message\": \"The amount field is required.\",\n  \"errors\": {\n    \"amount\": [\"The amount field is required.\"]\n  }\n}"}]},{"name":"Record a repayment (by loan_id \u2014 if you already looked it up)","request":{"method":"POST","header":[{"key":"Accept","value":"application\/json"},{"key":"Idempotency-Key","value":"payroll-run-42-emp-1024"}],"url":{"raw":"{{base_url}}\/repayments","host":["{{base_url}}"],"path":["repayments"]},"body":{"mode":"raw","options":{"raw":{"language":"json"}},"raw":"{\n  \"loan_id\": {{loan_id}},\n  \"amount\": 5000,\n  \"payment_date\": \"2026-08-12\",\n  \"payment_method\": \"mpesa\",\n  \"reference_number\": \"QGH7XYZ001\"\n}"}}},{"name":"Record a payroll run in one call (batch, up to 100 lines)","request":{"method":"POST","header":[{"key":"Accept","value":"application\/json"},{"key":"Idempotency-Key","value":"payroll-run-42"}],"url":{"raw":"{{base_url}}\/repayments\/batch","host":["{{base_url}}"],"path":["repayments","batch"]},"body":{"mode":"raw","options":{"raw":{"language":"json"}},"raw":"{\n  \"repayments\": [\n    { \"id_number\": \"12345678\", \"amount\": 5000, \"payment_date\": \"2026-08-12\", \"payment_method\": \"mpesa\" },\n    { \"loan_id\": 999999, \"amount\": 3000, \"payment_date\": \"2026-08-12\", \"payment_method\": \"mpesa\" }\n  ]\n}"}},"response":[{"name":"200 OK (per-line results \u2014 check status per line, not just the overall response)","code":200,"body":"{\n  \"data\": [\n    { \"index\": 0, \"status\": \"success\", \"repayment\": { \"id\": 42, \"receipt_number\": \"RCT000042\" } },\n    { \"index\": 1, \"status\": \"error\", \"message\": \"No query results for model [Modules\\\\Sacco\\\\Models\\\\Loan] 999999\" }\n  ],\n  \"summary\": { \"total\": 2, \"succeeded\": 1, \"failed\": 1 }\n}"}]},{"name":"List repayments (optionally by loan)","request":{"method":"GET","header":[{"key":"Accept","value":"application\/json"}],"url":{"raw":"{{base_url}}\/repayments?loan_id={{loan_id}}","host":["{{base_url}}"],"path":["repayments"],"query":[{"key":"loan_id","value":"{{loan_id}}"}]}}}]},{"name":"Loans","item":[{"name":"List loans","request":{"method":"GET","header":[{"key":"Accept","value":"application\/json"}],"url":{"raw":"{{base_url}}\/loans","host":["{{base_url}}"],"path":["loans"]}}},{"name":"Find a member's loans by National ID","request":{"method":"GET","header":[{"key":"Accept","value":"application\/json"}],"url":{"raw":"{{base_url}}\/loans?id_number={{id_number}}","host":["{{base_url}}"],"path":["loans"],"query":[{"key":"id_number","value":"{{id_number}}"}]}}},{"name":"Get one loan (find loan_id, total_balance before repaying)","request":{"method":"GET","header":[{"key":"Accept","value":"application\/json"}],"url":{"raw":"{{base_url}}\/loans\/{{loan_id}}","host":["{{base_url}}"],"path":["loans","{{loan_id}}"]}},"response":[{"name":"200 OK","code":200,"body":"{\n  \"data\": {\n    \"id\": 1,\n    \"loan_number\": \"L00001\",\n    \"member_id\": 3,\n    \"member_name\": \"Jane Wanjiku\",\n    \"member_id_number\": \"12345678\",\n    \"group_id\": null,\n    \"product\": \"Standard Loan\",\n    \"status\": \"active\",\n    \"applied_amount\": 50000,\n    \"approved_amount\": 50000,\n    \"disbursed_amount\": 50000,\n    \"total_balance\": 42000,\n    \"total_repaid\": 8000,\n    \"interest_rate\": 12,\n    \"loan_term\": 12,\n    \"branch_id\": 1,\n    \"application_date\": \"2026-06-01\",\n    \"disbursement_date\": \"2026-06-05\",\n    \"maturity_date\": \"2027-06-05\"\n  }\n}"}]},{"name":"Get a loan's repayment schedule (real per-installment due\/paid amounts)","request":{"method":"GET","header":[{"key":"Accept","value":"application\/json"}],"url":{"raw":"{{base_url}}\/loans\/{{loan_id}}\/schedule","host":["{{base_url}}"],"path":["loans","{{loan_id}}","schedule"]}},"response":[{"name":"200 OK","code":200,"body":"{\n  \"data\": [\n    { \"installment_no\": 1, \"due_date\": \"2026-09-01\", \"principal_amount\": 4166.67, \"interest_amount\": 500, \"penalty_amount\": 0, \"total_due\": 4666.67, \"total_paid\": 4666.67, \"balance\": 0, \"status\": \"paid\", \"paid_date\": \"2026-09-01\" },\n    { \"installment_no\": 2, \"due_date\": \"2026-10-01\", \"principal_amount\": 4166.67, \"interest_amount\": 500, \"penalty_amount\": 0, \"total_due\": 4666.67, \"total_paid\": 0, \"balance\": 4666.67, \"status\": \"pending\", \"paid_date\": null }\n  ]\n}"}]}]},{"name":"Members","item":[{"name":"List members","request":{"method":"GET","header":[{"key":"Accept","value":"application\/json"}],"url":{"raw":"{{base_url}}\/members","host":["{{base_url}}"],"path":["members"]}}},{"name":"Get one member","request":{"method":"GET","header":[{"key":"Accept","value":"application\/json"}],"url":{"raw":"{{base_url}}\/members\/{{member_id}}","host":["{{base_url}}"],"path":["members","{{member_id}}"]}}}]},{"name":"Savings Accounts","item":[{"name":"List savings accounts","request":{"method":"GET","header":[{"key":"Accept","value":"application\/json"}],"url":{"raw":"{{base_url}}\/savings-accounts","host":["{{base_url}}"],"path":["savings-accounts"]}}},{"name":"Get one savings account","request":{"method":"GET","header":[{"key":"Accept","value":"application\/json"}],"url":{"raw":"{{base_url}}\/savings-accounts\/{{savings_account_id}}","host":["{{base_url}}"],"path":["savings-accounts","{{savings_account_id}}"]}}}]},{"name":"Share Accounts","item":[{"name":"List share accounts","request":{"method":"GET","header":[{"key":"Accept","value":"application\/json"}],"url":{"raw":"{{base_url}}\/share-accounts","host":["{{base_url}}"],"path":["share-accounts"]}}},{"name":"Get one share account","request":{"method":"GET","header":[{"key":"Accept","value":"application\/json"}],"url":{"raw":"{{base_url}}\/share-accounts\/{{share_account_id}}","host":["{{base_url}}"],"path":["share-accounts","{{share_account_id}}"]}}}]},{"name":"Branches","item":[{"name":"List branches","request":{"method":"GET","header":[{"key":"Accept","value":"application\/json"}],"url":{"raw":"{{base_url}}\/branches","host":["{{base_url}}"],"path":["branches"]}}}]}]}