---
title: "Add or update asset categories for a work order"
method: POST
path: "/resolutionCodes/{workOrderId}/assetCategories"
tags: ["ResolutionCodes"]
---

# Add or update asset categories for a work order

`POST /resolutionCodes/{workOrderId}/assetCategories`

## Request

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

Associates asset categories with the specified work order. Sending this request replaces the current asset categories.
            <br />Asset categories represent a standardized classification of asset types. You can add no more than 5 asset categories to a work order.
            <br />***Note:*** Only users who have access to asset categories can send this request.    
            <br />**Example Request**
            
               POST /resolutionCodes/{workOrderId}/assetCategories
               {
                 "AssetCategoryIds": [
                   1, 4, 6
                 ]
               }

## Path parameters

- `workOrderId` integer, required

## Request body

- ServiceChannelServicesWebApiModelsRequestResolutionCodesUpdateAssetCategoriesRequest: Request object to add asset categories to a work order.
  - `AssetCategoryIds` integer[]: IDs of asset categories to add to a work order.

## Response `200`

Asset categories 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: 4113 - You can specify up to 5 asset categories 4115 - You need to specify at least one asset category 4116 - Invalid asset category id
- `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: 4114 - You don't have access to asset categories
- `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)
