API Endpoint | Method | Auth | Description | |
---|---|---|---|---|
1. | /api/auth/login | POST | NO | Send a login request |
2. | /api/auth/signup | POST | NO | Send a singup request |
3. | /api/auth/logout | POST | YES | Logout the current user |
4. | /api/auth/forgot-password | POST | NO | Reset the password |
API Endpoint | Method | Auth | Description | |
---|---|---|---|---|
1. | /api/update/user | POST | YES | Update User Details |
2. | /api/user/details/{userId} | GET | YES | Get user details |
3. | /api/user/bookings/{userId} | GET | YES | Get user's bookings |
4. | /api/book/cancellations/{userId} | GET | YES | Get user's cancellations |
API Endpoint | Method | Auth | Description | |
---|---|---|---|---|
1. | /api/location/add-location/ | POST | YES | Add new location |
2. | /api/location/update-location/{locationId} | GET | YES | Update location data |
3. | /api/location/ | GET | NO | Get random locations |
4. | /api/location/search/kolkata | GET | NO | Search for a locations |
5. | /api/location/get-availability/{locationId} | GET | NO | Get Location's availablity data |
API Endpoint | Method | Auth | Description | |
---|---|---|---|---|
1. | /api/book/lock/ | POST | YES | Temporarily lock a booking |
2. | /api/book/lock/details/{lockId} | GET | YES | Get booking lock details |
3. | /api/book/final | POST | YES | Finalize the locked booking |
4. | /api/book/cancel | POST | YES | Cancel a booking |
5. | /api/book/cancel/approve | POST | YES | Approve a cancellation request |
API Endpoint | Method | Auth | Description | |
---|---|---|---|---|
1. | /api/auth/resend-otp | POST | YES | Send email verification or password reset OTP |
2. | /api/auth/verify-otp | POST | * | Resend email verification or password reset OTP |
Send a POST
request to the /api/auth/login
endpoint.
POST http://example.com/api/auth/login
Content-Type: application/json
{
"email": "email@domain.com",
"password": "yourPassword"
}
Send a POST
request to the /api/auth/signup
endpoint.
POST http://example.com/api/auth/signup
Content-Type: application/json
{
"email": "email@domain.com",
"password": "yourPassword"
}
The request body should also contain the following information
middleName
, email
, phone
, addressMain
, country
, state
, city
, pincode
, dob
with their values in string format.
Send a POST
request to the /api/auth/logout
endpoint.
POST http://example.com/api/auth/logout
Content-Type: application/json
{
"email": "email@domain.com",
}
Send a POST
request to the /api/auth/forgot-password
endpoint.
POST http://example.com/api/auth/forgot-password
Content-Type: application/json
{
"email": "email@domain.com",
}
Send a POST
request to the /api/update/user
endpoint.
POST http://example.com/api/update/user
Content-Type: multipart/form-data
{
"firstName": "modified-first-name",
"lastName" : "modified-last-name",
"email": "email@domain.com",
}
The multipart form data can also contain the following fields
middleName
, email
, phone
, addressMain
, country
, state
, city
, pincode
, dob
in string format.
Send a GET
request to the /api/user/details/{userId}
endpoint.
GET http://example.com/api/user/details/{userId}
Send a GET
request to the /api/user/bookings/{userId}
endpoint.
GET http://example.com/api/user/bookings/{userId}
Send a GET
request to the /api/user/cancellations/{userId}
endpoint.
GET http://example.com/api/user/cancellations/{userId}
Send a POST
request to the /api/location/add-location
endpoint.
POST http://example.com/api/location/add-location
Content-Type: application/json
{
"name" : "name-of-the-location"
"description" : "description-of-the-location"
"address" : "address-of-the-location"
}
The request body JSON should also contain all these fields.
city
, state
, country
, pincode
, latitude
, longitude
, ticketPrice
containing string data,
cover-iamge1
, cover-iamge2
, cover-iamge3
, slider-image1
, slider-image2
and slider-image3
containing image data.
Send a POST
request to the /api/location/update-location/{locationId}
endpoint.
POST http://example.com/api/location/update-location/{locationId}
Content-Type: application/json
{
"name" : "updated-name"
"description" : "updated-description"
"address" : "updated-address"
}
The request body JSON MAY contain all these fields.
city
, state
, country
, pincode
, latitude
, longitude
, ticketPrice
containing updatedstring data,
cover-iamge1
, cover-iamge2
, cover-iamge3
, slider-image1
, slider-image2
and slider-image3
containing updated image data.
Send a GET
request to the /api/location/
endpoint.
GET http://example.com/api/location/
Send a GET
request to the /api/location/search/{seaerchString}
endpoint.
GET http://example.com/api/location/{searchString}
Send a GET
request to the /api/location/get-availability/{locationId}
endpoint.
GET http://example.com/api/location/get-availability/{locationId}
Send a POST
request to the /api/book/lock
endpoint.
POST http://example.com/api/location/get-availability/{locationId}
Content-Type: application/json
{
"locationId" : location-id,
"noOfTickets" : 3,
"bookingDate" : "01-01-0001"
}
Send a GET
request to the /api/book/lock/details/{lockId}
endpoint.
GET http://example.com/api/book/lock/details/{lockId}
Send a POST
request to the /api/book/final
endpoint.
POST http://example.com/api/book/final
Content-Type: application/json
{
"lockId" : 123,
"paymentId": "random-payment-id"
}
Send a POST
request to the /api/book/cancel
endpoint.
POST http://example.com/api/book/cancel
Content-Type: application/json
{
"bookingId" : 123,
"userId" : 1234
}
Send a POST
request to the /api/book/cancel/approve
endpoint.
POST http://example.com/api/book/cancel/approve
Content-Type: application/json
{
"bookingId" : 123,
"adminId" : 1234
}
Send a POST
request to the /api/auth/resend-otp
endpoint.
POST http://example.com/api/auth/resend-otp
Content-Type: application/json
{
"email": "lipapad224@wiroute.com",
"otpType": "passwordReset"
}
otpType key can accept two values.
Use passwordReset
when the OTP is to validate user for password reset.
Use emailVerification
the email of the user needs to be verified (during first signup)
Send a POST
request to the /api/auth/verify-otp
endpoint.
POST http://example.com/api/auth/verify-otp
Content-Type: application/json
{
"email": "email@domain.com",
"otp": "anOtP",
"otpType": "passwordReset"
}
otpType key can accept two values.
Use passwordReset
when you want to validate the OTP sent to reset the password.
Use emailVerification
when you want to validate the OTP sent to verify the user's email id.