Skip to content

Simple Web API Sales project using clean architecture with authorization and authentication

License

Notifications You must be signed in to change notification settings

renzojared/sales-challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sales project

Web Api to manage sales

Technologies

  • .NET 7
  • Entity Framework Core
  • SQL Server
  • Swagger

Environment Variables

To run this project, you will need to change the following environment variables in appsettings.json

ConnectionString

Must contain own local connection string

To add and update migration you also need to change in SalesContextFactory.cs

API Endpoints

Token JWT

  POST api/LogIn/Token
{
  "username": "[email protected]",
  "password": "MM@11"
}
Parameter Type Description
username string Required. The email of employee
password string Required. The secrect password

App Screenshot

Then add Bearer to Swagger to use other endpoints

App Screenshot

Create Order

  POST api/Order/Create
{
  "products": [
    1,2
  ],
  "sellerCode": "MM11",
  "delivererCode": "MM12"
}
Parameter Type Description
products int[] Required. Array of products id
sellerCode string Required. The user code of seller
delivererCode string Required. The user code of deliverer

Change State Order

  POST api/Order/NextState
{
  "orderNumber": "10001"
}
Parameter Type Description
orderNumber string Required. The orderNumber returns at order/create

About

Simple Web API Sales project using clean architecture with authorization and authentication

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages