The User Microservice API offers a range of endpoints to facilitate user account management, including user creation, authentication, and the management of user addresses and payments.
Description: This group of endpoints provides functionalities to manage user accounts, including creation, authentication, retrieval, updating, and deletion. The "Verify User" endpoint allows the verification of a user's account.
- POST
/api/user
- Description: Creates a new user account.
- GET
/api/user
- Description: Retrieves a list of all user accounts.
- POST
/api/user/login
- Description: Authenticates a user based on provided credentials.
-
GET
/api/user/{id}
- Description: Retrieves detailed information about a user by ID.
-
PUT
/api/user/{id}
- Description: Updates user details by ID.
-
DELETE
/api/user/{id}
- Description: Deletes a user account by ID.
- GET
/api/user/{userId}/verify
- Description: Verifies the user's account.
Description: This group of endpoints manages user addresses, allowing the addition, retrieval, updating, and deletion of addresses. The "Verify User Address" endpoint verifies a specific user address.
-
POST
/api/user/{userId}/address
- Description: Adds a new address for the specified user.
-
GET
/api/user/{userId}/address
- Description: Retrieves all addresses associated with a user.
-
GET
/api/user/{userId}/address/{addressId}
- Description: Retrieves detailed information about a specific user address by ID.
-
PUT
/api/user/{userId}/address/{addressId}
- Description: Updates a user address by ID.
-
DELETE
/api/user/{userId}/address/{addressId}
- Description: Deletes a user address by ID.
- GET
/api/user/{userId}/address/{addressId}/verify
- Description: Verifies the specified user address.
Description: This group of endpoints manages user payments, allowing the addition, retrieval, updating, and deletion of payment methods. The "Verify User Payment" endpoint verifies a specific user payment method.
-
POST
/api/user/{userId}/payment
- Description: Adds a new payment method for the specified user.
-
GET
/api/user/{userId}/payment
- Description: Retrieves all payment methods associated with a user.
-
GET
/api/user/{userId}/payment/{paymentId}
- Description: Retrieves detailed information about a specific user payment method by ID.
-
PUT
/api/user/{userId}/payment/{paymentId}
- Description: Updates a user payment method by ID.
-
DELETE
/api/user/{userId}/payment/{paymentId}
- Description: Deletes a user payment method by ID.
- GET
/api/user/{userId}/payment/{paymentId}/verify
- Description: Verifies the specified user payment method.
Ensure that you have the following prerequisites installed on your machine:
1. Clone the repository:
git clone https://github.com/Pavithra-Selvaraj/UserService
cd UserService
2. Update DB connection string: Open appsettings.json and update the database connection string.
3.Build and Run the application locally:
dotnet build
dotnet run
This project is licensed under the MIT License.
For detailed information on how to use the API, refer to the API documentation available at http://localhost:5004/swagger.