Empuls v1 API
Introduction
Empuls API is a simple way to access Empuls internal APIs without requiring the user to go through to the web interface. At its core for authentication empuls uses OAuth 2.0 which allows API clients to access protected resources on behalf of a user without requiring the user’s credentials. This document describes the API and its usage.How to use this collection
- Use the EmpulsAPI v1 postman environment.
- Enter
base_urlvariable. This is usually the URL of the Empuls portal. ie.https://abc.xoxoday.com - Enter the credentials provided by empuls team in
client_id, client_secret, refresh_tokenvariables. - Enter the email of the user you want to use the services as in the
as_uservariable. - Save the environment using
ctrl+sorcmd+s. - Run the
Authentication/Company Access Tokenendpoint to generate access_token. This access_token will be automatically used in the Services APIs
Authentication
The Empuls OAuth authentication flow consists of the following steps:- The empuls internal team will generate and share the Client ID, Client Secret, and Refresh Token with the user.
- Use the given credentials to fetch Access Token using the
/chef/v1/oauth/token/companyendpoint - Send the Access Token in the Authorization header as
Bearerfor all the Sevices API - Send the email of the person you want to access the resources in
as_userheader.
Authorization and as_user request header in each request to the Empuls API.
Point to note :
- The access token will be valid for 1 day
- The refresh token will be valid for 60 days
- Each time an Access token is generated, the Refresh token expiration date is extended 60 days from that time
Authentication error response
If an API key is missing, malformed, or invalid, you will receive an HTTP 401 Unauthorized response code. 503 response An HTTP503 response from our servers indicates there is an unexpected spike in API access traffic. The server is usually operational within the next five minutes.
AuthorizationBearer TokenToken#{access_token}
Authentication
This endpoint lets users generate Access Token to use for authentication AuthorizationBearer TokenThis folder is using an authorization helper from the collection Empuls v1 API POSTGet Company Access Token Open Request#{base_url}/chef/v1/oauth/token/company
Gets information about the authenticated user.
Bodyraw (json)json
Services
Services Collection contains all the available services accessible via API AuthorizationBearer TokenThis folder is using an authorization helper from the collection Empuls v1 APIAppreciation
AuthorizationBearer TokenThis folder is using an authorization helper from the collection Empuls v1 APIPOSTSend Award
Open Request#{base_url}/chef/api/sdk/award.mutation.sendAwardAuthorizationBearer TokenThis request is using an authorization helper from collection Empuls v1 APIRequest Headersas_user#{as_user}Bodyraw (json)json
#{base_url}/chef/api/sdk/award.mutation.sendAppreciationAuthorizationBearer TokenThis request is using an authorization helper from collection Empuls v1 APIRequest Headersas_user#{as_user}Bodyraw (json)json
Gifting
AuthorizationBearer TokenThis folder is using an authorization helper from collection Empuls v1 API POSTSend Gift Open Request#{base_url}/chef/api/sdk/gift.mutation.sendGiftAuthorizationBearer TokenThis request is using an authorization helper from collection Empuls v1 APIRequest Headersas_user#{as_user}Bodyraw (json)View Morejson
Webview
AuthorizationBearer TokenThis folder is using an authorization helper from collection Empuls v1 API GETWebview Open Request#{base_url}/chef/api/webview?authorization=#{access_token}&as_user=#{as_user}&landing_page=appreciation×tamp=#{timestamp}&hash=#{hash}Query Paramsauthorization#{access_token}as_user#{as_user}landing_pageappreciationtimestamp#{timestamp}hash#{hash}
Reporting
AuthorizationBearer TokenThis folder is using an authorization helper from collection Empuls v1 API POSTAward Reports Open Request#{base_url}/chef/api/sdk/admin_reports.query.award_queryAuthorizationBearer TokenThis request is using an authorization helper from collection Empuls v1 APIBodyraw (json)json
#{base_url}/chef/api/sdk/admin_reports.query.budget_points_queryAuthorizationBearer TokenThis request is using an authorization helper from collection Empuls v1 APIBodyraw (json)json
#{base_url}/chef/api/sdk/admin_reports.query.budget_transactions_queryAuthorizationBearer TokenThis request is using an authorization helper from collection Empuls v1 APIBodyraw (json)json
#{base_url}/chef/api/sdk/admin_reports.query.conversation_queryAuthorizationBearer TokenThis request is using an authorization helper from collection Empuls v1 APIBodyraw (json)json
#{base_url}/chef/api/sdk/admin_reports.query.corevalue_queryAuthorizationBearer TokenThis request is using an authorization helper from collection Empuls v1 APIBodyraw (json)json
#{base_url}/chef/api/sdk/admin_reports.query.gift_queryAuthorizationBearer TokenThis request is using an authorization helper from collection Empuls v1 APIBodyraw (json)json
#{base_url}/chef/api/sdk/admin_reports.query.leaderboard_queryAuthorizationBearer TokenThis request is using an authorization helper from collection Empuls v1 APIBodyraw (json)json
#{base_url}/chef/api/sdk/admin_reports.query.engagement_queryAuthorizationBearer TokenThis request is using an authorization helper from collection Empuls v1 APIBodyraw (json)json
#{base_url}/chef/api/sdk/admin_reports.query.nomination_queryAuthorizationBearer TokenThis request is using an authorization helper from collection Empuls v1 APIBodyraw (json)json
#{base_url}/chef/api/sdk/admin_reports.query.redemption_queryAuthorizationBearer TokenThis request is using an authorization helper from collection Empuls v1 APIBodyraw (json)json
#{base_url}/chef/api/sdk/admin_reports.query.point_expiry_queryAuthorizationBearer TokenThis request is using an authorization helper from collection Empuls v1 APIBodyraw (json)json
Copy
#{base_url}/chef/api/sdk/insightReport.query.getSurveyDataListAuthorizationBearer TokenThis request is using an authorization helper from collection Empuls v1 APIBodyraw (json)json
UserProfile
AuthorizationBearer TokenThis folder is using an authorization helper from collection Empuls v1 API POSTFetch User Profile Open Request#{base_url}/chef/api/sdk/profile.query.getProfileAuthorizationBearer TokenThis request is using an authorization helper from collection Empuls v1 APIBodyraw (json)View Morejson
Feeds
AuthorizationBearer TokenThis folder is using an authorization helper from collection Empuls v1 API POSTFetch Feeds Open Request#{base_url}/chef/api/sdk/feed.query.getFeedAuthorizationBearer TokenThis request is using an authorization helper from collection Empuls v1 APIBodyraw (json)json