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

# Get shift

> Read a shift's times, breaks, task work, and recorded locations.

## Task work

Task time uses the worker assigned while a task was In progress. Offline actions use the time they happened.

| Field | Meaning |
| - | - |
| `task_events` | Recorded task work starts and stops. |
| `allocations` | Working time attributed to each task and property. |
| `overlap_secs` | Working time when multiple tasks were active. |
| `unallocated_secs` | Working time with no recorded task work. |

Allocations exclude breaks and overlapping task time. Allocated seconds, `overlap_secs`, and `unallocated_secs` add up to `working_secs`.

An allocation's start and end can span excluded time. Use its `duration_secs` for the allocated total.

`listing_ref` is the Conduit property ID. `listing_id` is the PMS ID and may repeat across PMS accounts.

## Locations and stops

`first_recorded_location` and `last_recorded_location` are the earliest and latest GPS samples during working time. They may be null. Their timestamps may differ from clock-in and clock-out.

Stops are recorded stays of at least 90 seconds. A nearby property is matched within 50 meters. `gaps` marks missing GPS coverage, which is excluded from stop duration. GPS does not determine working time.

## Using shift history

Names and labels reflect current data. Save approved payroll exports in your payroll system.

Very large histories return an error instead of partial task allocations.


## OpenAPI

````yaml GET /v1/shifts/{shift_id}
openapi: 3.0.0
info:
  title: Conduit API
  version: 1.0.0
  description: Public API for Conduit.
servers:
  - url: https://api.conduit.ai
    description: Production
security: []
tags:
  - name: meta
    description: Discovery and API metadata endpoints.
  - name: agents
    description: >-
      Chat agent configuration, including instructions, skills, triggers, and
      automation behavior.
  - name: contacts
    description: >-
      Contact profile and contact-scoped related resources such as tickets and
      calls.
  - name: workspaces
    description: Workspaces accessible to the current API token.
  - name: escalations
    description: >-
      Chat escalations that require operator review, including message, proposed
      response, and disposition context when available.
  - name: conversations
    description: >-
      Canonical message threads. Use these endpoints to list threads, inspect
      conversation state, read transcripts, and send replies.
  - name: conversation-tags
    description: >-
      Conversation labels, root topics, and subtopics used for classification
      and topic analytics.
  - name: tickets
    description: >-
      Operational queue items tied to conversations, including ticket-scoped
      transcripts and replies.
  - name: calls
    description: Phone call records, transcripts, summaries, and recordings when available.
  - name: reservations
    description: >-
      PMS reservations synced from the workspace's integrations (Hostaway,
      Guesty, Airbnb, etc.), including guest identity, payment status, and stay
      dates.
  - name: appointments
    description: >-
      Scheduled appointments (bookings) backed by the Conduit booking service.
      Exposes allocation context and the upstream booking-service `external_id`.
  - name: helpdesk_tickets
    description: >-
      Helpdesk tickets mirrored from external helpdesk integrations (Zendesk,
      Pylon, Plain), including requester identity and upstream metadata.
  - name: kb
    description: >-
      Knowledge base search and node management. Nodes represent knowledge base
      entries (files or directories), chunks are the indexed retrieval units
      used by search.
  - name: skills
    description: >-
      Workspace agent skills that can be attached to chat agents.
      Sidebar/global-assistant skills are intentionally excluded.
  - name: custom_tools
    description: >-
      Custom code tools: user-authored Python/JavaScript functions executed in a
      sandbox when an agent calls them. Includes a runtimes endpoint describing
      the entrypoint signature, return shape, and available dependencies per
      language.
  - name: inbox_types
    description: >-
      Workspace inbox types. Each id is stable and usable as a message trigger's
      `inbox_type_id` and as the `inbox_type_id` filter on list conversations.
  - name: workflows
    description: >-
      Workspace automation workflows: definitions, executions, and per-execution
      event timelines.
  - name: insights
    description: Aggregated workspace analytics, such as conversation automation rate.
paths:
  /v1/shifts/{shift_id}:
    get:
      tags:
        - operations
      summary: Get Shift
      description: >-
        Get shift times, breaks, GPS, task work and stops. Allocations exclude
        breaks and overlaps; stops exclude GPS gaps. Labels are current; save
        approved payroll exports separately.
      operationId: shiftGet
      parameters:
        - schema:
            type: string
            description: Shift id from shift_list
          required: true
          description: Shift id from shift_list
          name: shift_id
          in: path
        - schema:
            type: string
            description: Workspace identifier from `list_workspaces`
          required: true
          description: Workspace identifier from `list_workspaces`
          name: workspace_id
          in: query
      responses:
        '200':
          description: Get Shift
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      worker:
                        type: object
                        properties:
                          member_id:
                            anyOf:
                              - type: string
                              - nullable: true
                              - nullable: true
                          name:
                            type: string
                        required:
                          - member_id
                          - name
                      status:
                        anyOf:
                          - type: string
                            enum:
                              - open
                          - type: string
                            enum:
                              - paused
                          - type: string
                            enum:
                              - ended
                      timezone:
                        type: string
                      clock_in_at:
                        type: string
                      clock_out_at:
                        anyOf:
                          - type: string
                          - nullable: true
                          - nullable: true
                      breaks:
                        type: array
                        items:
                          type: object
                          properties:
                            start_at:
                              type: string
                            end_at:
                              anyOf:
                                - type: string
                                - nullable: true
                                - nullable: true
                            duration_secs:
                              type: number
                          required:
                            - start_at
                            - end_at
                            - duration_secs
                      duration_secs:
                        type: number
                      break_secs:
                        type: number
                      working_secs:
                        type: number
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      first_recorded_location:
                        anyOf:
                          - type: object
                            properties:
                              latitude:
                                type: number
                              longitude:
                                type: number
                              accuracy_m:
                                anyOf:
                                  - type: number
                                  - nullable: true
                                  - nullable: true
                              battery_percent:
                                anyOf:
                                  - type: number
                                  - nullable: true
                                  - nullable: true
                              recorded_at:
                                type: string
                            required:
                              - latitude
                              - longitude
                              - accuracy_m
                              - battery_percent
                              - recorded_at
                          - nullable: true
                          - nullable: true
                      last_recorded_location:
                        anyOf:
                          - type: object
                            properties:
                              latitude:
                                type: number
                              longitude:
                                type: number
                              accuracy_m:
                                anyOf:
                                  - type: number
                                  - nullable: true
                                  - nullable: true
                              battery_percent:
                                anyOf:
                                  - type: number
                                  - nullable: true
                                  - nullable: true
                              recorded_at:
                                type: string
                            required:
                              - latitude
                              - longitude
                              - accuracy_m
                              - battery_percent
                              - recorded_at
                          - nullable: true
                          - nullable: true
                      allocation_basis:
                        type: string
                        enum:
                          - recorded_task_assignments
                      overlap_secs:
                        type: number
                      unallocated_secs:
                        type: number
                      task_events:
                        type: array
                        items:
                          type: object
                          properties:
                            at:
                              type: string
                            kind:
                              anyOf:
                                - type: string
                                  enum:
                                    - started
                                - type: string
                                  enum:
                                    - stopped
                            task_id:
                              type: string
                            task_title:
                              type: string
                            listing_id:
                              anyOf:
                                - type: string
                                - nullable: true
                                - nullable: true
                            status:
                              anyOf:
                                - type: object
                                  properties:
                                    id:
                                      type: string
                                    name:
                                      type: string
                                    category:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - upcoming
                                        - type: string
                                          enum:
                                            - in_progress
                                        - type: string
                                          enum:
                                            - paused
                                        - type: string
                                          enum:
                                            - review
                                        - type: string
                                          enum:
                                            - completed
                                        - type: string
                                          enum:
                                            - canceled
                                        - type: string
                                          enum:
                                            - other
                                        - type: string
                                          enum:
                                            - needs_approval
                                  required:
                                    - id
                                    - name
                                    - category
                                - nullable: true
                                - nullable: true
                          required:
                            - at
                            - kind
                            - task_id
                            - task_title
                            - listing_id
                            - status
                      allocations:
                        type: array
                        items:
                          type: object
                          properties:
                            task_id:
                              type: string
                            listing_id:
                              anyOf:
                                - type: string
                                - nullable: true
                                - nullable: true
                            listing_ref:
                              anyOf:
                                - type: string
                                - nullable: true
                                - nullable: true
                            start_at:
                              type: string
                            end_at:
                              anyOf:
                                - type: string
                                - nullable: true
                                - nullable: true
                            duration_secs:
                              type: number
                          required:
                            - task_id
                            - listing_id
                            - listing_ref
                            - start_at
                            - end_at
                            - duration_secs
                      stops:
                        type: array
                        items:
                          type: object
                          properties:
                            number:
                              type: number
                            arrived_at:
                              type: string
                            left_at:
                              type: string
                            duration_secs:
                              type: number
                            latitude:
                              type: number
                            longitude:
                              type: number
                            gaps:
                              type: array
                              items:
                                type: object
                                properties:
                                  start_at:
                                    type: string
                                  end_at:
                                    type: string
                                required:
                                  - start_at
                                  - end_at
                            listing:
                              anyOf:
                                - type: object
                                  properties:
                                    listing_id:
                                      type: string
                                    name:
                                      type: string
                                    address:
                                      type: string
                                  required:
                                    - listing_id
                                    - name
                                    - address
                                - nullable: true
                                - nullable: true
                          required:
                            - number
                            - arrived_at
                            - left_at
                            - duration_secs
                            - latitude
                            - longitude
                            - gaps
                            - listing
                    required:
                      - id
                      - worker
                      - status
                      - timezone
                      - clock_in_at
                      - clock_out_at
                      - breaks
                      - duration_secs
                      - break_secs
                      - working_secs
                      - created_at
                      - updated_at
                      - first_recorded_location
                      - last_recorded_location
                      - allocation_basis
                      - overlap_secs
                      - unallocated_secs
                      - task_events
                      - allocations
                      - stops
                required:
                  - data
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: Standard error response.
                example:
                  error: Invalid workspace id
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: Standard error response.
                example:
                  error: Invalid workspace id
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: Standard error response.
                example:
                  error: Invalid workspace id
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: Standard error response.
                example:
                  error: Invalid workspace id
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: Standard error response.
                example:
                  error: Invalid workspace id
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: Standard error response.
                example:
                  error: Invalid workspace id
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Token
      description: >-
        Conduit API token. Use `Authorization: Bearer <token>`. Read/write
        endpoints require a token with write access.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.