---
title: "Get resolution codes and root causes for a work order"
method: GET
path: "/resolutionCodes/{workOrderId}"
tags: ["ResolutionCodes"]
---

# Get resolution codes and root causes for a work order

`GET /resolutionCodes/{workOrderId}`

## Request

- Base URL: `https://sb2api.servicechannel.com/v3`
- URL: `https://sb2api.servicechannel.com/v3/resolutionCodes/{workOrderId}`
- Auth: OAuth 2
  - Authorization code: `https://sb2login.servicechannel.com/oauth/authorize`
  - Token URL: `https://sb2login.servicechannel.com/oauth/token`
- TypeScript: <https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/docs/resolutionCodes/:workOrderId/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns resolution codes and root causes for the specified work order.
             • A **resolution code** is an action that a technician takes to resolve a problem upon working on a service request.
             • A **root cause** is a reason why the problem occurred to begin with.
            <br />Resolution codes and root causes are set up for specific trades and are standardized. If there are resolution codes and root causes configured for a work order trade, a technician is prompted to select these properties upon [checking out of a work order](https://servicechannel.atlassian.net/wiki/spaces/SCUCP/pages/622396960/Checking+In+and+Out+of+Work+Orders+Using+SC+Provider#CheckingInandOutofWorkOrdersUsingSCProvider-CheckingOutwithResolutionandRootCauseCodes) and moving it to the _Completed_ status in ServiceChannel Provider.

## Path parameters

- `workOrderId` integer, required

## Response `200`

Resolution codes and root causes for the specified work order are in the response.

- ServiceChannelServicesWebApiModelsResponseResolutionCodesWorkOrderResolutionInfoResponse: Object containing the details of resolution codes and root causes of a work order.
  - `resolutionCodes` ServiceChannelServicesWebApiModelsResponseResolutionCodesResolutionCodeInfoResponse[]: Resolution codes of a work order.
    - `Key` integer: Resolution code identifier.
    - `Value` string: Resolution code name.
    - `HasFreeText` boolean: Defines whether a user can enter a comment explaining their understanding of the resolution code and specifying what was done on site to solve the issue.
    - `Text` string: Comment that a technician enters to provide their understanding of the resolution code of a work order explaining what was done on site to solve the issue. Comments are enabled for resolution codes with the `HasFreeText` attribute.
    - `AssetCategoryId` integer: Asset category ID specified by a user with access to asset categories.
  - `rootCause` ServiceChannelServicesWebApiModelsResponseResolutionCodesRootCauseInfoResponse: Root cause object.
    - `Key` integer: Root cause identifier.
    - `Value` string: Root cause name.
    - `HasFreeText` boolean: Defines whether a user can enter a comment explaining their understanding of the root cause and specifying the reason why the problem occurred.
    - `Text` string: Comment that a technician enters to provide their understanding of the root cause of a work order explaining the reason why the problem occurred. Comments are enabled for root causes with the `HasFreeText` attribute.
    - `AssetCategoryId` integer: Asset category ID specified by a user with access to asset categories.
  - `rootCauses` ServiceChannelServicesWebApiModelsResponseResolutionCodesRootCauseInfoResponse[]: Root causes of a work order returned for users with access to asset categories.
    - `Key` integer: Root cause identifier.
    - `Value` string: Root cause name.
    - `HasFreeText` boolean: Defines whether a user can enter a comment explaining their understanding of the root cause and specifying the reason why the problem occurred.
    - `Text` string: Comment that a technician enters to provide their understanding of the root cause of a work order explaining the reason why the problem occurred. Comments are enabled for root causes with the `HasFreeText` attribute.
    - `AssetCategoryId` integer: Asset category ID specified by a user with access to asset categories.

## Other responses

- `401`: The request is not authorized. <br/>Error codes: 504 — API call rejected by security permissions
- `404`: The requested resource does not exist on the server. <br/>Error codes: 502 — Data not found
- `500`: The server was unable to complete the request due to an internal error.

---

[API](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3.md) - [All operations](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/llms.txt) - [OpenAPI document](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/revisions/d490d6596809?raw)
