-
Notifications
You must be signed in to change notification settings - Fork 0
API Specifications
Method | Path | Description |
---|---|---|
🟧 POST | /login/register | New User Creation |
🟧 POST | /login | Login |
🟧 POST | /login/check/username/[email protected] | Login Check Username |
🟧 POST | /login/check/phone/9830098300 | Login Check Phone |
🟦 PUT | /login/otp/validate | OTP Validate HEADER CHANGE |
🟧 POST | /login/otp/resend | OTP Resend |
🟧 POST | /login/forget | Forget Password Initiate |
🟧 POST | /login/forget/new | Forget Password Update New Password |
🟧 POST | /login/passwd | Change New Password |
🟧 POST | /meal/create | Create Meal |
🟩 GET | /booking | Fetch Previous User Bookings |
🟩 GET | /meal/true | Fetch All Upcoming Meals |
🟩 GET | /meal | Show Upcoming Meal Options |
🟧 POST | /booking/create/22 | Create Booking |
🟦 PUT | /booking/avail/37 | Avail Booking |
🟥 DELETE | /booking/35 | Cancel Booking |
🟩 GET | /booking/2022-12-23 | ALL Bookings for Date |
🟦 PUT | /booking/pickup/18 | Avail Extra Meal |
🟩 GET | /meal/false | Fetch All Previous Meals |
🟦 PUT | /meal/activate/11 | Activate Meal |
🟥 DELETE | /meal/activate/11 | Deactivate Meal |
🟦 PUT | /meal/lock/11 | Lock Meal |
🟥 DELETE | /meal/lock/11 | Unlock Meal |
🟦 PUT | /meal/ready/11 | Ready Meal |
🟥 DELETE | /meal/ready/11 | UnReady Meal |
🟩 GET | /meal/available | Fetch All Available Meals |
🟩 GET | /meal/count/1 | Fetch Meal Count By Date |
Name | Path | Description |
---|---|---|
noauthAuth | #/components/securitySchemes/noauthAuth | 🔓 No Authentication |
bearerAuth | #/components/securitySchemes/bearerAuth | 🔒 Bearer Token Authentication |
-
Summary
New User Creation -
Security 🔓 No Auth
- application/json
{
"emailId": "[email protected]",
"password": "12345678",
"firstName": "Subhrodip",
"lastName": "Mohanta",
"mobile": "9830098300"
}
JSON Field Name | Field Type | Necessity | Description | Validation | Default Value |
---|---|---|---|---|---|
emailId | string | required | Email ID of the user, this will be used for login | Not Blank and Unique and Domain specific | |
password | string | required | password of the user | Not Blank | |
firstName | string | required | First Name of the User | Not Blank | |
lastName | string | required | Last Name of the User | Not Blank | |
mobile | string | optional | Mobile Number of the User | Unique | null |
application/json
{
"salt": 3
}
JSON Field Name | Field Type | Necessity | Description | Validation |
---|---|---|---|---|
salt | number | required | This Salt is required when you are verifying the OTP | Must be Greater then Zero 0
|
- 200 Successful response
application/json
-
Summary
Login -
Security 🔓 No Auth
- application/json
{
"username": "[email protected]",
"password": "12345678"
}
- application/json
{
"salt": 3
}
- 200 Successful response
application/json
[POST]/login/check/username/
[email protected]
-
Summary
Login Check Username -
Security 🔓 No Auth
- 200 Successful response
application/json
-
Summary
Login Check Phone -
Security 🔓 No Auth
- 200 Successful response
application/json
-
Summary
OTP Validate HEADER CHANGE -
Security 🔓 No Auth
x-otp-validate-forget?: boolean
- application/json
{
"salt": 1,
"otp": 123456
}
- application/json
{
"jwtToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
"user": {
"id": 23,
"firstName": "John",
"lastName": "Doe",
"emailId": "[email protected]",
"mobile": "9830098300",
"lastLogin": 1668698320470
}
}
JSON Field Name | Field Type | Necessity | Description | Validation |
---|---|---|---|---|
jwtToken | string | required | JSON Web Token containing the login information | Not Blank |
user | object | required | Password of the user | Not Blank |
id | number | required | Internal User ID for the logged in user | Not Blank |
firstName | string | required | First Name of the User | Not Blank |
lastName | string | required | Last Name of the User | Not Blank |
emailId | string | required | Email ID or Login ID of the User | Not Blank |
mobile | string | optional | Mobile Number of the User | |
lastLogin | number | required | Epoch Milliseconds of the last Login Time | Not Blank |
- 200 Successful response
application/json
-
Summary
OTP Resend -
Security 🔓 No Auth
- application/json
{
"salt": 1
}
- application/json
{
"salt": 1
}
- 200 Successful response
application/json
-
Summary
Forget Password Initiate -
Security 🔓 No Auth
- application/json
{
"username": "[email protected]"
}
- application/json
{
"salt": 1
}
- 200 Successful response
application/json
-
Summary
Forget Password Update New Password -
Security 🔓 No Auth
- application/json
{
"newPassword": "12345678"
}
- 200 Successful response
application/json
-
Summary
Change New Password -
Security 🔒 Bearer Token
- application/json
{
"currentPassword": "12345678",
"updatedPassword": "23456789"
}
- 200 Successful response
application/json
-
Summary
Create Meal -
Security 🔒 Bearer Token
- application/json
{
"name": "Pizza",
"date": "2022-12-23",
"mealOptions": [
{
"name": "Peri Peri Cheese"
},
{
"name": "Cheese Burst"
},
{
"name": "NonVeg Loaded"
}
]
}
- application/json
{
"id": 66,
"name": "Pizza",
"date": "2022-12-23",
"mealOptions": [
{
"id": 70,
"name": "Peri Peri Cheese",
"count": 0
},
{
"id": 71,
"name": "Cheese Burst",
"count": 0
},
{
"id": 72,
"name": "NonVeg Loaded",
"count": 0
}
]
}
- 200 Successful response
application/json
-
Summary
Fetch Previous User Bookings -
Security 🔒 Bearer Token
prev?: string
- application/json
[
{
"id": 17,
"firstName": "Subhrodip",
"lastName": "Mohanta",
"date": "2022-12-23",
"mealOption": "NonVeg Loaded",
"mealOptionId": 6,
"availedAt": 234245380
}
]
- 200 Successful response
application/json
-
Summary
Fetch All Upcoming Meals -
Security 🔒 Bearer Token
- 200 Successful response
application/json
-
Summary
Show Upcoming Meal Options -
Security 🔒 Bearer Token
- 200 Successful response
application/json
-
Summary
Create Booking -
Security 🔒 Bearer Token
- 200 Successful response
application/json
-
Summary
Avail Booking -
Security 🔒 Bearer Token
- 200 Successful response
application/json
-
Summary
Cancel Booking -
Security 🔒 Bearer Token
- 200 Successful response
application/json
-
Summary
ALL Bookings for Date -
Security 🔒 Bearer Token
- 200 Successful response
application/json
-
Summary
Avail Extra Meal -
Security 🔒 Bearer Token
- 200 Successful response
application/json
-
Summary
Fetch All Previous Meals -
Security 🔒 Bearer Token
- 200 Successful response
application/json
-
Summary
Activate Meal -
Security 🔒 Bearer Token
- 200 Successful response
application/json
-
Summary
Deactivate Meal -
Security 🔒 Bearer Token
- 200 Successful response
application/json
-
Summary
Lock Meal -
Security 🔒 Bearer Token
- 200 Successful response
application/json
-
Summary
Unlock Meal -
Security 🔒 Bearer Token
- 200 Successful response
application/json
-
Summary
Ready Meal -
Security 🔒 Bearer Token
- 200 Successful response
application/json
-
Summary
UnReady Meal -
Security 🔒 Bearer Token
- 200 Successful response
application/json
-
Summary
Fetch All Available Meals -
Security 🔒 Bearer Token
- 200 Successful response
application/json
-
Summary
Fetch Meal Count By Date -
Security 🔒 Bearer Token
application/json
{
"mealOptionCountWithId": {
"1": {
"redeemed": 0,
"available": 0,
"total": 0
},
"2": {
"redeemed": 0,
"available": 0,
"total": 0
}
}
}
- 200 Successful response
application/json
{
"message": "Email ID already exists",
"timestamp": 1668688031617
}
JSON Field Name | Field Type | Necessity | Description |
---|---|---|---|
message | string | required | User Friendly Error Message |
timestamp | number | required | Epoch Milliseconds timestamp of the error generated |
{
"type": "http",
"scheme": "noauth"
}
{
"type": "http",
"scheme": "bearer"
}