---
title: "Add or update resolution codes for a work order"
method: POST
path: "/resolutionCodes"
tags: ["ResolutionCodes"]
---

# Add or update resolution codes for a work order

`POST /resolutionCodes`

## Request

- Base URL: `https://sb2api.servicechannel.com/v3`
- URL: `https://sb2api.servicechannel.com/v3/resolutionCodes`
- 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/post.ts> (a function with typed inputs; its response is checked against the schema)

Associates resolution codes with the specified work order. If resolution codes are already added to a work order, you can change them by sending the request.
            <br />Learn [how providers can add or edit resolution codes](https://servicechannel.atlassian.net/wiki/spaces/SCUCP/pages/1688502858/Resolution+and+Root+Causes+Codes+in+Provider+Automation#ResolutionandRootCausesCodesinProviderAutomation-ProcessingRRCsProcessingResolutionandRootCauseCodes) in ServiceChannel University.
            <br />**Example Requests**
                
              OPTION 1:
                POST /resolutionCodes
                {
                   "WorkOrderId": 158716211,
                   "ResolutionCodeIds": [
                     2145, 2147
                 ],
                   "ResolutionCodes": []
                }
                
              OPTION 2:
                POST /resolutionCodes
                {
                   "WorkOrderId": 158716211,
                   "ResolutionCodeIds": [],
                   "ResolutionCodes": [
                    {
                     "Key": 2189,
                     "Text": "Repair wings",
                     "AssetCategoryId": 5
                    },
                    {
                     "Key": 2146,
                     "Text": "",
                     "AssetCategoryId": 2
                    }
                   ]
                }

## Request body

- ServiceChannelServicesWebApiModelsRequestResolutionCodesUpdateResolutionCodesRequest: Request object to add resolution codes to a work order.
  - `WorkOrderId` integer: Unique numeric identifier of the work order to add resolution codes to.
  - `ResolutionCodeIds` integer[]: IDs of resolution codes to add to the work order.
  - `ResolutionCodes` ServiceChannelServicesWebApiModelsRequestResolutionCodesResolutionCodeRequest[]: Details of resolution codes to add to the work order.
    - `Key` integer: ID of the resolution code to associate with the work order.
    - `Text` string: Comment explaining your understanding of the resolution code of the work order. Enabled for resolution codes with the `HasFreeText` attribute. The maximum length is 100 characters.
    - `AssetCategoryId` integer: Asset category ID to be passed by users with access to asset categories.

## Response `200`

Resolution codes are added to the specified work order.

## Other responses

- `400`: The request is not accepted due to bad syntax, missing parameters, insufficient data, etc. <br/>Error codes: 4100 — You can specify up to 3 resolution codes for a work order 4101 — You need to specify at least one resolution code 4108 — The max length of the resolution code text is exceeded 4109 — Resolution code text must be unique 4110 — Resolution code without free text must be unique 4122 — You need to specify up to 3 resolution codes per asset category for all asset categories assigned to the work order
- `401`: The request is not authorized. <br/>Error codes: 504 — API call rejected by security permissions
- `403`: You are not authorized to request this resource, or the resource is unavailable for some reason. <br/>Error codes: 4107 — You don't have access to set the resolution code text
- `404`: The requested resource does not exist on the server. <br/>Error codes: 502 — Data nor 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)
