In this repo, the backend for a billing application has been setup. This is done to help the students who are learning front end development either React / Angular / Vue to build an application to test out their skills.
The modules are as follows
- User
- Customer
- Product
- Bill
API's base url - http://dct-pos-app.herokuapp.com/api
# | action | method | url | request | response | auth (headers) |
---|---|---|---|---|---|---|
1. | register a user | POST | /users/register |
|
|
no |
2. | login a user | POST | /users/login |
|
|
no |
3. | get user information | GET | /users/account | - |
|
{ Authorization : 'Bearer token'} |
note - * indicates a required field
# | action | method | url | request | response | auth (headers) |
---|---|---|---|---|---|---|
1. | lists all customers | GET | /customers | - | empty array or array of objects |
{ Authorization : 'Bearer token'} |
2. | create a customer | POST | /customers |
|
|
{ Authorization : 'Bearer token'} |
3. | get a customer | GET | /customers/:id | - |
|
{ Authorization : 'Bearer token'} |
4. | update a customer | PUT | /customers/:id |
|
|
{ Authorization : 'Bearer token'} |
5. | delete a customer | DELETE | /customers/:id | - |
|
{ Authorization : 'Bearer token'} |
note - * indicates a required field
# | action | method | url | request | response | auth (headers) |
---|---|---|---|---|---|---|
1. | lists all products | GET | /products | - | empty array or array of objects | { Authorization : 'Bearer token'} |
2. | create a product | POST | /products |
|
|
{ Authorization : 'Bearer token'} |
3. | get a product | GET | /products/:id | - |
|
{ Authorization : 'Bearer token'} |
4. | update a product | PUT | /products/:id |
|
|
{ Authorization : 'Bearer token'} |
5. | delete a product | DELETE | /products/:id | - |
|
{ Authorization : 'Bearer token'} |
note - * indicates a required field
# | action | method | url | request | response | auth (headers) |
---|---|---|---|---|---|---|
1. | List all bills | GET | /bills | - | empty array or array of objects | { Authorization : 'Bearer token'} |
2. | create a bill | POST | /bills |
|
|
{ Authorization : 'Bearer token'} |
3. | get a bill | GET | /bills/:id | - |
|
{ Authorization : 'Bearer token'} |
4. | delete a bill | DELETE | /bills/:id | - |
|
{ Authorization : 'Bearer token'} |
note - * indicates a required field