API 2.0
Events

Events

Event types

GoodDay Api supports the following event types:
Name Notes
project-milestone Project milestone - single day event (no endDate)
project-event Generic project event
company-event Generic organization-wide event
company-holiday Holiday / extra day offs
personal-vacation User vacation dates
personal-sick User sick leave dates
personal-travel User travel / out of office dates

Query events

Retrieve list of events
/events

Parameters

Name Required Default Type/Format Description
startDate yes Date, YYYY-MM-DD Events start date
endDate yes Date, YYYY-MM-DD Events end date
eventTypes no eventType1,eventType2 List of event types separated by comma, no spaces

Response

Sample response →
[
    {
        "id": "EVENT-ID",
        "assignedToUserId": null,
        "startDate": "2021-01-01",        
        "endDate": "2021-01-08",
        "eventType": "personal-vacation",
        "userId": "USER-ID"
        "momentCreated": "2020-10-13T18:56:19",
        "name": "Alex vacation",
        "notes": null,
        "projectId": null
    },
    ...
]

Get Event

Retrieve event details
/event/EVENT-ID

Response

Sample response →
{
    "id": "EVENT-ID",
    "assignedToUserId": null,
    "startDate": "2021-01-01",        
    "endDate": "2021-01-08",
    "eventType": "personal-vacation",
    "userId": "USER-ID"
    "momentCreated": "2020-10-13T18:56:19",
    "name": "Alex vacation",
    "notes": null,
    "projectId": null
}

Create event

Create new event
/events

Parameters

Name Required Type/Format Description
createdByUserId yes String ID of a user, a new event is created on behalf of
eventType yes String Event type
name yes String Event name
notes no String Event notes
startDate yes Date, YYYY-MM-DD format Event start date
endDate depends on event types Date, YYYY-MM-DD format Event end date. Not required for single-day events i.e. project-milestone
userId required for personal events String Personal event user ID
projectId required for project events String Project/folder ID
assignedToUserId no String User ID an event is assigned to
Sample CURL →

curl -X POST 
    https://api.goodday.work/2.0/events 
    -H "Content-Type: application/json" 
    -H "gd-api-token: AUTH-TOKEN" 
    -d '{
        "createdByUserId": "USER-ID",
        "eventTYpe": "personal-vacation",
        "name": "Alex vacation",
        "userId": "USER-ID"
        "startDate": "2020-09-25",
        "endDate": "2020-09-27"
        }'    
    

Response

Sample response →
{
    "id": "EVENT-ID",
    "assignedToUserId": null,
    "startDate": "2021-01-01",        
    "endDate": "2021-01-08",
    "eventType": "personal-vacation",
    "userId": "USER-ID"
    "momentCreated": "2020-10-13T18:56:19",
    "name": "Alex vacation",
    "notes": null,
    "projectId": null
}

Delete Event

Delete an Event
/event/EVENT-ID