---
title: "Retrieve Service Task"
method: GET
path: "/service_tasks/{id}"
tags: ["Service Tasks"]
---

# Retrieve Service Task

`GET /service_tasks/{id}`

## Request

- Base URL: `https://secure.fleetio.com/api`
- URL: `https://secure.fleetio.com/api/service_tasks/{id}`
- Auth: API key in header `Authorization` and API key in header `Account-Token`
- TypeScript: <https://skmtc.dev/fleetio/apis/fleetio-developer-api/docs/service_tasks/:id/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve the details of an existing Service Task.

## Path parameters

- `id` string, required

## Query parameters

- `expand` object
  - `service_task_parts` string

## Response `200`

OK

- ServiceTask, nullable: A Service Task
  - `id` integer, required
  - `created_at` string, date-time: The date and time at which this record was created.
  - `updated_at` string, date-time: The date and time at which this record was most recently updated.
  - `name` string, required: A name for this Service Task.
  - `description` string, nullable, required: A description of this Service Task.
  - `expected_duration_in_seconds` integer, nullable: The expected duration in seconds this Service Task should take to complete.
  - `archived_at` string, date-time, nullable: The date and time at which this Service Task was archived. `null` if this Service Task is active.
  - `subtasks` object[], required
    - `id` integer, required
    - `created_at` string, date-time: The date and time at which this record was created.
    - `updated_at` string, date-time: The date and time at which this record was most recently updated.
    - `name` string: The name of this subtask.
    - `description` string, nullable: A description of this subtask.
    - `expected_duration_in_seconds` integer, nullable: The expected duration in seconds this subtask should take to complete.
    - `subtasks` unknown[]: The subtasks array at this level will always be empty.
      - unknown
    - `default_vmrs_reason_for_repair` object, nullable
      - `account_id` integer
      - `alias` string, nullable
      - `code` string, nullable
      - `enabled` boolean
      - `id` integer
      - `name` string
      - `repair_type` string, nullable
      - `standard` boolean
      - `standard_name` string, nullable
      - `type` string
      - `vmrs_standard_reason_for_repair` object, nullable
    - `default_vmrs_system_group` object, nullable
      - `account_id` number, nullable
      - `assembly_code` string, nullable
      - `assembly_name` string, nullable
      - `code_type` 'system_group' | 'system' | 'assembly' | 'component'
      - `component_code` string, nullable
      - `component_name` string, nullable
      - `enabled` boolean
      - `id` integer
      - `permissions` object, nullable
        - `destroy` boolean
      - `standard` boolean
      - `system_code` string, nullable
      - `system_group` string, nullable
      - `system_group_code` string, nullable
      - `system_name` string, nullable
      - `type` string
      - `vmrs_standard_system_assembly_component` object, nullable
    - `default_vmrs_system` object, nullable
      - `account_id` number, nullable
      - `assembly_code` string, nullable
      - `assembly_name` string, nullable
      - `code_type` 'system_group' | 'system' | 'assembly' | 'component'
      - `component_code` string, nullable
      - `component_name` string, nullable
      - `enabled` boolean
      - `id` integer
      - `permissions` object, nullable
        - `destroy` boolean
      - `standard` boolean
      - `system_code` string, nullable
      - `system_group` string, nullable
      - `system_group_code` string, nullable
      - `system_name` string, nullable
      - `type` string
      - `vmrs_standard_system_assembly_component` object, nullable
    - `default_vmrs_assembly` object, nullable
      - `account_id` number, nullable
      - `assembly_code` string, nullable
      - `assembly_name` string, nullable
      - `code_type` 'system_group' | 'system' | 'assembly' | 'component'
      - `component_code` string, nullable
      - `component_name` string, nullable
      - `enabled` boolean
      - `id` integer
      - `permissions` object, nullable
        - `destroy` boolean
      - `standard` boolean
      - `system_code` string, nullable
      - `system_group` string, nullable
      - `system_group_code` string, nullable
      - `system_name` string, nullable
      - `type` string
      - `vmrs_standard_system_assembly_component` object, nullable
    - `default_vmrs_component` object, nullable
      - `account_id` number, nullable
      - `assembly_code` string, nullable
      - `assembly_name` string, nullable
      - `code_type` 'system_group' | 'system' | 'assembly' | 'component'
      - `component_code` string, nullable
      - `component_name` string, nullable
      - `enabled` boolean
      - `id` integer
      - `permissions` object, nullable
        - `destroy` boolean
      - `standard` boolean
      - `system_code` string, nullable
      - `system_group` string, nullable
      - `system_group_code` string, nullable
      - `system_name` string, nullable
      - `type` string
      - `vmrs_standard_system_assembly_component` object, nullable
  - `usage` integer: Indicates the number of times this Service Task has been used. Available by setting the `include_usage` query parameter to `1`.
  - `default_vmrs_reason_for_repair` object, nullable, required
    - `account_id` integer
    - `alias` string, nullable
    - `code` string, nullable
    - `enabled` boolean
    - `id` integer
    - `name` string
    - `repair_type` string, nullable
    - `standard` boolean
    - `standard_name` string, nullable
    - `type` string
    - `vmrs_standard_reason_for_repair` object, nullable
  - `default_vmrs_system_group` object, nullable, required
    - `account_id` number, nullable
    - `assembly_code` string, nullable
    - `assembly_name` string, nullable
    - `code_type` 'system_group' | 'system' | 'assembly' | 'component'
    - `component_code` string, nullable
    - `component_name` string, nullable
    - `enabled` boolean
    - `id` integer
    - `permissions` object, nullable
      - `destroy` boolean
    - `standard` boolean
    - `system_code` string, nullable
    - `system_group` string, nullable
    - `system_group_code` string, nullable
    - `system_name` string, nullable
    - `type` string
    - `vmrs_standard_system_assembly_component` object, nullable
  - `default_vmrs_system` object, nullable, required
    - `account_id` number, nullable
    - `assembly_code` string, nullable
    - `assembly_name` string, nullable
    - `code_type` 'system_group' | 'system' | 'assembly' | 'component'
    - `component_code` string, nullable
    - `component_name` string, nullable
    - `enabled` boolean
    - `id` integer
    - `permissions` object, nullable
      - `destroy` boolean
    - `standard` boolean
    - `system_code` string, nullable
    - `system_group` string, nullable
    - `system_group_code` string, nullable
    - `system_name` string, nullable
    - `type` string
    - `vmrs_standard_system_assembly_component` object, nullable
  - `default_vmrs_assembly` object, nullable, required
    - `account_id` number, nullable
    - `assembly_code` string, nullable
    - `assembly_name` string, nullable
    - `code_type` 'system_group' | 'system' | 'assembly' | 'component'
    - `component_code` string, nullable
    - `component_name` string, nullable
    - `enabled` boolean
    - `id` integer
    - `permissions` object, nullable
      - `destroy` boolean
    - `standard` boolean
    - `system_code` string, nullable
    - `system_group` string, nullable
    - `system_group_code` string, nullable
    - `system_name` string, nullable
    - `type` string
    - `vmrs_standard_system_assembly_component` object, nullable
  - `default_vmrs_component` object, nullable, required
    - `account_id` number, nullable
    - `assembly_code` string, nullable
    - `assembly_name` string, nullable
    - `code_type` 'system_group' | 'system' | 'assembly' | 'component'
    - `component_code` string, nullable
    - `component_name` string, nullable
    - `enabled` boolean
    - `id` integer
    - `permissions` object, nullable
      - `destroy` boolean
    - `standard` boolean
    - `system_code` string, nullable
    - `system_group` string, nullable
    - `system_group_code` string, nullable
    - `system_name` string, nullable
    - `type` string
    - `vmrs_standard_system_assembly_component` object, nullable
  - `service_task_parts` object[]: Any `Parts` associated with this Service Task. Available by setting the `expand[]` query parameter to `service_task_parts`.
    - `id` integer
    - `quantity` number, float: The quantity of this `Part` related to the Service Task.
    - `part_id` integer: The ID of this `Part` related to the Service Task.
    - `part_archived_at` string, date-time, nullable: The date and time at which the `Part` related to the Service Task was archived, if applicable.
    - `position` integer: The position of this `Part` in the list of Service Task Parts.

## Other responses

- `401`: Request could not be authenticated
- `403`: Insufficient permission to perform this operation
- `404`: The requested resource could not be located
- `500`: Something unexpected happened

---

[API](https://skmtc.dev/fleetio/apis/fleetio-developer-api.md) - [All operations](https://skmtc.dev/fleetio/apis/fleetio-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fleetio/apis/fleetio-developer-api/revisions/49558d744bd7?raw)
