> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sonderplan.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Time Entries

> Time activities are predefined task categories that users can reference when logging time entries in the time-tracking system.

By standardising task types, predefined activities enhance reporting accuracy, providing insights into the specific work required to complete a project.

<Note>`READ` access to the `ADMIN` module is required to access this endpoint</Note><Info>Currently, only users with Administrative level have access to view, create and modify time entries for other users time entries. <br/><br/>All users are able to create, edit and delete their own time entries, however this uses a separate API not currently available for public access. <br/><br/>Please contact our Support team if you are interested in accessing this private API.</Info>




## OpenAPI

````yaml /api-reference/openapi-mintlify.yaml get /v2/time-entry
openapi: 3.0.0
info:
  title: Sonderplan API
  description: >
    ## Overview

    You can use our REST API to securely access and modify the data within your
    Sonderplan account. This includes all the information within your bookings,
    projects and invoices that you can use to import / export data or create
    integrations with other systems and software that you use


    ### General Notes


    #### Specifying Fields

    The Sonderplan REST API allows you to specify a comma delimited string of
    exactly which fields are returned, using the `fields` parameter. Using this
    parameter has several advantages including:


    1. In future API versions we may change which fields are presented by
    default, so explicitly specifying the fields required overrides the defaults
    and ensure the fields are served

    2. Limiting fields reduces the processing we need to do and allows us to
    send you the data faster

    3. Some search filters only work if the field you are searching is added to
    the `fields` parameter.


    Example:


    ```

    fields=id,name,start,duration_min

    ```


    ### Applying Filters


    The Query Parameters section in each endpoint shows you special options that
    can be added to your request to customise the response we send you.


    Most endpoints offer the following query params:


    | Query Parameter |
    Description                                                    |

    |-----------------|----------------------------------------------------------------|

    | `fields`        | Only send the specified
    fields                                 |

    | `id`            | Specify one or more ids (comma seperated) of records to
    return |

    | `limit`         | The maximum number of records to
    return                        |

    | `page`          | The page number of records to
    return                           |

    | `order_asc` | Specify which field should be used to sort records
    `ascending` |

    | `order_desc` | Specify which field should be used to sort records
    `descending` |


    In addition to the standard `id` param, you can also specify most other
    fields as a query parameter, useful for performing searching and filtering
    of records.


    For example, you can specify `repeat_master_id=<repeat_booking_id>` to
    return all repeat children of that booking.


    #### Other Query Params


    Refer to the specific API endpoint documentation to see which other query
    params can be used.


    For example, some endpoints allow specifying `updated_after=<UNIX
    TIMESTAMP>` which will only send added, edited and even deleted records that
    were modified after the unix timestamp.


    #### Applying multiple filters


    By default, multiple filters are chained together using **OR** (either
    filter can be true and it will be included). You can change this behaviour
    by specifying `filter_operator=AND`, so each filter must be true to be
    included.


    #### Filtering by Custom Field Values


    For modules that include custom fields, you can search by the value of a
    custom field by adding the `custom_field_<field id>` to the URL query
    parameters. You **must** also specify the custom field in the `fields`
    parameter.


    ```

    GET
    https://api.sonderplan.com/v2/booking?fields=id,name,custom_field_238938&custom_field_238938=Offline

    ```


    This will return custom fields that contain the word 'Offline'.
  contact:
    email: info@sonderplan.com
  version: '2.0'
servers:
  - url: https://api.sonderplan.com
    description: Production Server
security: []
tags:
  - name: Booking
    description: Booking related operations
  - name: Project
    description: Project related operations
  - name: Resource
    description: Resource related operations
  - name: Contact
    description: Contact related operations
  - name: Quote
    description: Quote related operations
  - name: Invoice
    description: Invoice related operations
  - name: Invoice Template
    description: Invoice template related operations
  - name: Billable Item
    description: Billable item related operations
  - name: Rate Scheme
    description: Rate scheme related operations
  - name: Tax
    description: Tax related operations
  - name: Workspace
    description: Workspace (formerly Schedule) related operations
  - name: User
    description: User related operations
  - name: Group
    description: Group related operations
  - name: Status
    description: Status related operations
  - name: Custom Field
    description: Custom field related operations
  - name: Calendar Subscription
    description: Calendar Subscription Import related operations
  - name: Time Entry
    description: Time Entry related operations
  - name: Time Activity
    description: Time Activity related operations
paths:
  /v2/time-entry:
    get:
      tags:
        - Time Entry
      summary: Get Time Entries
      description: >
        Time activities are predefined task categories that users can reference
        when logging time entries in the time-tracking system.


        By standardising task types, predefined activities enhance reporting
        accuracy, providing insights into the specific work required to complete
        a project.


        <Note>`READ` access to the `ADMIN` module is required to access this
        endpoint</Note><Info>Currently, only users with Administrative level
        have access to view, create and modify time entries for other users time
        entries. <br/><br/>All users are able to create, edit and delete their
        own time entries, however this uses a separate API not currently
        available for public access. <br/><br/>Please contact our Support team
        if you are interested in accessing this private API.</Info>
      operationId: 37e99f91a870e882f7e6089cbce5a209
      parameters:
        - name: id
          in: query
          description: One or more (comma seperated) IDs of time entries to retrieve
          schema:
            type: string
        - name: project_id
          in: query
          description: >-
            One or more (comma seperated) project ids to retrieve associated
            time entries
          schema:
            type: string
        - name: booking_id
          in: query
          description: >-
            One or more (comma seperated) booking ids to retrieve associated
            time entries
          schema:
            type: string
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/order_asc'
        - $ref: '#/components/parameters/order_desc'
        - $ref: '#/components/parameters/filter_operator'
      responses:
        '200':
          description: Successful Operation
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/TimeEntry'
                  meta:
                    $ref: '#/components/schemas/pagination'
                type: object
        '401':
          description: Authorization information is missing or invalid
      security:
        - bearer: []
components:
  parameters:
    fields:
      name: fields
      in: query
      description: Comma seperated list of fields you wish to return
      schema:
        type: string
      example: id,name
    page:
      name: page
      in: query
      description: Specify the page of results you wish to return
      schema:
        type: integer
    limit:
      name: limit
      in: query
      description: The number of results returned per page. Default if not specified is 10
      schema:
        type: integer
    order_asc:
      name: order_asc
      in: query
      description: >-
        Specify the field (with type of string or integer) you wish to order
        (ascending) the response with
      schema:
        type: string
    order_desc:
      name: order_desc
      in: query
      description: >-
        Specify the field (with type of string or integer) you wish to order
        (descending) the response with
      schema:
        type: string
    filter_operator:
      name: filter_operator
      in: query
      description: Specify if multiple filters should be combined with OR or AND logic
      schema:
        type: string
        default: OR
        enum:
          - OR
          - AND
  schemas:
    TimeEntry:
      title: Time Entry Model
      description: Stores time entries on bookings and projects
      type: object
      allOf:
        - properties:
            id:
              description: Automatically generated, unique time entry id
              type: integer
              readOnly: true
              example: 9879871
            owner_id:
              description: ID of the user that owns this time entry
              type: integer
              example: 872383
            owner:
              description: User that owns this time entry
              properties:
                id:
                  type: integer
                  readOnly: true
                  example: 4
                first_name:
                  type: string
                  example: Jane
                last_name:
                  type: string
                  example: Smith
                primary_email:
                  type: string
                  example: jane.smith@example.com
                icon:
                  description: Icon / Avatar of the user
                  properties:
                    id:
                      description: Unique ID of the file related to the icon
                      type: integer
                      example: 2390323
                    name:
                      description: Name of the file
                      type: string
                      example: SCR-20250220-jnua
                    alias:
                      description: Unique String alias of the file
                      type: string
                      example: >-
                        030fb130bdf3c6cd5fa533fabb26fc9d90b66542cd343a318b2bfe5474923f90
                    extension:
                      description: File extension of the original uploaded file
                      type: string
                      example: jpeg
                    mime_type:
                      description: Detected mime type of the original uploaded file
                      type: string
                      example: image/jpeg
                  type: object
              type: object
            name:
              description: Name of the activity that is being worked on
              type: string
              example: Colour Grading
            description:
              description: Short description or notes about what was worked on
              type: string
              example: Opening scenes completed
            start:
              description: Unix Time Entry Start
              type: integer
              example: 1547501100
            end:
              description: Unix Time Entry End
              type: integer
              example: 1547538900
            start_date_time_iso:
              description: ISO-8601 formatted result of the time entry start
              type: string
              example: '2022-02-22T09:00:00+11:00'
            end_date_time_iso:
              description: ISO-8601 formatted result of the time entry end
              type: string
              example: '2022-02-22T17:00:00+11:00'
            duration_sec:
              description: Duration of time entry in seconds
              type: integer
              readOnly: true
              example: '3600'
            project:
              type: array
              items:
                $ref: '#/components/schemas/ProjectSummary'
            booking:
              type: array
              items:
                $ref: '#/components/schemas/BookingSummary'
            billable:
              description: Is the time tracked billable?
              type: boolean
              example: 'false'
            locked:
              description: Is this time entry locked for further changes?
              type: boolean
              example: 'false'
          type: object
        - $ref: '#/components/schemas/commonModelMeta'
    pagination:
      title: Pagination Meta Model
      properties:
        pagination:
          $ref: '#/components/schemas/meta'
      type: object
    ProjectSummary:
      title: Project Summary Model
      description: Simplified project model containing only a subset of fields
      properties:
        id:
          description: Automatically generated Project ID
          type: integer
          example: 2342354
        name:
          description: Title of the project
          type: string
          readOnly: true
          example: Andor S1 EP7 Annoucement
        code:
          description: Short code used to identify the project
          type: string
          readOnly: true
          example: AND-S1-EP7
        description:
          description: A short description or synopsis of the project
          type: string
          readOnly: true
          example: >-
            Colonel Yularen announces that the ISB has gained more surveillance
            and punitive authority, while Meero is challenged by Blevin for
            breaking protocol by accessing Imperial data without authorization.
        start:
          description: Unix Timestamp of the project start time frame.
          type: integer
          example: 1547501100
        end:
          description: Unix timestamp of the project end time frame.
          type: integer
          example: 1547538900
        parent_id:
          description: Project Parent ID
          type: integer
          readOnly: true
          example: 9348
        status_id:
          description: Project Status ID
          type: integer
          readOnly: true
          example: 1
      type: object
    BookingSummary:
      title: Booking Summary Model
      description: Standrd booking model summarised
      properties:
        id:
          description: Booking ID
          type: integer
          example: 1
        name:
          description: Booking Name
          type: string
          example: Test Booking
        start:
          description: Unix Booking Start
          type: integer
          example: 1547501100
        end:
          description: Unix Booking End
          type: integer
          example: 1547538900
        resources:
          type: array
          items:
            $ref: '#/components/schemas/TimeEntryBookingResource'
      type: object
    commonModelMeta:
      title: Common Meta Model
      properties:
        created_id:
          description: The unique ID of the person (user) who created this record
          type: integer
          readOnly: true
          example: 3
        created:
          description: The UNIX time value of the creation time
          type: integer
          readOnly: true
          example: 1388552400
        updated_id:
          description: The unique ID of the person (user) who last updated this record
          type: integer
          readOnly: true
          example: 3
        updated:
          description: The UNIX time value of the last update
          type: integer
          readOnly: true
          example: 1388552400
      type: object
    meta:
      title: Page Meta Model
      properties:
        total:
          type: integer
          example: 1
        count:
          type: integer
          example: 1
        per_page:
          type: integer
          example: 1
        current_page:
          type: integer
          example: 1
      type: object
    TimeEntryBookingResource:
      title: Time Entry Booking Resource Model
      description: Resources added to a booking, within a Time Entry
      properties:
        id:
          description: Automatically generated unique resource id
          type: integer
          example: 9458
        name:
          description: Name of the resource
          type: string
          readOnly: true
          example: Edit Suite 1
      type: object
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````