Here's a list of all the URL Paths you can use with this backend and what each URL Path does.
Buildings, Rooms, Services
- GET /api/toa-nha
- POST /api/toa-nha
- GET /api/toa-nha/:id
- PUT /api/toa-nha/:id
- DELETE /api/toa-nha/:id
- GET /api/toa-nha/search
- GET /api/toa-nha/:id/phong
Rooms
- GET /api/phong
- POST /api/phong
- GET /api/phong/:id
- PUT /api/phong/:id
- DELETE /api/phong/:id
- GET /api/phong/search
- GET /api/phong/:id/hop-dong
- GET /api/phong/:id/hoa-don
Customers, Contracts
- GET /api/khach-hang
- POST /api/khach-hang
- GET /api/khach-hang/:id
- PUT /api/khach-hang/:id
- DELETE /api/khach-hang/:id
- GET /api/khach-hang/search
- GET /api/khach-hang/:id/hop-dong
- GET /api/hop-dong
- POST /api/hop-dong
- GET /api/hop-dong/:id
- PUT /api/hop-dong/:id
- DELETE /api/hop-dong/:id
- GET /api/hop-dong/search
- GET /api/hop-dong/:id/hoa-don
Invoices, Documents, Reports
- GET /api/hoa-don
- POST /api/hoa-don
- GET /api/hoa-don/:id
- PUT /api/hoa-don/:id
- DELETE /api/hoa-don/:id
- GET /api/hoa-don/search
- POST /api/hoa-don/:id/thanh-toan
- GET /api/giay-to
- POST /api/giay-to
- GET /api/giay-to/:id
- PUT /api/giay-to/:id
- DELETE /api/giay-to/:id
- GET /api/giay-to/search
- POST /api/giay-to/upload
- GET /api/giay-to/:id/download
- GET /api/bao-cao
- POST /api/bao-cao
- GET /api/bao-cao/:id
- PUT /api/bao-cao/:id
- DELETE /api/bao-cao/:id
- GET /api/bao-cao/search
- POST /api/bao-cao/upload
- GET /api/bao-cao/:id/download
Owners, Test
- GET /api/chu-nha
- POST /api/chu-nha
- GET /api/chu-nha/:id
- PUT /api/chu-nha/:id
- DELETE /api/chu-nha/:id
- GET /api/chu-nha/search
- GET /api/test
- GET /api/ping
- POST /api/logout
Returns a list of buildings.
Response:
[
{
id: "number",
name: "string",
},
];Creates a new building.
Request:
{
"name": "string"
}Response:
{
"id": "number",
"name": "string"
}Returns a single building.
URL Parameters:
id: building id
Response:
{
"id": "number",
"name": "string"
}Updates a building.
URL Parameters:
id: building id
Request:
{
"name": "string"
}Response:
{
"id": "number",
"name": "string"
}Deletes a building.
URL Parameters:
id: building id
Response:
- Status: 204 No Response
Returns buildings that match the search keyword.
Query Parameters:
q=...(optional): search keyword
Response:
[
{
id: "number",
name: "string",
},
];Returns rooms inside one building.
URL Parameters:
id: building id
Response:
[
{
id: "number",
name: "string",
},
];Returns a list of rooms.
Response:
[
{
id: "number",
name: "string",
},
];Creates a new room.
Request:
{
"name": "string"
}Response:
{
"id": "number",
"name": "string"
}Returns a single room.
URL Parameters:
id: room id
Response:
{
"id": "number",
"name": "string"
}Updates a room.
URL Parameters:
id: room id
Request:
{
"name": "string"
}Deletes a room.
URL Parameters:
id: room id
Response:
- Status: 204 No Response
Returns rooms that match the search keyword.
Query Parameters:
q=...(optional): search keyword
Returns contracts for one room.
URL Parameters:
id: room id
Returns invoices for one room.
URL Parameters:
id: room id
Returns a list of customers.
Creates a new customer.
Returns a single customer.
URL Parameters:
id: customer id
Updates a customer.
URL Parameters:
id: customer id
Deletes a customer.
URL Parameters:
id: customer id
Returns customers that match the search keyword.
Query Parameters:
q=...(optional): search keyword
Returns contracts for one customer.
URL Parameters:
id: customer id
Returns a list of contracts.
Creates a new contract.
Returns a single contract.
URL Parameters:
id: contract id
Updates a contract.
URL Parameters:
id: contract id
Deletes a contract.
URL Parameters:
id: contract id
Returns contracts that match the search keyword.
Query Parameters:
q=...(optional): search keyword
Returns invoices for one contract.
URL Parameters:
id: contract id
Returns a list of invoices.
Creates a new invoice.
Returns a single invoice.
URL Parameters:
id: invoice id
Updates an invoice.
URL Parameters:
id: invoice id
Deletes an invoice.
URL Parameters:
id: invoice id
Returns invoices that match the search keyword.
Query Parameters:
q=...(optional): search keyword
Marks an invoice as paid.
URL Parameters:
id: invoice id
Returns a list of documents.
Creates a new document record.
Returns a single document.
URL Parameters:
id: document id
Updates a document.
URL Parameters:
id: document id
Deletes a document.
URL Parameters:
id: document id
Returns documents that match the search keyword.
Query Parameters:
q=...(optional): search keyword
Uploads a file.
Downloads a file.
URL Parameters:
id: document id
Returns a list of reports.
Creates a new report.
Returns a single report.
URL Parameters:
id: report id
Updates a report.
URL Parameters:
id: report id
Deletes a report.
URL Parameters:
id: report id
Returns reports that match the search keyword.
Query Parameters:
q=...(optional): search keyword
Uploads a report file.
Downloads a report file.
URL Parameters:
id: report id
Returns a list of owners.
Creates a new owner.
Returns a single owner.
URL Parameters:
id: owner id
Updates an owner.
URL Parameters:
id: owner id
Deletes an owner.
URL Parameters:
id: owner id
Returns owners that match the search keyword.
Query Parameters:
q=...(optional): search keyword
Returns a simple test response.
Returns a simple connection check response.
Logs out the current user.