As the name suggests, the banks’ plugin allows you to add, remove, edit, and view banks. It is mostly meant for use by other plugins.

End Points

Bank (/bank)

Title/bank
MethodGET
URLGET /bank
DescriptionAttempts to read first 100 banks and returns them.
Query Parameters 
ResponseStatus Code: 200
{
name: String (Bank name)
address: String? (Bank address, nullable)
id: int (The unique ID of bank)
}
Requires AuthYES
Title/bank
MethodPOST
URLPOST /bank
DescriptionCreate a new bank
Body Parameters{
data: {
name: String
address1: String
address2: String?
address3: String?
}
}
ResponseStatus Code: 200
{
name: String (Bank name)
address1: String
address2: String?
address3: String?
id: int (The unique ID of the bank)
}
Requires AuthYES
Title/bank/:id
MethodPATCH
URLPATCH /bank/:id
DescriptionUpdate a bank by its ID
Body Parameters{
data: {
name: String
address1: String
address2: String?
address3: String?
}
}
ResponseStatus Code: 200
{
name: String (Bank name)
address1: String
address2: String?
address3: String?
id: int (The unique ID of the bank)
}
Requires AuthYES
Title/bank/:id
MethodDELETE
URLDELETE /bank
DescriptionDelete a bank by its ID
Query Parameters 
ResponseStatus Code: 200
{
success: boolean
}
Requires AuthYES
Title/bank/:id
MethodGET
URLGET /bank/:id
DescriptionFetch bank details by its ID.
Query Parameters 
ResponseStatus Code: 200
{
id: number
name: String
address1: String
address2: String?
address3: String?
}
Requires AuthYES

For Developers:

I probably don’t have to mention, the data is fetched from the bank table. You can add any related routes or frontend to this plugin.

Tagged:

Leave a Reply

Your email address will not be published. Required fields are marked *