Loading...

API Documentation

Get started

Get started integrating Project Expat API web api by getting your Live API credentials and Staging server API credentials.

Get API credentials

Your API credentials are a client ID and secret, which authenticate API requests from your account. While you’re developing code, use these credentials when you test API calls in our staging environment. You get these credentials from a REST API app in the Developer Dashboard.

To get staging server API credentials:
  1. Request URL: https://project-expat.com/?oauth=token
  2. Method: Post
  3. Auth URL: https://project-expat.com/oauth/authorize
  4. Access Token URL: https://project-expat.com/oauth/token
  5. Client ID: Ask to Developer
  6. Client Secret: Ask to Developer
  7. Scope: basic
To get Live server API credentials:
  1. Request URL: https://project-expat.com/?oauth=token
  2. Method: Post
  3. Auth URL: https://project-expat.com/oauth/authorize
  4. Access Token URL: https://project-expat.com/oauth/token
  5. Client ID: Ask to Developer
  6. Client Secret: Ask to Developer
  7. Scope: basic

Requests

Any tool that is fluent in HTTP can communicate with the API simply by requesting the correct URI. Requests should be made using the HTTPS protocol so that traffic is encrypted. The interface responds to different methods depending on the action required.

Method Usage
GET For simple retrieval of information about your services, you should use the GET method. The information you request will be returned to you as a JSON object.

The attributes defined by the JSON object can be used to form additional requests. Any request using the GET method is read-only and will not affect any of the objects you are querying.

DELETE To delete documents, the DELETE method should be used. This will remove the specified services if found.
PUT To update the fields of any form in Database, the PUT method is available.

The PUT method sets the state of the target using the provided values, regardless of their current values.

POST To create a new entry, contact, customer etc. in the Database, your request should specify the POST method.

The POST request should include all of the fields necessary to create the new request. When you wish to create a new request/requests, send a POST request to the target endpoint.

The POST method should also be used to change the status of a document. You can POST to the appropriate endpoint to Submit or Cancel a request.

 

HTTP Statuses

Along with the HTTP methods that the API responds to, it will also return standard HTTP statuses, including error codes.

In the event of a problem, the status will contain the error code, while the body of the response will usually contain additional information about the problem that was encountered.

In general, if the status returned is in the 200 range, it indicates that the request was fulfilled successfully and that no error was encountered.

Return code of 400 typically indicate that there was an issue with the request that was sent. May be your request is malformed.

Return code of 401, this could mean that you did not authenticate correctly or that you are requesting an action that you do not have authorization for.

Return code of 404 means that the document you are requesting does not exist.

If you receive a status in the 500 range, this generally indicates a server-side problem. This means that we are having an issue on our end and cannot fulfill your request currently.

Responses

When a request is successful, a response body will typically be sent back in the form of a JSON object.

In order to interact with Web API, you or your application must authenticate.

Web API handles this through OAuth2, an open standard for authorization. OAuth2 allows you to delegate access to your account in full or in read-only mode.

You can get OAuth2 Client Id and Secret by contacting developer.

How to Authenticate

You will use the Client Id and Secret to obtain a token. Then pass token in the Authorization header


Get Requests

GET – Get all Services data

Staging: https://project-expat.com/wp-json/get/services/{from_page}/{to_page} Live:  http://project-expat.com/wp-json/get/services/{from_page}/{to_page}

Returns all Services from the Website, {from_page} is for From page and {to_page} for to page, and per page 20 items will return, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API


GET – Get all Locations data

Staging: https://project-expat.com/wp-json/get/locations Live:  http://project-expat.com/wp-json/get/locations

Returns all Locations from the Website, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API


GET – Get all public Testimonials data

Staging: https://project-expat.com/wp-json/get/testimonial/public Live:  http://project-expat.com/wp-json/get/testimonial/public

Returns all public Testimonials from the Website, which can be accessed with your provided API Credentials. Public API is used to display 5 Testimonials those are accessible to all uses weather they are logged in or not.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API


GET – Get all Testimonials data

Staging: https://project-expat.com/wp-json/get/testimonials Live:  http://project-expat.com/wp-json/get/testimonials

Returns all Testimonials from the Website, which can be accessed with your provided API Credentials. This API will return all Testimonials with Public and Approved one Post user Login.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API


GET – Get list of all country data

Staging: https://project-expat.com/wp-json/get/list/country Live:  http://project-expat.com/wp-json/get/list/country

Returns list of all Country from the Website, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API


GET – Get list of all title data

Staging: https://project-expat.com/wp-json/get/list/titles Live:  http://project-expat.com/wp-json/get/list/titles

Returns list of all Title from the Website, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API


GET – Get list of all subject data for Contact Form

Staging: https://project-expat.com/wp-json/get/list/email-subjects Live:  http://project-expat.com/wp-json/get/list/email-subjects

Returns list of all Email Subjest list for Contact Form, from the Website, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API


GET – Get the content of specific page

Staging: https://project-expat.com/wp-json/get/page/{page_id} Live:  http://project-expat.com/wp-json/get/page/{page_id}

Returns the page content, from the Website, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API


GET – Get the Offer page content

Staging: https://project-expat.com/wp-json/get/page/offer Live:  http://project-expat.com/wp-json/get/page/offer

Returns the Offer page content, from the Website, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API


GET – Get the About page content

Staging: https://project-expat.com/wp-json/get/page/about Live:  http://project-expat.com/wp-json/get/page/about

Returns the About page content, from the Website, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API


GET – Get the Contact page content

Staging: https://project-expat.com/wp-json/get/page/contact Live:  http://project-expat.com/wp-json/get/page/contact

Returns the Contact page content, from the Website, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API


GET – Get All reviews

Staging: https://project-expat.com/wp-json/get/reviews/{user_id} Live:  http://project-expat.com/wp-json/get/reviews/{user_id}

Returns the all user review, pass the User id in place of {user_id}, from the Website, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API


GET – Get All reviews by vendor id

Staging: https://project-expat.com/wp-json/get/review-by-vendor/{vendor_id} Live:  http://project-expat.com/wp-json/get/review-by-vendor/{vendor_id}

Returns the all user review by vendors, pass the Vendor id in place of {vendor_id}, from the Website, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API


GET – Get All favourite service providers list

Staging: https://project-expat.com/wp-json/get/favourite/{user_id} Live:  http://project-expat.com/wp-json/get/favourite/{user_id}

Returns the all favourite service providers list, pass the User id in place of {user_id}, from the Website, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API


GET – Get Service provider detail

Staging: https://project-expat.com/wp-json/get/service/{service_id} Live:  http://project-expat.com/wp-json/get/service/{service_id}

Returns the Service provider detail, pass the Service id in place of {service_id}, from the Website, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API


GET – Get All Blogs

Staging: https://project-expat.com/wp-json/get/blogs Live:  http://project-expat.com/wp-json/get/blogs

Returns the all Blogs list, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API


GET – Get Blog detail

Staging: https://project-expat.com/wp-json/get/blog/{blog_id} Live:  http://project-expat.com/wp-json/get/blog/{blog_id}

Returns the Blog detail, pass the Blog id in place of {blog_id}, from the Website, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API


GET – Get All Blogs Category

Staging: https://project-expat.com/wp-json/get/blog-category Live:  http://project-expat.com/wp-json/get/blog-category

Returns the all Blogs Category, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API


GET – Get All Blogs by Category

Staging: https://project-expat.com/wp-json/get/blogs-by-category/{term_id} Live:  http://project-expat.com/wp-json/get/blogs-by-category/{term_id}

Returns the All Blogs by Category, pass the Category id in place of {term_id}, from the Website, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API


GET – Get All Service Provider List

Staging: https://project-expat.com/wp-json/get/vendor/{user_id}/{city_id}/{service_id} Live:  http://project-expat.com/wp-json/get/vendor/{user_id}/{city_id}/{service_id}

Returns the All Service Provider List, pass the User id in place of {user_id}, pass the City id in place of {city_id}, and pass the Service id in place of {service_id} after this the API will return all service proiders list, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API


GET – Get All City List by Country

Staging: https://project-expat.com/wp-json/get/city/{country_id}/{city_id} Live:  http://project-expat.com/wp-json/get/city/{country_id}/{city_id}

Returns the All City List by Country, pass the Country id in place of {country_id} and pass the City id in place of {city_id} after this the API will return all service proiders list, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API


GET – Get All Service Category List by City

Staging: https://project-expat.com/wp-json/get/service-filter/{country_id}/{city_id} Live:  http://project-expat.com/wp-json/get/service-filter/{country_id}/{city_id}

Returns the All Service Category List by City, pass the Country id in place of {country_id} and pass the City id in place of {city_id} after this the API will return all service proiders list, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API


GET – Get all Services data by parent ID

Staging: https://staging.project-progress.net/projects/project-expat/wp-json/get/services/{parent_id}
Live:  http://project-expat.com/wp-json/get/services/{parent_id}

Returns all Services by parent ID from the Website, {parent_id} is the Parent of any child item, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API



Post Requests

Post – Post data for Get in Touch Form

Staging: https://project-expat.com/wp-json/post/lead/get-in-touch/ Live:  http://project-expat.com/wp-json/post/lead/get-in-touch/

This API will use to post Get in Touch Form data and shoot emails as well, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API

PARAMS
Key Value Type Usage
title Form Data String [Use GET – Get list of all title data API ] required
first_name Form Data String required
last_name Form Data String required
email Form Data Email required
phone Form Data Number 10 digit required
edm 409,396 String required

 


Post – Post data for Contact Form

Staging: https://project-expat.com/wp-json/post/lead/contact-us/ Live:  http://project-expat.com/wp-json/post/lead/contact-us/

This API will use to post Contact Form data and shoot emails as well, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API

PARAMS
edm528, 527Stringrequired

Key Value Type Usage
title Form Data String [Use GET – Get list of all title data API ] required
name Form Data String required
email Form Data Email required
phone Form Data Number 10 digit required
subject Form Data String [Use GET – Get list of all subject data for Contact Form API ] required
message Form Data String required

 

 


Post – Post a new service review

Staging: https://project-expat.com/wp-json/post/review/ Live:  http://project-expat.com/wp-json/post/review/

This API will use to post a new service review and shoot emails to the admin, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API

PARAMS
Key Value Type Usage
uid Form Data Integer required
post_id Form Data Integer required
rating Form Data Integer required
review Form Data String required
user_ip Form Data String required
edm 1066 String required

 

 


Post – Post a new review for the website(Testimonial)

Staging: https://project-expat.com/wp-json/post/testimonial/ Live:  http://project-expat.com/wp-json/post/testimonial/

This API will use to post a new review for the website(Testimonial) and shoot emails to the admin, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API

PARAMS
Key Value Type Usage
uid Form Data Integer required
rating Form Data Integer required
review Form Data String required
edm 1062 String required

 


Post – Add a service in users Favourite List

Staging: https://project-expat.com/wp-json/post/add-favourite/ Live:  http://project-expat.com/wp-json/post/add-favourite/

This API will use to add a service in users Favourite List, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API

PARAMS
Key Value Type Usage
user_id Form Data Integer required
post_id Form Data Integer required

 


Post – Remove a service from users Favourite List

Staging: https://project-expat.com/wp-json/post/remove-favourite/ Live:  http://project-expat.com/wp-json/post/remove-favourite/

This API will use to Remove a service from users Favourite List, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API

PARAMS
Key Value Type Usage
user_id Form Data Integer required
post_id Form Data Integer required

 


User Requests

Post – Register a new User

Staging: https://project-expat.com/wp-json/user/registration/ Live:  http://project-expat.com/wp-json/user/registration/

This API will use to register a new user and shoot emails as well, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API

PARAMS
Key Value Type Usage
title Form Data String [Use GET – Get list of all title data API ] required
first_name Form Data String required
last_name Form Data String required
email Form Data Email required
phone Form Data Number 10 digit required
password Form Data Password required
nationality Form Data String [Use GET – Get list of all country data API ] required
dob Form Data String Date Format dd-mm-yyyy required
edm 211,411 String required

 


Post – Register a new User using social media

Staging: https://project-expat.com/wp-json/user/social-registration/ Live:  http://project-expat.com/wp-json/user/social-registration/

This API will use to register a new user using social media and shoot emails as well, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API

PARAMS
Key Value Type Usage
title Form Data String [Use GET – Get list of all title data API ] required
first_name Form Data String required
last_name Form Data String required
email Form Data Email required
phone Form Data Number 10 digit required
password Form Data Password required
nationality Form Data String [Use GET – Get list of all country data API ] required
dob Form Data String Date Format dd-mm-yyyy required
edm 211 String required

 


Post – Login a User

Staging: https://project-expat.com/wp-json/user/login/ Live:  http://project-expat.com/wp-json/user/login/

This API will use to login a user, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API

PARAMS
Key Value Type Usage
email Form Data Email required
password Form Data Password required

 


Post – Forget Password for user Account

Staging: https://project-expat.com/wp-json/user/forgot-password/ Live:  http://project-expat.com/wp-json/user/forgot-password/

This API will use to send a link to the user on his email to reset the password for his account, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API

PARAMS
Key Value Type Usage
email Form Data Email required
edm 756 String required

 


Post – Reset Password for user Account

Staging: https://project-expat.com/wp-json/user/reset-password/ Live:  http://project-expat.com/wp-json/user/reset-password/

This API will use to encoded details and help user to regenrate the new password for his account, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API

PARAMS
Key Value Type Usage
new_password Request URL Data, that recives on email of forgot password. Password required
userID Request URL Data, that recives on email of forgot password. Password required
usertoken Request URL Data, that recives on email of forgot password. Password required

 


Post – Verify User Account

Staging: https://project-expat.com/wp-json/user/verification/ Live:  http://project-expat.com/wp-json/user/verification/

This API will use to verify user’s email address and activate his account, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API

PARAMS
Key Value Type Usage
uid Request URL Data, that recives on email of registration. Password required

 


Post – Update a User Profile

Staging: https://project-expat.com/wp-json/user/profile-update/ Live:  http://project-expat.com/wp-json/user/profile-update/

This API will use to update login user profile, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API

PARAMS
Key Value Type Usage
user_id Form Data Integer required
title Form Data String [Use GET – Get list of all title data API ] required
first_name Form Data String required
last_name Form Data String required
email Form Data Email required
phone Form Data Number 10 digit required
nationality Form Data String [Use GET – Get list of all country data API ] required
dob Form Data String Date Format dd-mm-yyyy required

 


Post – Change/Update Profile Image for user account

Staging: https://project-expat.com/wp-json/user/profile-image-update/ Live:  http://project-expat.com/wp-json/user/profile-image-update/

This API will use to change/update profile image of user account, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API

PARAMS
Key Value Type Usage
user_id Form Data Integer required
avatar Form Data File required

 


Post – Change Password for user account

Staging: https://project-expat.com/wp-json/user/change-password/ Live:  http://project-expat.com/wp-json/user/change-password/

This API will use to change password of user account, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API

PARAMS
Key Value Type Usage
user_id Form Data Integer required
current_password Form Data Password required
new_password Form Data Password required

 


Get – Get user account details

Staging: https://project-expat.com/wp-json/user/get-user/{user_id} Live:  http://project-expat.com/wp-json/user/get-user/{user_id}

This API will use to get user account details, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API

PARAMS
Key Value Type Usage
{user_id} User id Integer required

 


Delete Requests

Delete – Delete user account

Staging: https://project-expat.com/wp-json/user/delete-profile/ Live:  http://project-expat.com/wp-json/user/delete-profile/

This API will use to delete user account, which can be accessed with your provided API Credentials.

AUTHORIZATION OAuth 2.0

This request is using OAuth 2.0 from collection Web API

PARAMS
Key Value Type Usage
user_id Form Data Integer required