8/5/22, 6:37 PM
TripBuddy
Documentation Settings
TripBuddy
Trip Buddy API collection
This collection contains requests from this [API](https://trip-buddy-be.herokuapp.com/)
EndFragmen)
It includes the following requests and subsequent requests will be added in the next revisions
Signup / Register a user
Facebook Signup
Google Signup
Forgot Password
Reset Password
Signin
Get the Index Page
Get all users
Get flights
Authentication
This section contains all authentication request such as signup, forgetpassword, resetpassword, etc. The backend team would keep updating
this section as required.
https://documenter.getpostman.com/view/-/Uz5CKxb2
1/12
8/5/22, 6:37 PM
TripBuddy
Documentation Settings
POST SIGNUP
https://trip-buddy-be.herokuapp.com/api/v1/tripbuddy/users/signup
API endpoint for registering user
HTTP status = 201
Message = Success
user = user data
token = token
BODY raw
{
"name": "Oladimeji Ibitoye",
"email":-,
"password": "password03",
"confirmPassword": "password03"
}
Example Request
POST SIGNUP EXAMPLE - p…
curl --location --request POST 'https://trip-buddy-be.herokuapp.com/api/v1/tripbuddy/users/signup' \
--data-raw '{
"name": "Oladimeji Ibitoye",
"email":-,
"password": "password03",
"confirmPassword": "password03"
}'
https://documenter.getpostman.com/view/-/Uz5CKxb2
2/12
8/5/22, 6:37 PM
TripBuddy
Documentation
201Settings
Created
Example Response
Body
Header (25)
{
"message": "Success",
"user": {
"method": "local",
"local": {
"name": "Oladimeji Ibitoye",
"email":-,
"password": "$2b$12$axLQ3.xC3b2MhQJT4wleuOUr6tRq/AmskKeTNTEewjfHEf07S0DJO"
},
"_id": "62ad-f30bb7d91",
View More
POST FaceBookSignUp
https://trip-buddy-be.herokuapp.com/api/v1/tripbuddy/users//oauth/facebook
Facebook APP id =-
BODY raw
{
"access_token" : "EAAtaVrA4yhwBABH7WF7ZC4eU1anQ0ULadGNJVpKM5PwvbAexaM2peHmVohSkzl7brsKjD4xK1sqXwZBAIhhtXs2VrWC38iQbEoPK8Bxk50jHGfGMaOL5SmO
}
Example Request
https://documenter.getpostman.com/view/-/Uz5CKxb2
FaceBookSignUp Example -…
3/12
8/5/22, 6:37 PM
TripBuddy
Documentation Settings
curl --location --request POST 'https://trip-buddy-be.herokuapp.com/api/v1/tripbuddy/users//oauth/facebook' \
--data-raw '{
"access_token" : "EAAtaVrA4yhwBABH7WF7ZC4eU1anQ0ULadGNJVpKM5PwvbAexaM2peHmVohSkzl7brsKjD4xK1sqXwZBAIhhtXs2VrWC38iQbEoPK8Bxk50jHGfGMaOL5SmO0
}'
Example Response
Body
201 Created
Header (25)
{
"message": "Success",
"user": {
"method": "facebook",
"facebook": {
"id": "-",
"name": "Oladimeji Ibitoye",
"email":-
},
"_id": "62ad-f30bb7d94",
View More
POST GoogleSignUp
https://trip-buddy-be.herokuapp.com/api/v1/tripbuddy/users/oauth/google
BODY raw
{
"access_token":"ya29.a0ARrdaM9rXXeXgJTFSK5DY1hkuZWSnx-MkpK5LSQLrzXd5WwBlmz0KEK9kwwlBx-CjXZJ1BaDaeNA1uunt0Mm1X4c4an1e-JOO9zE-kOiSnBBIZppds
}
https://documenter.getpostman.com/view/-/Uz5CKxb2
4/12
8/5/22, 6:37 PM
TripBuddy
Documentation Settings
Example Request
GoogleSignUp Example - pr…
curl --location --request POST 'https://trip-buddy-be.herokuapp.com/api/v1/tripbuddy/users/oauth/google' \
--data-raw '{
"access_token":"ya29.a0ARrdaM9rXXeXgJTFSK5DY1hkuZWSnx-MkpK5LSQLrzXd5WwBlmz0KEK9kwwlBx-CjXZJ1BaDaeNA1uunt0Mm1X4c4an1e-JOO9zE-kOiSnBBIZppdss
}'
Example Response
Body
201 Created
Header (25)
{
"message": "Success",
"user": {
"google": {
"id": "-",
"email":-
},
"_id": "62ab8107b720898e5d6411be",
"method": "google",
"__v": 0
View More
POST ForgotPassword
https://trip-buddy-be.herokuapp.com/api/v1/tripbuddy/users/forgotpassword
https://documenter.getpostman.com/view/-/Uz5CKxb2
5/12
8/5/22, 6:37 PM
TripBuddy
BODY raw
Documentation Settings
{
"email"-
}
Example Request
ForgotPassword Example - …
curl --location --request POST 'https://trip-buddy-be.herokuapp.com/api/v1/tripbuddy/users/forgotpassword' \
--data-raw '{
"email"-
}'
Example Response
Body
200 OK
Header (25)
{
"message": "password reset token sent to email successfully",
"passwordResetTokenUrl": "http://trip-buddy-be.herokuapp.com/api/v1/tripbuddy/users/resetPassword/18c8c600b93f25abb8698e5aa1cb12b5d5eea71c83
}
POST ResetPassword
http://trip-buddy-be.herokuapp.com/api/v1/tripbuddy/users/resetPassword/:token
PATH VARIABLES
https://documenter.getpostman.com/view/-/Uz5CKxb2
6/12
8/5/22, 6:37 PM
TripBuddy
token
Documentation Settings
BODY raw
{"password": "password03",
"confirmPassword": "password03"}
Example Request
ResetPassword Example - …
curl --location --request POST 'http://trip-buddy-be.herokuapp.com/api/v1/tripbuddy/users/resetPassword/18c8c600b93f25abb8698e5aa1cb12b5d5eea7
--data-raw '{"password": "password03",
"confirmPassword": "password03"}'
Example Response
Body
200 OK
Header (25)
{
"message": "Success",
"user": {
"local": {
"name": "Oladimeji Ibitoye",
"email":-,
"password": "$2b$12$GrElLtKPG2.dfh.f.slvkOQ51MUhOQdn/7s068ZVCXgcU1Gc6daXi"
},
"_id": "62ad-f30bb7d91",
"method": "local",
View More
POST SIGNIN
https://documenter.getpostman.com/view/-/Uz5CKxb2
7/12
8/5/22, 6:37 PM
TripBuddy
https://trip-buddy-be.herokuapp.com/api/v1/tripbuddy/users/signin
Documentation Settings
BODY raw
{
"email":-,
"password": "password03"
}
Example Request
SIGNIN EXAMPLE - prod
curl --location --request POST 'https://trip-buddy-be.herokuapp.com/api/v1/tripbuddy/users/signin' \
--data-raw '{
"email":-,
"password": "password03"
}'
Example Response
Body
201 Created
Header (25)
{
"message": "Success",
"user": {
"local": {
"name": "Oladimeji Ibitoye",
"email":-,
"password": "$2b$12$GrElLtKPG2.dfh.f.slvkOQ51MUhOQdn/7s068ZVCXgcU1Gc6daXi"
},
"_id": "62ad-f30bb7d91",
"method": "local",
https://documenter.getpostman.com/view/-/Uz5CKxb2
View More
8/12
8/5/22, 6:37 PM
TripBuddy
Documentation Settings
Users
This section will show all endpoints relating to Users after authentication
GET GET USERS
https://trip-buddy-be.herokuapp.com/api/v1/tripbuddy/users
API endpoint Fetch all users
HTTP status = 200
Message = Success
Data = users data
Example Request
GET USERS EXAMPLE - prod
curl --location --request GET 'https://trip-buddy-be.herokuapp.com/api/v1/tripbuddy/users'
Example Response
Body
200 OK
Header (25)
https://documenter.getpostman.com/view/-/Uz5CKxb2
9/12
8/5/22, 6:37 PM
TripBuddy
{
Documentation Settings
"message": "success",
"data": [
{
"local": {
"name": "Ola",
"email":-,
"password": "$2b$12$szi3qxD6sCSc4u0B7lnOFeIbmscFDck/oy6mQu63UKWiGlsq0uXSW"
},
"_id": "62ab31998a2c13d7dbab1e95",
View More
Flights
GET Get fights
https://trip-buddy-be.herokuapp.com/api/v1/tripbuddy/flights?originCode=LOS&destinationCode=LON&dateOfDeparture=-
PARAMS
originCode
LOS
destinationCode
LON
dateOfDeparture-
https://documenter.getpostman.com/view/-/Uz5CKxb2
10/12
8/5/22, 6:37 PM
TripBuddy
Example Request
Get fightsdev
Documentation
Settings
curl --location --request GET 'https://trip-buddy-be.herokuapp.com/api/v1/tripbuddy/flights?originCode=LOS&destinationCode=LON&dateOfDeparture
Example Response
Body
200 OK
Header (24)
{
"status": "ok",
"data": [
{
"departureTime": "-T06:00:00",
"departureAirport": "Murtala Muhammed Airport, Lagos",
"arrivalTime": "-T10:30:00",
"arrivalAirport": "Mohammed V Intl Airport, Casablanca",
"airLineName": "ROYAL AIR MAROC",
"travelerPricings": [
View More
GET INDEX PAGE
https://trip-buddy-be.herokuapp.com/api/v1/tripbuddy
API endpoint Fetch index/home page
HTTP status = 200
message = Welcome to Trip Buddy APP :)
EndFragment
https://documenter.getpostman.com/view/-/Uz5CKxb2
11/12
8/5/22, 6:37 PM
TripBuddy
Documentation Settings
Example Request
INDEX PAGE EXAMPLE - prod
curl --location --request GET 'https://trip-buddy-be.herokuapp.com/api/v1/tripbuddy'
Example Response
Body
200 OK
Header (25)
{
"message": "Welcome to Trip Buddy APP :)"
https://documenter.getpostman.com/view/-/Uz5CKxb2
12/12