The Officient Developer Hub

Welcome to the Officient HR API docs. Let's jump right in!

Suggest Edits

Get access token

 
posthttps://api.officient.io/1.0/token
curl --request POST \
  --url https://api.officient.io/1.0/token
var request = require("request");

var options = { method: 'POST', url: 'https://api.officient.io/1.0/token' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.officient.io/1.0/token");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/token"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "access_token": "8c649d8be4971bef5eaf53b1484158c74b4ee979",
    "expires_in": 3600,
    "token_type": "Bearer",
    "scope": "admin",
    "refresh_token": "fed4845d2aacf5ef438b91a319c73190c1480675"
}

Body Params

code
string

Authorization code in case of 3 legged oauth flow

client_id
string

client_id of your app. Can be found under 'my apps'

client_secret
string

client secret of your app. Can be found under 'my apps'

grant_type
string

should always be either authorization_code or refresh_token

refresh_token
string

optional

 
Suggest Edits

Your account

This API will reveal information about your own account

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/account
curl --request GET \
  --url https://api.officient.io/1.0/account
var request = require("request");

var options = { method: 'GET', url: 'https://api.officient.io/1.0/account' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/account")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/account");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/account"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": {
        "company_id": 60002,
        "company_name": "YourCompanyName",
        "subdomain": "yoursubdomain"
    }
}
 

Scope required: basics:read

Suggest Edits

List people

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/people/list
curl --request GET \
  --url 'https://api.officient.io/1.0/people/list?page=page'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.officient.io/1.0/people/list',
  qs: { page: 'page' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/people/list?page=page")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/people/list?page=page");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/people/list"

querystring = {"page":"page"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": [{
            "id": 264,
            "name": "Walter White",
            "email": "walter@white.com",
            "role_name": "Chemist"
        },
        {
            "id": 263,
            "name": "Gustavo Fring",
            "email": null,
            "role_name": "Investor"
        },
        {
            "id": 262,
            "name": "Jesse Pinkman",
            "email": "jesse@white.com",
            "role_name": "Assistant"
        }
    ],
    "total_record_count": 3 
}

Query Params

page
int32
required

Controls pagination (0, 1, 2, ..) to view all results. 30 items per page.

 

Scope required: basics:read

Suggest Edits

Search people

search people by name, email or national number

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/people/search
curl --request GET \
  --url https://api.officient.io/1.0/people/search
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.officient.io/1.0/people/search' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/people/search")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/people/search");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/people/search"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

[
    {
        "id": 216742,
        "deleted": 0,
        "name": "John Doe",
        "national_number": "82146126684",
        "email": "john@doe.net",
        "matched_on": "national_number"
    }
]

Query Params

name
string

eg John Doe

email
string

eg john@doe.net

national_number
string

eg 82146126684

 

Scope required: personal.info:read

Suggest Edits

Person detail

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/people/person_id/detail
curl --request GET \
  --url https://api.officient.io/1.0/people/person_id/detail
var request = require("request");

var options = { method: 'GET',
  url:
   'https://api.officient.io/1.0/people/person_id/detail' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/people/person_id/detail")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/people/person_id/detail");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/people/person_id/detail"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": {
        "id": 264,
        "deleted": 0,
        "name": "Walter White",
        "email": "walter@white.com",
        "personal_email": "walter.white@gmail.com",
        "national_number": "90.12.12-001.61",
        "social_security_nr": "XB-1234321",
        "birthdate": "1966-12-31",
        "avatar": "https://www.gravatar.com/avatar/525ceb06bc8862932d853a033411e3b7?d=404",
        "linked_payroll_provider": "acerta",
        "phone": "001 477 764 898",
        "civil_state": "married",
        "nationality_country_code": "US",
        "gender": "male",
        "bank_account_iban": "DE 0750 8900 0000 0175 7814",
        "emergency_contact": {
            "name": "Skyler White",
            "relation": "family",
            "phone": "001 475 764 898"
        },
        "address": {
            "line_1": "3828 Piermont Dr",
            "line_2": "",
            "zipcode": "87112",
            "city": "Albuquerque",
            "state": "NM",
            "country_code": "US"
        },
        "team": {
            "id": 4,
            "name": "R&D team"
        },
        "current_role": {
            "name": "Chemist",
            "start_date": "2008-01-15"
        },
        "current_reports_to": {
            "person_id": 263,
            "person_name": "Gustavo Fring",
            "start_date": "2009-02-14"
        },
        "custom_fields": [{
            "custom_field_id": 109,
            "custom_field_name": "Allergies",
            "type": "email",
            "value": "Soy",
            "value_name": null
        }]
    }
}

Path Params

person_id
string
required
 

Scope required: personal.info:read

Suggest Edits

Add person

Add a new person to Officient

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
posthttps://api.officient.io/1.0/people/add
{
  "name": "Joan Lewis",
  "email": "joan@your.co",
  "personal_email": "",
  "phone": ""
}
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": {
        "id": "80"
    }
}
 

This API only creates a new person entry. Officient will not automatically assign a wage, contract or assets to new people.

Scope required: basics:write

Suggest Edits

Self-service invitation

Generate a secret URL that brings a person straight to the HR self-service platform.

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
posthttps://api.officient.io/1.0/people/selfservice/invite_link
curl --request POST \
  --url https://api.officient.io/1.0/people/selfservice/invite_link
var request = require("request");

var options = { method: 'POST',
  url:
   'https://api.officient.io/1.0/people/selfservice/invite_link' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/people/selfservice/invite_link")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.officient.io/1.0/people/selfservice/invite_link");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/people/selfservice/invite_link"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": {
        "secret_url": "https://selfservice.officient.io/login/token/642/2564/765/Gq1vfrX6u4C6DqTDFX6nIA1S0kX7ljLSzCe/"
    }
}

Body Params

person_id
string
required

Officient will generate a selfservice invite link for this person

 

This URL should only be shared with the person in question. This API can enable SSO scenarios with other HR applications.

Scope required: personal.info:write

Suggest Edits

Edit person

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
patchhttps://api.officient.io/1.0/people/person_id/detail
{
  "name": "Leroy Jenkins",
  "birthdate": "16/05/1989",
  "email": "leroy@blizzard.co",
  "personal_email": "leroy@hotmail.com",
  "phone": "+44 741 5468 154",
  "team_id": 840,
  "place_of_birth": "Londen",
  "nationality_country_code": "GB",
  "address_country_code": "BE",
  "address_line_1": "Kortrijksesteenweg 181",
  "address_line_2": "",
  "address_zipcode": "9000",
  "address_city": "Gent",
  "address_state": ""
}
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "success": 1
}
{"status_code":400,"reason_phrase":"Invalid date found : 16/13/1989"}

Path Params

person_id
int32
required
 

Scope required: personal.info:write

The address_country_code and the nationality_country_code fields should be ISO codes from this list: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2

Suggest Edits

Update manager

Who reports to who?

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
puthttps://api.officient.io/1.0/people/person_id/manager
{
  "manager_person_id": "100"
}
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "success": 1
}
{
    "status_code": 400,
    "reason_phrase": "The specified new manager does not exist or you do not have access to this person"
}

Path Params

person_id
int32
required
 

To remove a manager, set manager_person_id to empty string.

Scope required: basics:write

Suggest Edits

Update role

Set the function description for each person

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
puthttps://api.officient.io/1.0/people/person_id/role
{
	"new_role": "Team manager",
	"start_date": "2015-02-01"
}
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "success": 1
}
{
    "status_code": 400,
    "reason_phrase": "This person is already performing the given role"
}

Path Params

person_id
int32
required
 

Scope required: basics:write

Suggest Edits

Current wage

Get the current wage details for one person

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/wages/person_id/current
curl --request GET \
  --url https://api.officient.io/1.0/wages/person_id/current
var request = require("request");

var options = { method: 'GET',
  url:
   'https://api.officient.io/1.0/wages/person_id/current' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/wages/person_id/current")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/wages/person_id/current");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/wages/person_id/current"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": {
        "start_date": "2017-01-15",
        "estimated_monthly_total": 4394,
        "currency": "EUR",
        "type": "employee_paid_monthly",
        "rate": 2750,
        "registration_country_code": "BE",
        "estimated_monthly_cost": {
            "base_components": {
                "base_rate": 2750,
                "social_contributions": 885,
                "end_of_year_bonus": 245.83,
                "retirement_plan": 136.92,
                "holiday_pay": 226.17,
                "hospitalization_insurance": 0,
                "net_allowance": 0,
                "car": 0
            },
            "custom_components": [{
                "description": "maaltijdcheques",
                "monthly_value": 149.74
            }]
        },
        "weekly_time_engagement_minutes": {
            "monday": 480,
            "tuesday": 480,
            "wednesday": 480,
            "thursday": 480,
            "friday": 480,
            "saturday": 0,
            "sunday": 0
        }
    }
}

Path Params

person_id
string
required

The person you would like to receive wage information on

 

Scope required: wages:read

Suggest Edits

Wage history

Get the entire wage history for one person

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/wages/person_id/history
curl --request GET \
  --url https://api.officient.io/1.0/wages/person_id/history
var request = require("request");

var options = { method: 'GET',
  url:
   'https://api.officient.io/1.0/wages/person_id/history' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/wages/person_id/history")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/wages/person_id/history");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/wages/person_id/history"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": [{
            "start_date": "2017-01-15",
            "estimated_monthly_total": 4894,
            "currency": "EUR",
            "type": "employee_paid_monthly",
            "rate": 3250,
            "registration_country_code": "BE",
            "estimated_monthly_cost": {
                "base_components": {
                    "base_rate": 3250,
                    "social_contributions": 885,
                    "end_of_year_bonus": 245.83,
                    "retirement_plan": 136.92,
                    "holiday_pay": 226.17,
                    "hospitalization_insurance": 0,
                    "net_allowance": 0,
                    "car": 0
                },
                "custom_components": [{
                    "description": "maaltijdcheques",
                    "monthly_value": 149.74
                }]
            },
            "weekly_time_engagement_minutes": {
                "monday": 456,
                "tuesday": 456,
                "wednesday": 456,
                "thursday": 456,
                "friday": 456,
                "saturday": 0,
                "sunday": 0
            }
        },
        {
            "start_date": "2016-01-15",
            "estimated_monthly_total": 4594,
            "currency": "EUR",
            "type": "employee_paid_monthly",
            "rate": 2950,
            "registration_country_code": "BE",
            "estimated_monthly_cost": {
                "base_components": {
                    "base_rate": 2950,
                    "social_contributions": 885,
                    "end_of_year_bonus": 245.83,
                    "retirement_plan": 136.92,
                    "holiday_pay": 226.17,
                    "hospitalization_insurance": 0,
                    "net_allowance": 0,
                    "car": 0
                },
                "custom_components": []
            },
            "weekly_time_engagement_minutes": {
                "monday": 640,
                "tuesday": 640,
                "wednesday": 456,
                "thursday": 456,
                "friday": 456,
                "saturday": 0,
                "sunday": 0
            }
        }
    ]
}

Path Params

person_id
string
required

The person you need the wage history for

 

Scope required: wages:read

Suggest Edits

Yearly calendar

List the time off, overtime & scheduled time for a single person for an entire year

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/calendar/person_id/year
curl --request GET \
  --url https://api.officient.io/1.0/calendar/person_id/year
var request = require("request");

var options = { method: 'GET',
  url:
   'https://api.officient.io/1.0/calendar/person_id/year' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/calendar/person_id/year")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/calendar/person_id/year");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/calendar/person_id/year"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": {
        "time_off": [
            {
                "date": "2018-04-01",
                "scheduled_minutes": 0,
                "events": []
            },
            {
                "date": "2018-04-02",
                "scheduled_minutes": 456,
                "events": []
            },
            {
                "date": "2018-04-03",
                "scheduled_minutes": 456,
                "events": [
                    {
                        "id": 123,
                        "name": "Sick day",
                        "event_type": "sick_day",
                        "custom_day_off_type_id": "",
                        "date": "2018-04-03",
                        "duration_minutes": 456,
                        "start_time_minutes" : 540,
                        "type": "time_off",
                        "status": "approved",
                        "color": ""
                    }
                ]
            },
            {
                "date": "2018-04-04",
                "scheduled_minutes": 456,
                "events": [
                    {
                        "id": 124,
                        "name": "Overtime",
                        "event_type": "custom",
                        "custom_day_off_type_id": "123",
                        "date": "2018-04-04",
                        "duration_minutes": 60,
                        "start_time_minutes" : 780,
                        "type": "overtime",
                        "status": "approved",
                        "color": "a24689"
                    },
                    {
                        "id": 125,
                        "name": "Verlof",
                        "event_type": "custom",
                        "custom_day_off_type_id": "80",
                        "date": "2018-04-04",
                        "duration_minutes": 456,
                        "start_time_minutes" : 540,
                        "type": "time_off",
                        "status": "approved",
                        "color": "a24689"
                    }
                ]
            },
            {
                "date": "2018-04-05",
                "scheduled_minutes": 456,
                "events": [
                    {
                        "id": 128,
                        "name": "Training Day",
                        "event_type": "education",
                        "custom_day_off_type_id": "",
                        "date": "2018-04-05",
                        "duration_minutes": 456,
                        "start_time_minutes" : 540,
                        "type": "time_off",
                        "status": "approved",
                        "color": ""
                    }
                ]
            },
            {
                "date": "2018-04-29",
                "scheduled_minutes": 0,
                "events": []
            },
            {
                "date": "2018-04-30",
                "scheduled_minutes": 456,
                "events": []
            }
        ],
        "company_days_off": [
            {
                "name": "EASTER_MONDAY",
                "date": "2018-04-02"
            }
        ]
    }
}

Path Params

person_id
int32
required

The person you would like to receive calender information on

year
int32
required

Query Params

filter
string

can be either 'all' or 'days_with_events' to return only days containing events

 

The time_off array will contain one entry for each day of the year. All dates are in YYYY-MM-DD format.

Each date entry will include the 'scheduled_minutes' property. This is the amount of time a person works on that date, according to their weekly schedule.

The date entries will also include an events array. Multiple types of events can occur on a single day.

  • The 'event_type' field can be either 'custom', 'sick_day' or 'education'. The sick day and education day types are built-in event types. All other types are custom event types added by the user
  • The 'type' field can be either 'time_off' for time out of the office or 'overtime' for extra time worked
  • The status field can be either 'approved' or 'pending'
  • The color field indicates the hex color used in Officient for this type (eg FF0000 for red)
  • The 'start_time_minutes' field contains the approximate start time for the event. Please be aware that this time is not always exactly known to Officient. The start time is expressed in minutes from midnight, so 540 would mean 9AM (9*60).

Scope required: calendar:read

Suggest Edits

Monthly calendar

List the time off, overtime & scheduled time for a single person for an entire month

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/calendar/person_id/year/month
curl --request GET \
  --url https://api.officient.io/1.0/calendar/person_id/year/month
var request = require("request");

var options = { method: 'GET',
  url:
   'https://api.officient.io/1.0/calendar/person_id/year/month' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/calendar/person_id/year/month")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/calendar/person_id/year/month");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/calendar/person_id/year/month"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": {
        "time_off": [
            {
                "date": "2018-04-01",
                "scheduled_minutes": 0,
                "events": []
            },
            {
                "date": "2018-04-02",
                "scheduled_minutes": 456,
                "events": []
            },
            {
                "date": "2018-04-03",
                "scheduled_minutes": 456,
                "events": [
                    {
                        "id": 123,
                        "name": "Sick day",
                        "event_type": "sick_day",
                        "custom_day_off_type_id": "",
                        "date": "2018-04-03",
                        "duration_minutes": 456,
                        "start_time_minutes" : 540,
                        "type": "time_off",
                        "status": "approved",
                        "color": ""
                    }
                ]
            },
            {
                "date": "2018-04-04",
                "scheduled_minutes": 456,
                "events": [
                    {
                        "id": 124,
                        "name": "Overtime",
                        "event_type": "custom",
                        "custom_day_off_type_id": "123",
                        "date": "2018-04-04",
                        "duration_minutes": 60,
                        "start_time_minutes" : 780,
                        "type": "overtime",
                        "status": "approved",
                        "color": "a24689"
                    },
                    {
                        "id": 125,
                        "name": "Verlof",
                        "event_type": "custom",
                        "custom_day_off_type_id": "80",
                        "date": "2018-04-04",
                        "duration_minutes": 456,
                        "start_time_minutes" : 540,
                        "type": "time_off",
                        "status": "approved",
                        "color": "a24689"
                    }
                ]
            },
            {
                "date": "2018-04-05",
                "scheduled_minutes": 456,
                "events": [
                    {
                        "id": 128,
                        "name": "Training Day",
                        "event_type": "education",
                        "custom_day_off_type_id": "",
                        "date": "2018-04-05",
                        "duration_minutes": 456,
                        "start_time_minutes" : 540,
                        "type": "time_off",
                        "status": "approved",
                        "color": ""
                    }
                ]
            },
            {
                "date": "2018-04-29",
                "scheduled_minutes": 0,
                "events": []
            },
            {
                "date": "2018-04-30",
                "scheduled_minutes": 456,
                "events": []
            }
        ],
        "company_days_off": [
            {
                "name": "EASTER_MONDAY",
                "date": "2018-04-02"
            }
        ]
    }
}

Path Params

person_id
int32
required

The person you would like to receive calender information on

year
int32
required
month
int32
required
 

The time_off array will contain one entry for each day of the month. All dates are in YYYY-MM-DD format.

Each date entry will include the 'scheduled_minutes' property. This is the amount of time a person works on that date, according to their weekly schedule.

The date entries will also include an events array. Multiple types of events can occur on a single day.

  • The 'event_type' field can be either 'custom', 'sick_day' or 'education'. The sick day and education day types are built-in event types. All other types are custom event types added by the user
  • The 'type' field can be either 'time_off' for time out of the office or 'overtime' for extra time worked
  • The status field can be either 'approved' or 'pending'
  • The color field indicates the hex color used in Officient for this type (eg FF0000 for red)
  • The 'start_time_minutes' field contains the approximate start time for the event. Please be aware that this time is not always exactly known to Officient. The start time is expressed in minutes from midnight, so 540 would mean 9AM (9*60).

Scope required: calendar:read

Suggest Edits

Daily calendar

List the time off, overtime & scheduled time for a single person for a single day

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/calendar/person_id/year/month/day
curl --request GET \
  --url https://api.officient.io/1.0/calendar/person_id/year/month/day
var request = require("request");

var options = { method: 'GET',
  url:
   'https://api.officient.io/1.0/calendar/person_id/year/month/day' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/calendar/person_id/year/month/day")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/calendar/person_id/year/month/day");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/calendar/person_id/year/month/day"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": {
        "time_off": [
            {
                "date": "2018-04-03",
                "scheduled_minutes": 456,
                "events": [
                    {
                        "id": 123,
                        "name": "Sick day",
                        "event_type": "sick_day",
                        "custom_day_off_type_id": "",
                        "date": "2018-04-03",
                        "duration_minutes": 456,
                        "start_time_minutes" : 540,
                        "type": "time_off",
                        "status": "approved",
                        "color": ""
                    }
                ]
            }
        ],
        "company_days_off": [   ]
    }
}

Path Params

person_id
int32
required

The person you would like to receive calender information on

year
int32
required
month
int32
required
day
int32
required
 

The return format is similar to the monthly calendar API, but restricted to a single day.

Scope required: calendar:read

Suggest Edits

Add event

Add new events to a calender (eg a day off, overtime,..)

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
posthttps://api.officient.io/1.0/calendar/person_id/events/add
{  
   "type":"custom",
   "custom_day_off_type_id":"1103",
   "events":[  
      {  
         "date":"2018-12-29",
         "start_time_minutes":540,
         "duration_minutes":480
      }
   ]
}
{  
   "type":"sick_day",
   "custom_day_off_type_id":"1103",
   "events":[  
      {  
         "date":"2018-01-25",
         "start_time_minutes":540,
         "duration_minutes":"all_day"
      },
      {  
         "date":"2018-01-25",
         "start_time_minutes":540,
         "duration_minutes":"all_day"
      }
   ]
}
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "success": 1
}
{
    "status_code": 400,
    "reason_phrase": "There is already too much time off planned on 29/12/2018."
}

Path Params

person_id
int32
required
 

Scope required: calendar:write

Restrictions:

  • All events added in one API call must be within the same year.
  • The 'type' parameter can be either 'sick_day', 'education' or 'custom'
  • The custom_day_off_type_id must only be set when using the 'custom' type. Use the custom event types API call to get the custom types that are available in a given year.

Tips

For ease of use, the 'duration_minutes' parameter can be set to 'all_day'. This will signal that the event should have the duration of the scheduled amount of hours for that day.

Suggest Edits

Overwrite event

Create a new event or overwrite an existing one in a personal calender (eg a day off, overtime,..)

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
puthttps://api.officient.io/1.0/calendar/person_id/year/month/day/events/set
{
  "type":"custom",
  "custom_day_off_type_id":"1938",
  "start_time_minutes":540,
  "duration_minutes":150
}
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
   "success":1
}

Path Params

person_id
string
required
year
string
required
month
string
required
day
string
required
 

Scope required: calendar:write

A person can only have one instance of an event type every day. That means no 2 instances of a sick day, of 2 instances of the same type of overtime/day off are allowed on the same date. Because it's tedious to perform a delete-and-add cycle, this API call can overwrite an existing event or create a new one if no previous event was found.

This API call is handy for ERP integrations that want to synchronize timetracking and overtime in particular to Officient.

Restrictions:

  • The 'type' parameter can be either 'sick_day', 'education' or 'custom'
  • The custom_day_off_type_id must only be set when using the 'custom' type. Use the custom event types API call to get the custom types that are available in a given year.

Tips
For ease of use, the 'duration_minutes' parameter can be set to 'all_day'. This will signal that the event should have the duration of the scheduled amount of hours for that day.

Suggest Edits

Delete event

Remove an event from the calender, such as a day off

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
deletehttps://api.officient.io/1.0/calendar/person_id/events/event_id
curl --request DELETE \
  --url https://api.officient.io/1.0/calendar/person_id/events/event_id
var request = require("request");

var options = { method: 'DELETE',
  url:
   'https://api.officient.io/1.0/calendar/person_id/events/event_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/calendar/person_id/events/event_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.officient.io/1.0/calendar/person_id/events/event_id");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/calendar/person_id/events/event_id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "success": 1
}
{
    "status_code": 400,
    "reason_phrase": "No event found for that event_id."
}

Path Params

person_id
int32
required
event_id
int32
required
 

Scope required: calendar:write

Suggest Edits

Update time worked

Overwrite the amount of time worked on a certain day (eg for timetracking software integrations)

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
patchhttps://api.officient.io/1.0/calendar/person_id/year/month/day/work
{
	"duration_minutes": "120"
}
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "success": 1
}
{
    "status_code": 400,
    "reason_phrase": "Given date '2018-24-24' doesn't exist."
}

Path Params

person_id
int32
required
year
int32
required
month
int32
required
day
int32
required
 

Required scope: calendar:write

Suggest Edits

Update time worked in bulk

Overwrite the amount of time worked for a set of days in bulk (eg for timetracking software integrations)

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
patchhttps://api.officient.io/1.0/calendar/person_id/year/work/bulk
[
	{
		"duration_minutes": 456,
		"date": "2019-03-13"
	},
	{
		"duration_minutes": 240,
		"date": "2019-03-14"
	}
]
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "success": 1,
    "failed": [
        {
            "date": "2019-03-13",
            "reason": "No contract is active on 13/03/2019 for this person. A dynamic schedule can only be edited when a contract is active."
        }
    ]
}
{
    "status_code": 400,
    "reason_phrase": "Given date '2018-24-24' doesn't exist."
}
{
    "success": 1,
    "failed": [  ]
}

Path Params

person_id
int32
required
year
int32
required
 

Required scope: calendar:write

Suggest Edits

Reset time worked

reset the time worked on a given day to the regular work schedule for one person

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
posthttps://api.officient.io/1.0/calendar/person_id/year/month/day/work/reset
curl --request POST \
  --url https://api.officient.io/1.0/calendar/person_id/year/month/day/work/reset
var request = require("request");

var options = { method: 'POST',
  url:
   'https://api.officient.io/1.0/calendar/person_id/year/month/day/work/reset' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/calendar/person_id/year/month/day/work/reset")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.officient.io/1.0/calendar/person_id/year/month/day/work/reset");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/calendar/person_id/year/month/day/work/reset"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

Try the API to see results

Path Params

person_id
int32
required
year
int32
required
month
int32
required
day
int32
required
 

Required scope: calendar:write

Suggest Edits

Custom event types

fetch a list of custom event types including time off types, overtime types,..

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/calendar/events/types/year
curl --request GET \
  --url https://api.officient.io/1.0/calendar/events/types/year
var request = require("request");

var options = { method: 'GET',
  url:
   'https://api.officient.io/1.0/calendar/events/types/year' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/calendar/events/types/year")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/calendar/events/types/year");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/calendar/events/types/year"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": [
        {
            "id": 1350,
            "name": "Holidays",
            "alias": "Holidays",
            "active": 1,
            "color": "a24689",
            "interpretation": "time_off",
            "integrations": [
                {
                    "app": "sdworx",
                    "code": "122"
                }
            ]
        },
        {
            "id": 1434,
            "name": "Paid holiday",
            "alias": "Paid holiday",
            "active": 1,
            "color": "7986c9",
            "interpretation": "time_off",
            "integrations": [
                {
                    "app": "acerta",
                    "code": "192"
                }
            ]
        },
        {
            "id": 1390,
            "name": "Overtime",
            "alias": "Overtime",
            "active": 0,
            "color": "35b579",
            "interpretation": "overtime",
            "integrations": [
                {
                    "app": "liantis",
                    "code": "100"
                }
            ]
        }
      ]
}

Path Params

year
int32
required

the year you want custom event type to be returned for

 

Scope required: calendar:read

A type alias can be changed by the Officient user and is how they will recognise the type.
The color field indicates the hex color used in Officient for this type (eg FF0000 for red)

Suggest Edits

Event type limits

This API can tell how many days off a certain person has in a certain year

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/calendar/person_id/events/types/year/limits
curl --request GET \
  --url https://api.officient.io/1.0/calendar/person_id/events/types/year/limits
var request = require("request");

var options = { method: 'GET',
  url:
   'https://api.officient.io/1.0/calendar/person_id/events/types/year/limits' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/calendar/person_id/events/types/year/limits")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/calendar/person_id/events/types/year/limits");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/calendar/person_id/events/types/year/limits"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": [
        {
            "id": 3118,
            "name": "Official holidays",
            "limitation": "limit_in_days",
            "max_yearly_amount_days": 10,
            "max_yearly_amount_minutes": 0,
            "approval_needed": 1,
            "allowed_selfservice": 1
        },
        {
            "id": 3193,
            "name": "Time off",
            "limitation": "limit_in_minutes",
            "max_yearly_amount_days": 0,
            "max_yearly_amount_minutes": 8424,
            "approval_needed": 1,
            "allowed_selfservice": 1
        },
        {
            "id": 3183,
            "name": "Study days",
            "limitation": "unlimited",
            "max_yearly_amount_days": 0,
            "max_yearly_amount_minutes": 0,
            "approval_needed": 1,
            "allowed_selfservice": 1
        }
    ]
}

Path Params

person_id
int32
required
year
int32
required
 

Scope required: calendar:read

Suggest Edits

Set event type limit

This API can update the limitations for a specific event type

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
posthttps://api.officient.io/1.0/calendar/person_id/events/types/year/limits/type_id/set
{  
   "limitation":"limit_in_days",
   "max_yearly_amount_days":5
}
{ 
    "limitation": "unlimited" 
}
{ 
   "limitation": "limit_in_minutes" ,
   "max_yearly_amount_minutes": 500
}
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "success": 1
}
{
    "status_code": 400,
    "reason_phrase": "This exception is automatically calculated by your payroll provider. It cannot be changed. "
}

Path Params

person_id
int32
required
year
int32
required
type_id
int32
required
 

limitation can be either 'unlimited', 'limit_in_days' or 'limit_in_minutes.

For limits in days, the variable 'max_yearly_amount_days' must be set.
For limits in minutes, the variable 'max_yearly_amount_minutes' must be set.

Scope required: calendar:write

Suggest Edits

List calendar requests

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/calendar/requests/list
curl --request GET \
  --url https://api.officient.io/1.0/calendar/requests/list
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.officient.io/1.0/calendar/requests/list' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/calendar/requests/list")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/calendar/requests/list");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/calendar/requests/list"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": [
        {
            "id": 56,
            "status": "pending",
          	"requester": [
                "id": 264,
              	"name": "Walter White"
            ]
        },
        {
            "id": 55,
            "status": "closed",
          	"requester": [
                "id": 263,
              	"name": "Gustavo Fring"
            ]
        }
    ]
}

Query Params

page
string
status
string

Can be either "all", "pending" or "closed"

 

Scope required: calendar:read

Suggest Edits

Calendar request detail

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/calendar/requests/request_id/detail
curl --request GET \
  --url https://api.officient.io/1.0/calendar/requests/request_id/detail
var request = require("request");

var options = { method: 'GET',
  url:
   'https://api.officient.io/1.0/calendar/requests/request_id/detail' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/calendar/requests/request_id/detail")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/calendar/requests/request_id/detail");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/calendar/requests/request_id/detail"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": {
        "id": 51,
        "status": "pending",
        "requester": [
            "id": 21001,
            "name": "Walter"
        ],
        "events": [
            {
                "id": 174,
                "date": "2019-07-16",
                "start_time_minutes": 540,
                "duration_minutes": 456,
                "name": "Overtime",
                "color": "4ecdc4"
            },
          	{
                "id": 173,
                "date": "2019-07-15",
                "start_minutes": 540,
                "duration_minutes": 456,
                "name": "Overtime",
                "color": "4ecdc4"
            }
        ]
    }
}
{
    "status_code": 400,
    "reason_phrase": "Request not found or you have no access."
}

Path Params

request_id
int32
required
 

Scope required: calendar:read

Suggest Edits

List assets

List all assets

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/assets/list
curl --request GET \
  --url https://api.officient.io/1.0/assets/list
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.officient.io/1.0/assets/list' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/assets/list")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/assets/list");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/assets/list"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": [{
            "id": 38,
            "name": "HTC HD2",
            "owner": {
                "id": 264,
                "name": "Randy Marsh"
            }
        },
        {
            "id": 37,
            "name": "HP Z Display Z34c",
            "owner": {
                "id": 41,
                "name": "Michiel Bearelle"
            }
        },
        {
            "id": 36,
            "name": "Acer Aspire One",
            "owner": {
                "id": null,
                "name": null
            }
        }
    ]
}

Path Params

page
int32
required

Controls pagination (0, 1, 2, ..) to view all results. 30 items per page.

 

Scope required: basics:read

Suggest Edits

Asset detail

Get details about one asset

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/assets/asset_id/detail
curl --request GET \
  --url https://api.officient.io/1.0/assets/asset_id/detail
var request = require("request");

var options = { method: 'GET',
  url:
   'https://api.officient.io/1.0/assets/asset_id/detail' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/assets/asset_id/detail")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/assets/asset_id/detail");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/assets/asset_id/detail"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": {
        "id": 38,
        "name": "Acer Aspire One",
        "price": "1000.00",
        "deleted": 0,
        "picture": "",
        "serial_number": "AE1564",
        "vendor": "Coolblue",
        "owner": {
            "id": 264,
            "name": "Randy Marsh",
            "avatar": "https://www.gravatar.com/avatar/525ceb06bc8862932d853a033411e3b7?d=404"
        },
        "custom_fields": [{
            "custom_field_name": "Einddatum",
            "custom_field_id": 2,
            "value": "",
            "value_name": null,
            "type": "date"
        }]
    }
}

Path Params

asset_id
int32
required
 

Scope required: basics:read

Suggest Edits

Add asset

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
posthttps://api.officient.io/1.0/assets/add
{
	"owner_id": 21001,
	"asset_type_id": 15863
}
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": {
        "id": "56"
    }
}
{
    "status_code": 400,
    "reason_phrase": "asset_type_id should not be empty"
}
 

Scope required: basics:write

Suggest Edits

Edit asset

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
patchhttps://api.officient.io/1.0/assets/asset_id
{
	"owner_id": 21001,
	"price": 1899,
	"serial_number": "",
	"vendor": ""
}
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "success": 1
}
{
    "status_code": 400,
    "reason_phrase": "Asset not found or you have no access."
}
{
    "status_code": 400,
    "reason_phrase": "Employee not found or you have no access."
}

Path Params

asset_id
int32
required
 

Scope required: basics:write

none of the fields in the request body are mandatory.

Hint: to remove the owner from the asset, set owner_id to 0.

Suggest Edits

List custom asset types

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/assets/types/list
curl --request GET \
  --url https://api.officient.io/1.0/assets/types/list
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.officient.io/1.0/assets/types/list' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/assets/types/list")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/assets/types/list");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/assets/types/list"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": [
        {
            "id": 15863,
            "name": "Acer Aspire One",
            "price": "1000.00",
            "url": "",
            "description": ""
        },
        {
            "id": 15864,
            "name": "Macbook Pro 13'",
            "price": "1799.00",
            "url": "",
            "description": ""
        }
    ]
}
 

Scope required: basics:read

Suggest Edits

Add custom asset type

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
posthttps://api.officient.io/1.0/assets/types/add
{  
  "name":"Keycard",
  "price":10.5,
  "url":"http://keycards.xyz/"
}
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": {
        "id": "15869"
    }
}
{
    "status_code": 400,
    "reason_phrase": "An asset type with this name already exists."
}
{
    "status_code": 400,
    "reason_phrase": "Name should not be empty."
}
 

Scope required: basics:write

Suggest Edits

Delete custom asset type

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
deletehttps://api.officient.io/1.0/assets/types/asset_type_id
curl --request DELETE \
  --url https://api.officient.io/1.0/assets/types/asset_type_id
var request = require("request");

var options = { method: 'DELETE',
  url:
   'https://api.officient.io/1.0/assets/types/asset_type_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/assets/types/asset_type_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.officient.io/1.0/assets/types/asset_type_id");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/assets/types/asset_type_id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "success": 1
}

Path Params

asset_type_id
int32
required
 

Scope required: basics:write

Suggest Edits

List vehicles

Get a list of all vehicles in the fleet

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/fleet/list
curl --request GET \
  --url 'https://api.officient.io/1.0/fleet/list?page=page'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.officient.io/1.0/fleet/list',
  qs: { page: 'page' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/fleet/list?page=page")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/fleet/list?page=page");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/fleet/list"

querystring = {"page":"page"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": [{
            "id": 19,
            "type": "bicycle",
            "brand": "Brompton",
            "model": "H-3-R",
            "owner": {
                "id": 2790,
                "name": "Al Gore"
            }
        },
        {
            "id": 18,
            "type": "car",
            "brand": "Chevy",
            "model": "Volt",
            "owner": {
                "id": 38,
                "name": "Nancy Pelosi"
            }
        },
        {
            "id": 17,
            "type": "motorbike",
            "brand": "BMW",
            "model": "F 700 GS",
            "owner": {
                "id": 265,
                "name": "Maarten"
            }
        }
    ]
}

Query Params

page
int32
required

Controls pagination (0, 1, 2, ..) to view all results. 30 items per page.

 

Scope required: basics:read

Suggest Edits

Vehicle detail

Get details about one vehicle in the fleet

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/fleet/vehicle_id/detail
curl --request GET \
  --url https://api.officient.io/1.0/fleet/vehicle_id/detail
var request = require("request");

var options = { method: 'GET',
  url:
   'https://api.officient.io/1.0/fleet/vehicle_id/detail' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/fleet/vehicle_id/detail")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/fleet/vehicle_id/detail");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/fleet/vehicle_id/detail"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": {
        "id": 18,
        "type": "car",
        "brand": "Citroen",
        "model": "Xsara",
        "fuel": "gas",
        "plate": "1-NZH-879",
        "hp": 70,
        "co2_g_km": 120,
        "chassis_number": "AEFSF_FSF54546",
        "color": "yellow",
        "supplier": "",
        "contract_type": "",
        "date_first_registration": "1999-01-15",
        "specifics": "",
        "yearly_cost": {
            "base": "10000",
            "operational": "10000"
        },
        "deleted": 0,
        "owner": {
            "id": 38,
            "name": "Michael",
            "avatar": "https://www.gravatar.com/avatar/d29de674eecaad6bab4c8c4dde00dfde?d=404"
        },
        "custom_fields": [{
            "custom_field_name": "Lease date",
            "custom_field_id": 2,
            "value": "",
            "value_name": null,
            "type": "date"
        }]
    }
}

Path Params

vehicle_id
int32
required
 

Scope required: basics:read

Suggest Edits

Add vehicle

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
posthttps://api.officient.io/1.0/fleet/add
{
	"type": "car",
	"brand": "Audi",
	"model": "A6"
}
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": {
        "id": "29"
    }
}
{
    "status_code": 400,
    "reason_phrase": "The fields 'type', 'brand' and 'model' shouldn't be empty."
}
{
    "status_code": 400,
    "reason_phrase": "Type must be either car, bike or bicycle."
}
 

Scope required: basics:write

Type vehicle. Can either be 'car', 'bike' or 'bicycle'

Suggest Edits

Edit vehicle

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
patchhttps://api.officient.io/1.0/fleet/vehicle_id
{
	"owner_id": 21001,
	"brand": "Audi",
	"model": "A7",
	"fuel": "gas",
	"plate": "1-ABC-123",
	"hp": 335,
	"co2_g_km": 117,
	"chassis_number": "123456789",
	"color": "black",
	"specifics": "",
	"supplier": "Audi",
	"contract_type": "op_lease",
	"yearly_cost_base": "14000",
	"yearly_cost_operational": "0",
	"catalogue_value": "67000"
}
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "success": 1
}
{
    "status_code": 400,
    "reason_phrase": "Vehicle not found or you have no access."
}
{
    "status_code": 400,
    "reason_phrase": "'fuel' should either be 'gas', 'diesel', 'electric', 'fuel_cells', 'natural_gas' or ''"
}
{
    "status_code": 400,
    "reason_phrase": "'contract_type' should either be 'buy', 'hire', 'op_lease', 'fin_lease' or ''"
}
{
    "status_code": 400,
    "reason_phrase": "Employee not found or you have no access."
}

Path Params

vehicle_id
int32
required
 

Scope required: basics:write

Fuel type used. Can either be "", "gas", "diesel", "electric", "fuel_cells" or "natural_gas"

Contract types: Can either be "", "buy", "hire", "op_lease" or "fin_lease"

Suggest Edits

List contracts

Get a list of all contracts

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/contracts/list
curl --request GET \
  --url 'https://api.officient.io/1.0/contracts/list?page=page'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.officient.io/1.0/contracts/list',
  qs: { page: 'page' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/contracts/list?page=page")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/contracts/list?page=page");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/contracts/list"

querystring = {"page":"page"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": [
        {
            "id": 1093,
            "name": "Arbeidscontract",
            "owner": {
                "id": 45465,
                "name": "Dr. Dre"
            }
        },
        {
            "id": 1092,
            "name": "Non disclosure agreement",
            "owner": {
                "id": 4564,
                "name": "John I."
            }
        },
        {
            "id": 1091,
            "name": "Letter of Intent",
            "owner": {
                "id": 45116,
                "name": "Jason B."
            }
        }
    ]
}

Query Params

page
int32
required

Controls pagination (0, 1, 2, ..) to view all results. 30 items per page.

 

Scope required: contracts:read

Suggest Edits

Contract detail

Get details about one contract

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/contracts/contract_id/detail
curl --request GET \
  --url https://api.officient.io/1.0/contracts/contract_id/detail
var request = require("request");

var options = { method: 'GET',
  url:
   'https://api.officient.io/1.0/contracts/contract_id/detail' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/contracts/contract_id/detail")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/contracts/contract_id/detail");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/contracts/contract_id/detail"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": {
        "id": 1093,
        "name": "Arbeidscontract",
        "owner": {
            "id": 20184,
            "name": "Dr. Dre",
            "avatar": "https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=404"
        },
        "signatures": [
            {
                "type": "internal",
                "status": "signed",
                "signer": {
                    "type": "user",
                    "id": 44564,
                    "name": "Tim Cook"
                },
                "date_signed": "2014-06-02"
            },
            {
                "type": "employee",
                "status": "signed",
                "signer": {
                    "type": "employee",
                    "id": 45045465,
                    "name": "Dr. Dre"
                },
                "date_signed": "2014-06-03"
            }
        ],
        "date_created": "2014-06-01",
        "date_sent": "2014-06-01",
        "deleted": 0,
        "custom_fields": [{
            "custom_field_name": "Importance",
            "custom_field_id": 22,
            "value": "152",
            "value_name": 'High',
            "type": "select_option"
        }]
    }
}

Path Params

contract_id
int32
required
 

Scope required: contracts:read

Suggest Edits

Contract PDF

Get a PDF download link for any contract

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/contracts/contract_id/pdf
curl --request GET \
  --url https://api.officient.io/1.0/contracts/contract_id/pdf
var request = require("request");

var options = { method: 'GET',
  url:
   'https://api.officient.io/1.0/contracts/contract_id/pdf' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/contracts/contract_id/pdf")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/contracts/contract_id/pdf");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/contracts/contract_id/pdf"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": {
        "download_url": "https://cloud.document.url/456461/downloadpdf"
    }
}

Path Params

contract_id
int32
required
 

The secure download URL will only be valid for 30 seconds.

Scope required: contracts:read

Suggest Edits

Add contract

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
posthttps://api.officient.io/1.0/contracts/add
{  
   "person_id":216570,
   "file_type":"pdf",
   "contract_name":"Freelance contract",
   "template_id":"",
   "pdf_base64":"JVBERi0xLjMNCiX....FT0YNCg==",

}
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": {
        "id": "11491"
    }
}
{
    "status_code": 400,
    "reason_phrase": "Template for contract not found"
}
 

file_type can be any of the following:

  • 'pdf' for regular PDF-based contracts,
  • 'presigned_pdf' for PDF-based contracts that are already signed
  • 'private_template' for contracts based on Officient templates available in your account

Tip:

  • template_id is only required when file_type = private_template
  • pdf_base64 is only required when file_type is either pdf or presigned_pdf

Scope required: contracts.write

Suggest Edits

Request contract signature

This API sends out an email invite requesting to sign a contract

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
posthttps://api.officient.io/1.0/contracts/signature/request
{  
   "contract_id":11490,
   "optional_message":"Test"
}
A binary file was returned

Your OAuth2 token is incorrect or has expired

{"success":1}
{  
   "status_code":400,
   "reason_phrase":"Officient does not have an email address on file for this person"
}
 

Scope required: contracts.write

Suggest Edits

List documents

This API call lists up all documents related to a specific object

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/documents/object_type/object_id/list
curl --request GET \
  --url https://api.officient.io/1.0/documents/object_type/object_id/list
var request = require("request");

var options = { method: 'GET',
  url:
   'https://api.officient.io/1.0/documents/object_type/object_id/list' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/documents/object_type/object_id/list")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/documents/object_type/object_id/list");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/documents/object_type/object_id/list"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": [
        {
            "id": 45262,
            "filename": "scan_license.jpg",
            "filesize_bytes": 10650,
            "document_type": "Drivers licenses",
            "date_uploaded": "2019-01-06",
            "visible_in_selfservice": 0,
        },
        {
            "id": 45261,
            "filename": "Report ABC.pdf",
            "filesize_bytes": 16534,
            "document_type": "Attesten",
            "visible_in_selfservice": 1
        }
    ]
}

Path Params

object_type
string
required

pick one: employee, asset, car

object_id
int32
required

Query Params

page
int32

Controls pagination (0, 1, 2, ..) to view all results. 30 items per page.

 

Required scope: documents.read

Suggest Edits

Download document

This API call returns a download url for a document

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/documents/file_id/download
curl --request GET \
  --url https://api.officient.io/1.0/documents/file_id/download
var request = require("request");

var options = { method: 'GET',
  url:
   'https://api.officient.io/1.0/documents/file_id/download' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/documents/file_id/download")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/documents/file_id/download");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/documents/file_id/download"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": {
        "download_url": "https://sample-url.com"
    }
}

Path Params

file_id
int32
required
 

Require scope: documents.read

Note: the download url is only valid for a few minutes

Suggest Edits

Upload document

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
posthttps://api.officient.io/1.0/documents/object_type/object_id/add
{  
   "document_base64":"dGVzdA==",
   "document_type":"Passport",
   "filename":"passport.txt",
   "visible_in_selfservice": 1
}
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": {
        "id": "45275"
    }
}
{
    "status_code": 400,
    "reason_phrase": "The filename should contain an extension."
}

Path Params

object_type
string
required

pick one: employee, asset, car

object_id
int32
required
 

Set 'visible_in_selfservice' to either 0 or 1 to hide or show this document in the HR self-service. This value defaults to 0.

Scope required: documents.write

Suggest Edits

List teams

List all teams

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/teams/list
curl --request GET \
  --url https://api.officient.io/1.0/teams/list
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.officient.io/1.0/teams/list' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/teams/list")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/teams/list");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/teams/list"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": [
        {
            "id": 4,
            "name": "Sales team"
        },
        {
            "id": 80,
            "name": "Development team"
        }
    ]
}
 

Scope required: basics:read

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
posthttps://api.officient.io/1.0/teams/add
{
  "name": "your_team_name"
}
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "success": 1, 
  "id": 123
}
{
   "status_code": 400,
   "reason_phrase": "Name should not be empty"
}
 

Creates a new team in Officient and returns its ID

Scope required: basics:write

Suggest Edits

Edit team

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
patchhttps://api.officient.io/teams/team_id
{
  "name": "new_team_name"
}
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
	"success": 1
}
{
   "status_code": 400,
   "reason_phrase": "Team with id '10' not found"
}

Path Params

team_id
int32
required

The ID of the team you'd like to update

 

Update the information about a team in Officient

Scope required: basics:write

Suggest Edits

Add webhook

use this API to subscribe to notifications

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
posthttps://api.officient.io/1.0/webhooks/add
{  
   "target_url":"https://hooks.zapier.com/<unique_path>",
   "event":"person_added"
}
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": {
        "id": "7"
    }
}
 

Scope required: webhooks:write

The following events are supported:

  • person_added
  • person_updated
  • person_deleted
  • person_reactivated
  • asset_added
  • asset_updated
  • asset_deleted
  • days_off_added
  • days_off_updated
  • days_off_deleted
Suggest Edits

Delete webhook

Use this API to unsubscribe from notifcations

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
deletehttps://api.officient.io/1.0/webhooks/webhook_id
curl --request DELETE \
  --url https://api.officient.io/1.0/webhooks/webhook_id
var request = require("request");

var options = { method: 'DELETE',
  url:
   'https://api.officient.io/1.0/webhooks/webhook_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/webhooks/webhook_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.officient.io/1.0/webhooks/webhook_id");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/webhooks/webhook_id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

Try the API to see results

Path Params

webhook_id
int32
required
 

Scope required: webhooks:write

Suggest Edits

List webhooks

View currently active notifications

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.officient.io/1.0/webhooks/list
curl --request GET \
  --url https://api.officient.io/1.0/webhooks/list
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.officient.io/1.0/webhooks/list' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.officient.io/1.0/webhooks/list")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.officient.io/1.0/webhooks/list");

xhr.send(data);
import requests

url = "https://api.officient.io/1.0/webhooks/list"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "data": [
        {
            "id": 3,
            "event": "person_added",
            "target_url": "https://hooks.zapier.com/<unique_path>"
        },
        {
            "id": 7,
            "event": "person_deleted",
            "target_url": "https://hooks.zapier.com/<unique_path>"
        }
    ]
}
 

Scope required: webhooks:read