This document provides a comprehensive overview of all the API endpoints defined in the Root2Route application.
The base URL for the API is api/v1.
Warning
Important Bug Found: In Domain/MetaData/Router.cs, the routing prefix for Product and Order is missing a forward slash (/).
For example: public const string Prefix = rule + "product"; results in api/v1product instead of api/v1/product. You should fix this in Router.cs by adding "/product" and "/order".
POST /register- Register a new userPOST /login- User loginPOST /verify-otp- Verify OTP email/phonePOST /resend-otp- Resend OTPPOST /forget-password- Request password resetPOST /reset-password- Execute password reset
GET /all- Get all plant informationGET /paginated- Get paginated plant infoPOST /create- Create new plant infoPUT /edit- Edit existing plant infoDELETE /delete- Delete a plant info
GET /all- Get all guide stepsGET /{id}- Get a specific step by IDGET /by-plant/{id}- Get steps by Plant IDGET /by-name/{plantName}- Get steps by Plant Name
POST /Add- Add a new productGET /GetAll- Get all productsGET /{id}- Get product by IDGET /Organization/{organizationId}- Get products by Org IDPUT /Update- Update a productPUT /ChangeStatus- Change product statusDELETE /Delete/{id}- Delete product
POST /Create- Create a new orderGET /MyOrders- Get current user's ordersGET /{id}- Get order by IDPUT /ChangeStatus- Change order statusDELETE /Cancel/{id}- Cancel an order
GET /- Get all organizationsPOST /- Create organizationPUT /- Update organizationGET /{id}- Get organization detailsDELETE /{id}- Soft delete organizationPUT /{id}/restore- Restore organizationPUT /{id}/change-owner- Change organization's ownerPUT /{id}/status- Change organization statusPOST /{id}/logo- Upload org logoGET /{id}/statistics- View org statisticsGET /my- Get user's own organizationsGET /status/{status}- Get organizations by status
Roles (api/v1/organization-roles):
POST /create- Create roleGET /by-organization/{organizationId}- Get roles for orgGET /system-permissions- Get all system permissions
Members (api/v1/organization-members):
POST /add- Add member to orgGET /by-organization/{organizationId}- Get org membersDELETE /{organizationMemberId}/remove- Remove member
Invitations (api/v1/organization-invitations):
POST /send- Send invitationGET /my- Get current user invitationsPOST /accept- Accept invitationPOST /revoke- Revoke invitation
POST /analyze- Analyze a plant image through the model
POST /create- Create new auctionPUT /{auctionId}/update- Update auction detailsPUT /{auctionId}/cancel- Cancel active auctionGET /{id}- Get auction detailsGET /GetActive- Query active auctionsGET /GetCompleted- Query completed auctionsPOST /{id}/checkout- Checkout won auctionGET /my-organization/{organizationId}- View org's auctionsGET /my-won- View won auctionsGET /my-participated- View participated auctionsPOST /{auctionId}/bid- Place a bid
POST /start- Start new chat roomPOST /send- Send messagePOST /accept-offer//reject-offer- Respond to chat offersGET /my-rooms- List my chat roomsGET /{chatRoomId}/history- Load chat historyGET /{roomId}/details- Room detailsPUT /{roomId}/close- Close chatDELETE /messages/{messageId}- Delete message
POST /dispatch- Dispatch shipmentGET /addresses- Get my saved addressesPOST /addresses- Add new addressPUT /{id}/status- Update shipment status
POST /- Add a reviewGET /organization/{orgId}- Get org reviews
GET /- Get my notificationsGET /unread-count- Unread items countPUT /{id}/read- Mark one as readPUT /read-all- Mark all as read