Help Center

Calendar

The Calendar is the list of tasks the user is a participant in, presented as a calendar. This list consists of tasks and events whose deadline is indicated, and tasks with a programmed reminder for a given time interval.

You can select event types in the calendar by combining filters:

1. Due — events whose deadline is indicated in UTC+0;

2. DueDate — tasks whose deadline is indicated by date (without reference to timezone);

3. DueForCurrentStep — tasks whose deadline at the current step is within the selected time period in UTC+0;

4. Reminded — tasks with a programmed reminder.

Methods

GET /calendar

This method returns a list of tasks.

GET https://api.pyrus.com/v4/calendar
  ?start_date_utc=2021-12-15T20:30Z
  &end_date_utc=2022-01-01T20:30Z
  &item_count=50
  &all_accessed_tasks=false
  &filter_mask=7

Response body

{
  "has_more": true,
  "task": {
    "id": 11613,
    "text": "Payments",
    "create_date": "2017-08-17T14:31:18Z",
    "last_modified_date": "2017-08-18T10:00:11Z",
    "author": {
      "id": 1731,
      "first_name": "Bob",
      "last_name": "Smith",
      "email": "Bob.Smith@gmail.com",
      "type": "user"
    },
    "form_id": 1345,
    "approvals": [
      [
        {
          "person": {
            "id": 1733,
            "first_name": "John",
            "last_name": "Snow",
            "email": "John.Snow@gmail.com",
            "type": "user"
          },
          "approval_choice": "waiting"
        }
      ],
      [
        {
          "person": {
            "id": 1731,
            "first_name": "Bob",
            "last_name": "Smith",
            "email": "Bob.Smith@gmail.com",
            "type": "user"
          },
          "approval_choice": "waiting"
        }
      ]
    ],
    "fields": [
      {
        "id": 1,
        "type": "text",
        "name": "Purpose",
        "value": "IT conference in Amsterdam"
      }
    ],
    "comments": [
      {
        "id": 13767,
        "create_date": "2017-08-17T14:31:18Z",
        "author": {
          "id": 1731,
          "first_name": "Bob",
          "last_name": "Smith",
          "email": "Bob.Smith@gmail.com",
          "type": "user"
        },
        "reassigned_to": {
          "id": 1730,
          "first_name": "John",
          "last_name": "Snow",
          "email": "John.Snow@gmail.com",
          "type": "user"
        },
        "approvals_added": [
          [
            {
              "person": {
                "id": 1733,
                "first_name": "John",
                "last_name": "Snow",
                "email": "John.Snow@gmail.com",
                "type": "user"
              },
              "step": 1
            }
          ],
        ],
        "field_updates": [
          {
            "id": 1,
            "type": "text",
            "name": "Purpose",
            "value": "IT conference in Amsterdam"
          },
          {
            "id": 4,
            "type": "table",
            "name": "Payment Schedule",
          }
        ]
      }
    ]
  }
}

curl

curl -X GET \
  'https://api.pyrus.com/v4/calendar?start_date_utc=2021-12-15T20:30Z&end_date_utc=2022-01-01T20:30Z&item_count=50&all_accessed_tasks=false&filter_mask=7' \
  -H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
  -H 'Content-Type: application/json'

Parameters

start_date_utcDate and time of interval start in YYYY-MM-dd**T**HH:mm:ss**Z** format.
end_date_utcDate and time of interval end in YYYY-MM-dd**T**HH:mm:ss**Z** format.
item_countMaximum number of tasks that will be returned in reply. 50 default, 100 max.
all_accessed_tasksWhether all tasks accessible to user must be returned, including all roles of user and all tasks from forms accessible to user. Otherwise, only tasks where the user is an assignee or approver, that have not yet been approved, will be returned.

filter_mask

bit mask that determines filter combination: Due = 1, DueDate = 2, DueForCurrentStep = 4, Reminded = 8;.

Due = 1, DueDate = 2, Due OR DueDate = 3, DueForCurrentStep = 4, Due OR DueForCurrentStep = 5, DueDate OR DueForCurrentStep = 6, Due OR DueDate OR DueForCurrentStep = 7, Reminded = 8, Due OR Reminded = 9, DueDate OR Reminded = 10, Due OR DueDate OR Reminded =11, DueForCurrentStep OR Reminded = 12, Due OR DueForCurrentStep OR Reminded = 13, DueForCurrentStep OR Reminded = 14, Due OR DueDate OR DueForCurrentStep OR Reminded = 15.

Was this article helpful?