Calendar API

Calendar Events

The calendar resource represents calendar events in Snapbooks. Calendar events are mostly accounting-related events, such as the due date of government reporting.

List calendar events

GET /snapbooks/api/v2/calendar

Retrieves a list of calendar events for a specified client account and date range.

Parameters

Name Type Description Required
client_account_id integer The client account ID to fetch events for. Yes
from_date string The start date to fetch events from (format: YYYY-MM-DD). Yes
to_date string The end date to fetch events until (format: YYYY-MM-DD). Yes

Response

A successful response returns a JSON object containing an array of calendar events:

{
  "data": [
    {
      "event_type": "WITHHOLDING_TAX_AND_EMPLOYER_CONTRIBUTION",
      "if": ["HAS_PAYROLL"],
      "due_date": "2024-01-15",
      "reporting_period": {
        "start_date": "2023-11-01",
        "end_date": "2023-12-31"
      }
    },
    {
      "event_type": "WITHHOLDING_TAX_AND_EMPLOYER_CONTRIBUTION",
      "if": ["HAS_PAYROLL"],
      "due_date": "2024-03-15",
      "reporting_period": {
        "start_date": "2024-01-01",
        "end_date": "2024-02-29"
      }
    }
  ]
}

Response Fields

Field Type Description
event_type string The type of calendar event.
if array Conditions that determine when this event applies.
due_date string The date when the event is due (format: YYYY-MM-DD).
reporting_period object The period this event covers.
reporting_period.start_date string Start date of the reporting period.
reporting_period.end_date string End date of the reporting period.

Relaterte artikler