Skip to main content
GET
/
activities
List all activities
curl --request GET \
  --url https://{base_url}/api/v1/activities \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://{base_url}/api/v1/activities"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://{base_url}/api/v1/activities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{base_url}/api/v1/activities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://{base_url}/api/v1/activities"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://{base_url}/api/v1/activities")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{base_url}/api/v1/activities")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
[
  {
    "id": "2760_182",
    "costCentre": "",
    "isBreak": false,
    "isPaid": true,
    "name": "Annual Leave",
    "payRollCodes": [
      {
        "id": "4630_116",
        "code": "Annual Leave",
        "payRollProvider": "DataPay"
      }
    ]
  },
  {
    "id": "2760_180",
    "costCentre": "",
    "isBreak": true,
    "isPaid": true,
    "name": "Break",
    "payRollCodes": [
      {
        "id": "4630_114",
        "code": "Break",
        "payRollProvider": "DataPay"
      }
    ]
  },
  {
    "id": "2760_179",
    "costCentre": "",
    "isBreak": true,
    "isPaid": false,
    "name": "Lunch Break",
    "payRollCodes": [
      {
        "id": "4630_113",
        "code": "Lunch Break",
        "payRollProvider": "DataPay"
      }
    ]
  },
  {
    "id": "2760_181",
    "costCentre": "",
    "isBreak": false,
    "isPaid": true,
    "name": "Sick Leave",
    "payRollCodes": [
      {
        "id": "4630_115",
        "code": "Sick Leave",
        "payRollProvider": "DataPay"
      }
    ]
  }
]

Authorizations

Authorization
string
header
required

Access token obtained from /oauth/token. Pass as Authorization: Bearer {token}

Response

A list of activities

id
string

The unique identifier for the activity

Example:

"2760_182"

costCentre
string

The cost centre associated with the activity. Empty string if not assigned.

Example:

""

isBreak
boolean

Whether this activity is classified as a break

Example:

false

isPaid
boolean

Whether this activity is paid

Example:

true

name
string

The display name of the activity

Example:

"Annual Leave"

payRollCodes
object[]

A list of payroll codes associated with this activity