MOM Rest API

Maintenance Order Marketplace

Base URI

http://triffort.com/mytest/mom/api/
API Methods
POST /signup
POST /signin
POST /forgetpassword
GET /logout/{uid of the user}
POST /changepassword
POST /update/profile
GET /category/{unique id of the user}
POST /job/post
POST /job/apply
GET /jobs/{unique id of the user}/{Last job_id from dictionary and initial value is 0}
GET /job/{unique id of the user}/{job id}
POST /job/delete
POST /job/{job id}/update
signup
POST /signup

This api is use to create a new user inside the app.

Request body

Object
user_fname
string
Example:
User first name
user_lname
string
Example:
User last name
user_email
string
Example:
User email
user_password
string
Example:
User password(Leave it blank in case of FB signup)
user_profilepic
string
Example:
It will be base64 string for email signup and image url incase of FB signup
user_type
string
Example:
It will be 0 for the email signup and 1 for the FB user signup
user_phone
string
Example:
User phone number(Leave it blank if phone number not available in the FB profile of the user)

Responses

200 OK
Body
Object
status
string
Example:
success
message
string
Example:
user detail is saved
uid
string
Example:
System generated unique id(developer need to save this id for further API implementation)
user_id
string
Example:
This user id only get when a user select FB for the signup. Developer need to save this id as a user registration key for further reference.
signin
POST /signin

This api is used to login the user in the app.

Request body

Object
user_email
string
Example:
User email
user_password
string
Example:
User password
user_type
string
Example:
It will be 0 for the email user login(Note: For FB login developer need to use the signup API instead of using signin API)

Responses

200 OK
Body
Object
status
string
Example:
success
uid
string
Example:
System generated unique id for the user(Developer need to save this uid in order to access other API's)
email
string
Example:
User email
user_fname
string
Example:
User first name
user_lname
string
Example:
User last name
profile_image
string
Example:
Profile image url of the user
user_id
string
Example:
Developer need to save this id as a user registration key for further reference.
Forgot Password
POST /forgetpassword

This api is used to recover user password. It will send password to user’s registered email.

Request body

Object
user_email
string
Example:
User email

Responses

200 OK
Body
Object
status
string
Example:
success
message
string
Example:
Please, check your registered email for the password.
logout
GET /logout/{uid of the user}

This api is used to terminate the session. There is no need for the JSON dictionary only pass uid in the url.

Path variables

uid of the user
string optional

Responses

200 OK
Body
Object
status
string
Example:
success
message
string
Example:
User logged out.
change password
POST /changepassword

This api is used to update the user password. It will also send an email to the user in order to inform him/her that the password is changed.

Request body

Object
uid
string
Example:
System generated unique id
oldpassword
string
Example:
User old password
newpassword
string
Example:
User new password

Responses

200 OK
Body
Object
status
string
Example:
sucess
message
string
Example:
Password updated successfully.
Update user profile
POST /update/profile

This api is used to update the profile information of a specific user.

Request body

Object
user_fname
string
Example:
User first name
user_lname
string
Example:
User last name
user_phone
string
Example:
User phone number
uid
string
Example:
System generated unique id for the user

Responses

200 OK
Body
Object
status
string
Example:
success
message
string
Example:
User details updated successfully
Get all category
GET /category/{unique id of the user}

This api is used to get all the categories from the database. Developer only need to pass the uid in the URL path.

Path variables

unique id of the user
string optional

Responses

200 OK
Body
Object
cat_id
string
Example:
category id
cat_name
string
Example:
category name
Post a new job
POST /job/post

This api is used to post a new job.

Request body

Object
uid
string
Example:
uid of the user who is currently login and post a job
cat_id
string
Example:
job category id
job_title
string
Example:
job title
job_description
string
Example:
job description
job_budget
string
Example:
job budget
job_completion_time
string
Example:
completion time of the job
imageFlag
string
Example:
It will be 0 if user wont select image for the job post also if it is 0 there is no need to send the below image field in JSON dictionary. It will be 1 if user wants to post a image also if it's 1 please, include the image field variable in the JSON dictionary
imagePost
string
Example:
base64 image string for the job image
job_location
string
Example:
job location

Responses

200 OK
Body
Object
status
string
Example:
success
message
string
Example:
Job posted successfully.
Apply on a job
POST /job/apply

This api is used for bidding on the jobs posted by the users.

Request body

Object
job_id
string
Example:
Job id on which user wants to apply
uid
string
Example:
user unique id
bid_message
string
Example:
bid message
bid_amount
string
Example:
bid amount
bid_job_completion_time
string
Example:
job completion time

Responses

200 OK
Body
Object
status
string
Example:
success
message
string
Example:
Job application posted successfully
Get All Job Listing
GET /jobs/{unique id of the user}/{Last job_id from dictionary and initial value is 0}

This api is used to get the job listing. Developer only need to pass the unique id of the user in the URL path.

Path variables

unique id of the user
string optional
Last job_id from dictionary and initial value is 0
string optional

Responses

200 OK
Body
Object
job_id
string
Example:
Job id
user_id
string
Example:
User id of the person who post the job
cat_id
string
Example:
Category id under which the job is posted
job_title
string
Example:
Job title
job_description
string
Example:
Job description
job_budget
string
Example:
Job estimated budget entered by the person who post the job
job_completion_time
string
Example:
Job estimated completion time
job_image
string
Example:
Image URL of the job post
job_location
string
Example:
job location
Get specific job details
GET /job/{unique id of the user}/{job id}

This api is used to fetch the details of the specific job. Developer only need to pass the unique token id and the job id in the URL.

Path variables

unique id of the user
string optional
job id
string optional

Responses

200 OK
Body
Object
job_post
Object
job_id
string
Example:
Job id
user_id
string
Example:
user id of the person who post the job
cat_id
string
Example:
category id in which job is posted
user_fname
string
Example:
user first name who post this job
user_lname
string
Example:
user last name who post this job
job_title
string
Example:
job title
job_description
string
Example:
job description
job_budget
string
Example:
job estimated budget entered by the person who post this job
job_completion_time
string
Example:
job estimated completion date
job_location
string
Example:
job location
bid
Object
bid_id
string
Example:
bid id
user_id
string
Example:
user id of the person who bid on the job
user_fname
string
Example:
user first name who bid on the job
user_lname
string
Example:
user last name who bid on the job
user_phone
string
Example:
user phone number who bid on the job
user_email
string
Example:
user email who bid on the job
user_profileImage
string
Example:
user profile image url
bid_message
string
Example:
user proposal message for the bid
bid_amount
string
Example:
bidding amount
bid_job_completion_time
string
Example:
job completion date entered by the user who bid on the job
Delete Job
POST /job/delete

This API is used to delete a particular job from the system.

Request body

Object
uid
string
Example:
Unique id of the user
job_id
string
Example:
Job id

Responses

200 OK
Body
Object
status
string
Example:
success
message
string
Example:
Job post deleted successfully.
Job Update
POST /job/{job id}/update

This API is used to update the job details.

Path variables

job id
string optional

Request body

Object
uid
string
Example:
uid of the user who is currently login and post a job
cat_id
string
Example:
job category id
job_title
string
Example:
job title
job_description
string
Example:
job description
job_budget
string
Example:
job budget
job_completion_time
string
Example:
completion time of the job
imageFlag
string
Example:
It will be 0 if user wont select image for the job post also if it is 0 there is no need to send the below image field in JSON dictionary. It will be 1 if user wants to post a image also if it's 1 please, include the image field variable in the JSON dictionary
imagePost
string
Example:
base64 image string for the job image
job_location
string
Example:
job location

Responses

200 OK
Body
Object
status
string
Example:
success
message
string
Example:
Job updated successfully.