LeFla Accomodations
account
read
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
user_id required |
activate
read
used to activate the user account using link sent to the email. When the user clicks on the link sent them , this end point will check to see if it's authentic before redirecticting the user to the login page of the website if legit.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
uidb64 required | |
token required |
add-hostel
create
this endpoint is used in adding hostels/rentals to the system. This is done by landlords after being registered Below is the skeleton request body that is ti be used
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
hostel_name required | |
hostel_description required | |
hostel_rating | |
avilable_amenities required | |
town | |
landlord required | |
lon | |
lat | |
place_name |
bookings
book-hostel > create
used to book hostels after paying a visit
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
booking_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
PhoneNumber required |
book-hostel-visit > create
Used to make a booking . you will have to pass both hostel id and the potential tenant id (user_id) as the tenant id
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
room | |
tenant required |
booking-status > update
This endpoint takes three parameters as shown below. The status Parameter should have one of the foollowing Five options.(REQUESTED,ACCEPTED,BOOKED,COMPLETED,CANCELLED). This status option is what will be used to track the booking progress
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
booking_id | |
status required | |
reason_for_cancelling |
list-bookings > read
Used to list all the bookings made by the user.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
user_id required |
requested-bookings > read
used to check all the new requested visits made by interested tenants
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
landlord_id required |
hostels
list
Used to get specific hostels from the db. You can add page size or page number as parameters for pagination.d
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
read
Used to get specific hostels from the db. You can add page size or page number as parameters for pagination.d
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this hostel. |
hostels-cat
read
Used to filter hostels based on the categories
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
category required |
is_landlord
read
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
user_id required |
landlords
list
used to list all the landlords in the system
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
login
create
Takes a set of user credentials and returns an access and refresh JSON web token pair to prove the authentication of those credentials.
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
username required | |
password required |
register
create
Enables registration of a new user returning the keyed in details if successful
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
email required | |
username required | |
phonenumber | |
password required | |
password_confirmation | |
fullname | |
picture |
reset-password
create
Handles reset password request and sends the reset link to the provided email provided if exist in the database
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
email required |
rooms
list
Used to get rooms from the db. You can add page size or page number as parameters for pagination.d
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
read
Used to get rooms from the db. You can add page size or page number as parameters for pagination.d
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique value identifying this room. |
search-rooms
list
use this endpoint for search.
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
set-password
create
Enables reset of a new password
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
uidb64 required | |
token required | |
password required |
token
refresh > create
Takes a refresh type JSON web token and returns an access type JSON web token if the refresh token is valid.
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
refresh required |
verify > create
Takes a token and indicates if it is valid. This view provides no information about a token's fitness for a particular use.
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
token required |
top-up-wallet
create
used to deposit money on the wallet using wallet Id
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
Amount required | |
PhoneNumber required | |
wallet_id required |
transactions
callback > create
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
Amount required | |
PhoneNumber required | |
booking required |
users
list
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
create
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
email required | |
username required | |
id | |
password required |
activation
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
uid required | |
token required |
resend_activation
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
email required |
reset_password
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
email required |
reset_password_confirm
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
uid required | |
token required | |
new_password required |
reset_username
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
email required |
reset_username_confirm
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
new_username required |
set_password
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
new_password required | |
current_password required |
set_username
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
current_password required | |
new_username required |
read
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique value identifying this User. |
update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique value identifying this User. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
email required | |
id |
partial_update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique value identifying this User. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
email | |
id |
delete
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique value identifying this User. |
me > update
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
email required | |
id |
me > partial_update
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
email | |
id |
wallet
read
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
user_id required |