A Peak API is an ASP.NET Core Web API that provides endpoints for calculating installments and get persons.
- .NET 8;
- Visual Studio.
- Clone the repository;
- Navigate to the project directory;
- Run the application.
The application will be available at http://localhost:44322 | https://peakapi.azurewebsites.net/swagger/index.html.
POST /calculate?installments={installments}&value={value}
Parameters:
installments(required): Number of desired installments.value(required): Total value of the purchase.
200 OKif the request is successful. Returns the calculated installment value.400 Bad Requestif there is an error in the request. Returns the error message.
GET /person/{id}
Parameters:
id(required): ID of the person to be queried.
200 OKif the request is successful. Returns the information about the queried person.404 Not Foundif the person is not found. Returns the error message.