Skip to main content

What is a Time Entry ID?

A time entry ID is a unique identifier assigned to each time entry within a project. It’s required for making API requests that interact with specific time entries, such as creating invoices with time entries.

Step-by-Step Instructions

1

Make the API request

Send a GET request to the List time entries API endpoint, including your API key in the request header. You’ll need to provide the client_id and project_id as query parameters.
2

Parse the response

The response will contain a time_entries array with time entry objects, each containing an id field.Example:
{
  "time_entries": [
    {
      "id": "128c1dfc-b29f-4fda-9a05-8a90e197b81b",
      "user_id": "5a2de667-243b-4da3-b090-b698a03d98da",
      "user_name": "John Doe",
      "user_email": "[email protected]",
      "task_id": "4d0d7ad1-91ce-44d0-abfe-6718422716dd",
      "task_name": "UI Design",
      "project_id": "e34204233797f4b637c5",
      "project_name": "Website Redesign",
      "client_id": "d3e77fe4b9cae1e82d8a",
      "client_name": "Acme Corp",
      "hours": 2.5,
      "recorded_on": "2025-01-15",
      "notes": "Completed working on adding tests.",
      "status": "unbilled",
      "created_at": "2025-01-15T10:30:00Z",
      "updated_at": "2025-01-15T10:30:00Z"
    },
    {
      "id": "6be815a8-9a10-455c-95d9-b0b548664420",
      "user_id": "5a2de667-243b-4da3-b090-b698a03d98da",
      "user_name": "John Doe",
      "user_email": "[email protected]",
      "task_id": "f23a9c19-1153-4ef9-b488-1789f047b245",
      "task_name": "Frontend Development",
      "project_id": "e34204233797f4b637c5",
      "project_name": "Website Redesign",
      "client_id": "d3e77fe4b9cae1e82d8a",
      "client_name": "Acme Corp",
      "hours": 4.0,
      "recorded_on": "2025-01-16",
      "notes": "Implemented user authentication",
      "status": "unbilled",
      "created_at": "2025-01-16T09:15:00Z",
      "updated_at": "2025-01-16T09:15:00Z"
    }
  ],

  // ... rest of the details
}
3

Extract the time entry ID

Here the time entry ID for the first entry is: 128c1dfc-b29f-4fda-9a05-8a90e197b81b.You can access the time entry ID in your code from the response using:
// Get the first time entry's ID
const timeEntryId = response.time_entries[0].id;

// Or iterate through all time entries to find a specific one
const uiDesignEntry = response.time_entries.find(entry => entry.task_name === "UI Design");
const uiDesignEntryId = uiDesignEntry.id;