📘 API Documentation: List Due Rents
Base URL
https://property.ysgcloud.com.ng
Endpoint
/api/listduerents
Authentication
No authentication required. If added later, use Authorization: Bearer <token>.
Request
- Method: GET
- Headers:
Accept: application/json
Response
Returns an array of due rent objects with the following fields:
- PropertyNo
- UnitNo
- UnitName
- TenantName
- StartDate
- ExpiryDate
- RentAmount
- RentStatus
Example Success Response
[
{
"PropertyNo": "P001",
"UnitNo": "U001",
"UnitName": "Flat A",
"TenantName": "Samuel Johnson",
"StartDate": "2025-01-01",
"ExpiryDate": "2025-12-31",
"RentAmount": 150000,
"RentStatus": "Due"
},
{
"PropertyNo": "P001",
"UnitNo": "U002",
"UnitName": "Flat B",
"TenantName": "Mary Adams",
"StartDate": "2025-02-01",
"ExpiryDate": "2026-01-31",
"RentAmount": 200000,
"RentStatus": "Overdue"
}
]
Error Response
{
"status": "error",
"message": "Invalid request or server error"
}
Example Usage
JavaScript (Browser)
<script>
fetch("https://property.ysgcloud.com.ng/api/listduerents")
.then(response => {
if (!response.ok) throw new Error("Network error");
return response.json();
})
.then(duerents => {
console.log("Retrieved due rents:", duerents);
duerents.forEach(r => {
console.log(
`PropertyNo: ${r.PropertyNo}, UnitNo: ${r.UnitNo}, UnitName: ${r.UnitName}, Tenant: ${r.TenantName},
Start: ${r.StartDate}, Expiry: ${r.ExpiryDate}, Amount: ${r.RentAmount}, Status: ${r.RentStatus}`
);
});
})
.catch(err => console.error("Error:", err));
</script>
Postman
GET Request
- Method: GET
- URL:
https://property.ysgcloud.com.ng/api/listduerents - Headers:
Accept: application/json
Live Demo
Open your browser console to see the retrieved due rent data: