Public API Documentation
getTasks Endpoint
The getTasks
endpoint provides an authenticated mechanism for retrieving tasks associated with a specific user. Tasks are filtered and returned in reverse chronological order, suitable for use in Zapier integrations or similar services.
Endpoint Overview
- URL:
https://<your-cloud-functions-url>/getTasks
- Method:
GET
- Authentication: API Key (via
x-api-key
header) - Purpose: Returns tasks associated with the authenticated user, ordered by their last update time in descending order.
Authentication
This endpoint requires an API key for authentication:
- Include the API key in the request headers:
x-api-key: <your-api-key>
The API key is validated against stored keys in Firestore. If the key is invalid, revoked, or missing, the request will return a 401 Unauthorized
response.
Request Parameters
The endpoint does not require query parameters. Tasks are automatically filtered to only include those associated with the authenticated user.
Response Format
The response is a JSON array of task objects. Each object includes the following fields:
Field | Type | Description |
---|---|---|
original_id | string | The original ID of the task in the database. |
id | string | A unique identifier for the task, combining the task ID and updated timestamp. |
title | string | The title of the task. |
description | string | Task description, including the NeptuneCRM Task ID. |
start | string | The start time of the task (ISO-8601 format). |
end | string | The end time of the task (ISO-8601 format). |
all_day | boolean | Whether the task is an all-day event. |
created_at | string | When the task was created (ISO-8601 format). |
updated_at | string | When the task was last updated (ISO-8601 format). |
deleted_at | string | When the task was deleted (ISO-8601 format) or null if not deleted. |
Example Response
[
{
"original_id": "task123",
"id": "task123-1672435200000",
"title": "Install Pool",
"description": "Install a new pool for John Doe. (NeptuneCRM Task ID: task123)",
"start": "2024-12-31T10:00:00Z",
"end": "2024-12-31T11:00:00Z",
"all_day": false,
"created_at": "2024-12-29T12:00:00Z",
"updated_at": "2024-12-30T14:00:00Z",
"deleted_at": null
},
{
"original_id": "task124",
"id": "task124-1672521600000",
"title": "Inspect Pump",
"description": "Inspect the pool pump for Jane Doe. (NeptuneCRM Task ID: task124)",
"start": "2024-12-31T15:00:00Z",
"end": "2024-12-31T16:00:00Z",
"all_day": false,
"created_at": "2024-12-29T15:00:00Z",
"updated_at": "2024-12-30T16:00:00Z",
"deleted_at": "2024-12-30T17:00:00Z"
}
]