List published employee events
curl --request GET \
--url https://api.v3.andteam.com/v1/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.v3.andteam.com/v1/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.v3.andteam.com/v1/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.v3.andteam.com/v1/events"
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))
}{
"data": [
{
"id": "<string>",
"type": "employee.hired",
"occurredAt": "2023-11-07T05:31:56Z",
"publishedAt": "2023-11-07T05:31:56Z",
"employeeId": "<string>",
"employeeNumber": "<string>",
"companyId": "<string>",
"effectiveDate": "<string>",
"sequence": 123,
"data": {
"changedFields": [
"employeeNumber"
],
"startDate": "<string>",
"lastDay": "<string>"
},
"links": {
"employee": "<string>"
}
}
],
"next_cursor": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"instance": "<string>"
}Directory
List published employee events
Needs the Directory field group. The thin events behind the webhooks, for a consumer that cannot receive them: ids, dates and the names of changed fields, never values. Order by occurredAt and sequence.
GET
/
events
List published employee events
curl --request GET \
--url https://api.v3.andteam.com/v1/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.v3.andteam.com/v1/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.v3.andteam.com/v1/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.v3.andteam.com/v1/events"
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))
}{
"data": [
{
"id": "<string>",
"type": "employee.hired",
"occurredAt": "2023-11-07T05:31:56Z",
"publishedAt": "2023-11-07T05:31:56Z",
"employeeId": "<string>",
"employeeNumber": "<string>",
"companyId": "<string>",
"effectiveDate": "<string>",
"sequence": 123,
"data": {
"changedFields": [
"employeeNumber"
],
"startDate": "<string>",
"lastDay": "<string>"
},
"links": {
"employee": "<string>"
}
}
],
"next_cursor": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"instance": "<string>"
}Authorizations
Authorization: Bearer atk_live_…. Created in the API keys section of the Integrations settings; the secret is shown once.
Query Parameters
Page size, 1 to 500. Default 100.
Required range:
1 <= x <= 500The next_cursor of the previous page.
Only events published after this instant (ISO 8601).
One event type.
Available options:
employee.hired, employee.started, employee.changed, employee.leaving, employee.left, employee.hire_withdrawn, employee.termination_cancelled One of the key's companies.