Below you can see the endpoints in this backend project.
Only endpoints and their parameters are specified in this reference. You can try the API to see the results returned.
Route | Service |
---|---|
access |
Access sharing |
auth |
Authentication |
orders |
Scheduled orders |
products |
Product inventory |
verification |
Email verification |
Decodes the given JWT token and generates a URL for the user to share access with.
POST /access/generate-url
Parameter | Description | Required |
---|---|---|
jwt |
JWT Token | true |
Adds the ID resolved from JWT to the users who have permission to access the inventory of the user with the ID value specified as the parameter.
POST /access/receive
Parameter | Description | Required |
---|---|---|
jwt |
JWT Token | true |
id |
The ID of the user who is sharing the access | true |
Lists the permissions that the current user shares with other users.
POST /access/view-shared
Parameter | Description | Required |
---|---|---|
jwt |
JWT Token | true |
Lists the permissions that other users have shared with the current user.
POST /access/view-received
Parameter | Description | Required |
---|---|---|
jwt |
JWT Token | true |
Allows the current user to revoke the permissions that other users have shared with them.
POST /access/revoke-shared
Parameter | Description | Required |
---|---|---|
jwt |
JWT Token | true |
id |
ID of the user whose shared access is being revoked | true |
Allows the current user to revoke the access permission shared by another user.
POST /access/revoke-received
Parameter | Description | Required |
---|---|---|
jwt |
JWT Token | true |
id |
ID of the user whose received access is being revoked | true |
Returns a JWT token to log in with the given credentials.
POST /auth/login
Parameter | Description | Required |
---|---|---|
user |
Email or username | true |
password |
Password | true |
Creates a new user record with the provided credentials. The /verification
endpoint is used to activate the user created in this endpoint.
POST /auth/register
Parameter | Description | Required |
---|---|---|
username |
Username | true |
email |
true |
|
password |
Password | true |
Decrypts the given JWT token to return the user's credentials.
POST /auth/get-credentials
Parameter | Description | Required |
---|---|---|
jwt |
JWT token | true |
Lists all scheduled orders that the user has access to.
POST /orders/get
Parameter | Description | Required |
---|---|---|
jwt |
JWT Token | true |
order_id |
Order ID | false |
Creates a new scheduled order.
POST /orders/create
Parameter | Description | Required |
---|---|---|
jwt |
JWT Token | true |
order |
Order data | true |
Updates a scheduled order.
POST /orders/update
Parameter | Description | Required |
---|---|---|
jwt |
JWT Token | true |
order_id |
Order ID | true |
updated_order |
Updated order data | true |
Delete a scheduled order.
POST /orders/delete
Parameter | Description | Required |
---|---|---|
jwt |
JWT Token | true |
order_id |
Order ID | true |
Lists all products that the user has access to.
POST /products/get
Parameter | Description | Required |
---|---|---|
jwt |
JWT Token | true |
product_id |
Product ID | false |
Creates a new product.
POST /products/create
Parameter | Description | Required |
---|---|---|
jwt |
JWT Token | true |
product |
Product data | true |
Updates a product.
POST /products/update
Parameter | Description | Required |
---|---|---|
jwt |
JWT Token | true |
product_id |
Product ID | true |
updated_product |
Updated product data | true |
Delete a product.
POST /products/delete
Parameter | Description | Required |
---|---|---|
jwt |
JWT Token | true |
product_id |
Product ID | true |
If there is a user with the given email address, sends a verification email to that email address. The sent email contains a verification key and must be used in the /verification/verify-email
endpoint.
GET /verification/send-email
Parameter | Description | Required |
---|---|---|
email |
Email address | true |
Checks if the given key matches the key generated at the /verification/send-email
endpoint, and if so, it activates the user's status.
GET /verification/verify-email
Parameter | Description | Required |
---|---|---|
key |
Verification key | true |
Checks whether the user with the given email address is verified.
GET /verification/is-verified
Parameter | Description | Required |
---|---|---|
email |
Email address | true |