JobHax Backend REST API
Overview
JobHax is a platform that allows you to track your job applications, their statuses, take some notes about them and see some metrics about your job seeking process. The JobHax API provides functionality to developers to create users, add job applications and all the related endpoints to manage them. All of the API endpoints work with JSON bodies and responses.
Postman Collection
You can explore all the endpoints of the JobHax API and their usage using collection.
Authentication
The JobHax API uses Django framework's OAuth system. In order to get an access_token to access the endpoints, you'll need to have a JobHax client_id and a JobHax client_secret. You can get an access_token either using email&password or using a third party access token like (Google access token, LinkedIn access token etc.)
How to generate Google access_token for test purposes:
For testing purposes Google's playground system can be used for generating dummy access tokens to use on JobHax API.
You will need to grant following permissions:
To generate a Google access token, please use this
Get an access_token with using 3rd party provider
Request
Copy POST https://backend.jobhax.com/api/users/auth_social_user
Authenticates the user and returns JobHax access_token and refresh_token related datas.
Request Body
Copy {
"client_id": "<jobhax-client-id>",
"client_secret": "<jobhax-client-secret>",
"provider": "google-oauth2 or linkedin-oauth2",
"token": "access_token-from-the-3rd-party-provider"
}
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": {
"access_token": "uoIWl9mk6Uobs4M9r4H8NdBjIDyZK7",
"expires_in": 36000,
"token_type": "Bearer",
"scope": "read write",
"refresh_token": "4b0XdB9DGtTbHnYI15SkXL9WOUYZ21"
}
}
Get an access_token with using email&password
Request
Copy POST https://backend.jobhax.com/api/users/login
Authenticates the user and returns JobHax access_token and refresh_token related datas.
Request Body
Copy {
"client_id": "<jobhax-client-id>",
"client_secret": "<jobhax-client-secret>",
"username": "joesmith",
"password": "123456"
}
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": {
"access_token": "uoIWl9mk6Uobs4M9r4H8NdBjIDyZK7",
"expires_in": 36000,
"token_type": "Bearer",
"scope": "read write",
"refresh_token": "4b0XdB9DGtTbHnYI15SkXL9WOUYZ21"
}
}
API ENDPOINTS
Request
Copy POST https://backend.jobhax.com/api/users/register
Registers a new user with using the details provided in the body
Request Body
Copy {
"first_name": "Joe",
"last_name": "Smith",
"username": "joesmith",
"email": "joesmith@joe.com",
"password": "123456",
"password2": "123456"
}
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": null
}
Request
Copy POST https://backend.jobhax.com/api/users/logout
To logout the current user
Request Body
Copy {
"client_id": "<jobhax-client-id>",
"client_secret": "<jobhax-client-secret>",
"token": "current-jobhax-access-token"
}
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": null
}
Request
Copy POST https://backend.jobhax.com/api/users/refresh_token
To refresh the JobHax access_token if its expired.
Request Body
Copy {
"client_id": "<jobhax-client-id>",
"client_secret": "<jobhax-client-secret>",
"refresh_token": "vSmJDUilg7RIjLXtiTIzoBwvTDN0UN"
}
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": {
"access_token": "RYQidDFQ6w6BQHLkR4CKrKCbUOfcmG",
"expires_in": 36000,
"token_type": "Bearer",
"scope": "read write",
"refresh_token": "lHc5JiB9SohPjImcSB8aIRF9QNdK77"
}
}
Request
Copy POST https://backend.jobhax.com/api/users/update_gmail_token
To refresh user's GMAIL token. (In such case; user's gmail token refreshed or mail_read permission granted after login)
Bearer jobhax-access-token
Request Body
Copy {
"token": "access_token-from-the-3rd-party-provider"
}
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": null
}
Request
Copy GET https://backend.jobhax.com/api/users/get_linkedin_profile
To get user's linkedinIn basic profile if the user logged in with their linkedIn profile.
Bearer jobhax-access-token
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": {
"firstName": {
"localized": {
"en_US": "Bob"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"localizedFirstName": "Bob",
"headline": {
"localized": {
"en_US": "API Enthusiast at LinkedIn"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"localizedHeadline": "API Enthusiast at LinkedIn",
"vanityName": "bsmith",
"id": "yrZCpj2Z12",
"lastName": {
"localized": {
"en_US": "Smith"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"localizedLastName": "Smith",
"profilePicture": {
"displayImage": "urn:li:digitalmediaAsset:C4D00AAAAbBCDEFGhiJ"
}
}
}
Request
Copy GET https://backend.jobhax.com/api/users/sync_user_emails
To sync user job application emails to JobHax DB if the user logged in with their google account
Bearer jobhax-access-token
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": null
}
Request
Copy GET https://backend.jobhax.com/api/users/get_user_google_mails
To get all the emails that read from user's inbox which are related with the job applications
Bearer jobhax-access-token
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": [
{
"subject": "You applied for Android Developer at Genuent",
"body": "<html><body>HTML content</body></html>",
"date": "2018-11-14 06:08:19+00:00"
}
]
}
Request
Copy GET https://backend.jobhax.com/api/jobapps/get_jobapps
To get user's all job applications from JobHax DB.
Bearer jobhax-access-token
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": [
{
"id": 31,
"applicationStatus": {
"id": 1,
"value": "Applied"
},
"jobTitle": "🤖 Lead Android Engineer",
"company": "OpenPhone ",
"companyLogo": "/static/images/errorcvlogobright.png",
"applyDate": "2019-01-23T14:18:12Z",
"msgId": "1687ccad52768659",
"source": "Hired.com",
"user": 7
},
{
"id": 21,
"applicationStatus": {
"id": 1,
"value": "Applied"
},
"jobTitle": "Android Intern (Summer 2019)",
"company": "Mozilla",
"companyLogo": "https://media.licdn.com/dms/image/C4E0BAQGHz8JwrMTQ0A/company-logo_100_100/0?e=2159024400&v=beta&t=klSj-Z-6bTQr-5Tfl4HWe8JwjnboGzei8ncYUMs56Pc",
"applyDate": "2018-11-14T06:08:19Z",
"msgId": "16710d5be4d0ae7f",
"source": "LinkedIn",
"user": 7
}
]
}
Request
Copy GET https://backend.jobhax.com/api/jobapps/get_statuses
To get all the job application statuses from JobHax DB.
Bearer jobhax-access-token
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": [
{
"id": 1,
"value": "Applied"
}
]
}
Request
Copy GET https://backend.jobhax.com/api/jobapps/get_status_history
To get status change history of a specific job application
Bearer jobhax-access-token
URI Parameters
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": [
{
"applicationStatus": {
"id": 1,
"value": "Applied"
},
"update_date": "2019-02-10T10:38:36.202351Z"
}
]
}
Request
Copy POST https://backend.jobhax.com/api/jobapps/add_jobapp
To add a new Job Application.
Bearer jobhax-access-token
Request Body
Copy {
"job_title": "job_title",
"status_id": "1",
"company": "company_test",
"application_date": "2019-01-31",
"source": "Vettery"
}
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": null
}
Request
Copy POST https://backend.jobhax.com/api/jobapps/update_jobapp
To update a Job Application's status or rejection status. 'status_id' and 'rejected' parameters are optional but at least one of them should be sent.
Bearer jobhax-access-token
Request Body
Copy {
"jobapp_id": "576",
"status_id": "1",
"rejected": true
}
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": null
}
Request
Copy POST https://backend.jobhax.com/api/jobapps/delete_jobapp
To delete a specific Job Application.
Bearer jobhax-access-token
Request Body
Copy {
"jobapp_id": "221"
}
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": null
}
Request
Copy GET https://backend.jobhax.com/api/jobapps/get_jobapp_detail
To get details of a Job Application
Bearer jobhax-access-token
URI Parameters
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": {
"posterInformation": {},
"decoratedJobPosting": {},
"topCardV2": {}
}
}
Request
Copy POST https://backend.jobhax.com/api/jobapps/add_jobapp_note
To add a note to a specific Job Application
Bearer jobhax-access-token
Request Body
Copy {
"jobapp_id": 269,
"description": "test note"
}
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": {
"id": 1,
"description": "test note",
"created_date": "2019-03-18T03:26:27.780072Z",
"update_date": null
}
}
Request
Copy POST https://backend.jobhax.com/api/jobapps/update_jobapp_note
To update a note of a specific Job Application
Bearer jobhax-access-token
Request Body
Copy {
"jobapp_note_id": 1,
"description": "test note update"
}
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": null
}
Request
Copy POST https://backend.jobhax.com/api/jobapps/delete_jobapp_note
To delete a note from a Job Application
Bearer jobhax-access-token
Request Body
Copy {
"jobapp_note_id": 1
}
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": null
}
Request
Copy GET https://backend.jobhax.com/api/jobapps/get_jobapp_notes
To get details of a Job Application
Bearer jobhax-access-token
URI Parameters
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": [
{
"id": 2,
"description": "test note update",
"created_date": "2019-03-18T03:40:04.770901Z",
"update_date": "2019-03-18T03:40:15.324041Z"
},
{
"id": 3,
"description": "test note 2",
"created_date": "2019-03-18T03:42:21.334071Z",
"update_date": null
}
]
}
Request
Copy GET https://backend.jobhax.com/api/metrics/get_total_application_count
To get count of user's job application
Bearer jobhax-access-token
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": {
"count": 28
}
}
Request
Copy GET https://backend.jobhax.com/api/metrics/get_application_count_by_month
To get count of user's job application by month
Bearer jobhax-access-token
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": [
[
{
"source": "Hired.com",
"data": [
0,
0,
0,
0,
0,
2,
2,
0,
0,
2,
1,
0
]
},
{
"source": "LinkedIn",
"data": [
0,
0,
0,
0,
2,
1,
0,
3,
0,
0,
5,
1
]
},
{
"source": "Indeed",
"data": [
0,
0,
0,
0,
0,
0,
0,
0,
8,
6,
7,
2
]
},
{
"source": "Vettery",
"data": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
9,
1,
1
]
},
{
"source": "Others",
"data": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}
],
[
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
"January",
"February",
"March"
]
]
}
Request
Copy GET https://backend.jobhax.com/api/metrics/get_application_count_by_month_with_total
To get count of user's job application by month with total
Bearer jobhax-access-token
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": [
[
{
"source": "Hired.com",
"data": [
0,
0,
0,
0,
0,
2,
2,
0,
0,
2,
1,
0
]
},
{
"source": "LinkedIn",
"data": [
0,
0,
0,
0,
2,
1,
0,
3,
0,
0,
5,
1
]
},
{
"source": "Indeed",
"data": [
0,
0,
0,
0,
0,
0,
0,
0,
8,
6,
7,
2
]
},
{
"source": "Vettery",
"data": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
9,
1,
1
]
},
{
"source": "Others",
"data": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
},
{
"source": "Total",
"data": [
0,
0,
0,
0,
2,
3,
2,
3,
8,
17,
14,
4
]
}
],
[
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
"January",
"February",
"March"
]
]
}
Request
Copy GET https://backend.jobhax.com/api/metrics/get_count_by_statuses
To get count of user's job application by its statuses
Bearer jobhax-access-token
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": [
{
"name": "Applied",
"value": 27
},
{
"name": "Interviewing",
"value": 1
}
]
}
Request
Copy GET https://backend.jobhax.com/api/metrics/get_word_count
To get unique words in job applications
Bearer jobhax-access-token
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": [
{
"word": "ERG, Inc.",
"value": 1
},
{
"word": "BrainyPro",
"value": 1
},
{
"word": "Amazon ",
"value": 1
},
{
"word": "KgTiger",
"value": 1
},
{
"word": "Carvana",
"value": 1
}
]
}
Request
Copy GET https://backend.jobhax.com/api/metrics/get_count_by_jobtitle_and_statuses
To get job application count by job title and status
Bearer jobhax-access-token
Response
Copy {
"success": true,
"error_code": 0,
"error_message": "",
"data": {
"jobs": [
"Android Engineer",
"Android Developer",
"Android Application Developer",
"Mobile Developer (iOS and Android)",
"Software Engineer",
"Senior Android Developer",
"Android Intern (Summer 2019)",
"Mobile Software Engineer",
"Urgent: Android Developer",
"Android",
"🤖 Lead Android Engineer",
"Android Software Engineer, Mobile Services",
"Software Engineer Intern",
"Android Application Developer (5007)",
"Software Engineer - Android"
],
"statuses": [
"Interviewing",
"Applied"
],
"data": [
{
"name": "Interviewing",
"data": [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
},
{
"name": "Applied",
"data": [
6,
8,
2,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
}
]
}
ERROR CODES
Error occured while updating the google token.
Google token has expired. Please refresh Google token.
Could not login... Please check your credentials...