---
title: "Retrieve work order parts usage"
method: GET
path: "/workorders/{workorderId}/partsUsage"
tags: ["Parts"]
---

# Retrieve work order parts usage

`GET /workorders/{workorderId}/partsUsage`

## Request

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

## Path parameters

- `workorderId` integer, required

## Response `200`

Indicates that the request succeeded.

- ServiceChannelServicesMessagingRefrigerantTrackingWorkOrderPartRefrigerantResponse[]
  - `Id` integer
  - `AssetId` integer
  - `TagId` string
  - `RecId` integer
  - `CertifiedTechnicianId` integer
  - `Quantity` number, double
  - `QuantityMetrics` number, double
  - `QuantityStr` string
  - `UnitCost` number, double
  - `IsRefrigerant` boolean
  - `IsInventoryPart` boolean
  - `InventorySource` string, byte
  - `UseDate` string, date-time
  - `ReasonCode` integer
  - `ReasonCodeId` integer
  - `PartNumber` string
  - `Description` string
  - `WOStatus` string
  - `ProblemType` string
  - `InventoryLocationId` integer
  - `InventoryLocationGuid` string: GUID of inventory part location
  - `InventoryLocationName` string
  - `InventoryPartId` integer
  - `PartName` string
  - `PartGroup` string
  - `SupplierName` string
  - `RefrigerantChargeOptionsId` integer
  - `RefrigerantChargeVendor` string
  - `ReasonCodeStr` string
  - `RefrigerantUsePurpose` integer
  - `RefrigerantTypeName` string
  - `RefrigerantTypeId` integer
  - `IsSupplierPart` boolean
  - `IsConnectorWOPart` boolean
  - `SubscriberTrackingNumber` integer
  - `SubscriberAssetId` integer
  - `CreatedByUserId` string
  - `ModifiedByUserId` string
  - `IsRetrofit` string, byte
  - `RefrigerantPartNumber` string
  - `InventoryLocations` ServiceChannelServicesMessagingInventoryInventoryLocation[]
    - `Id` integer
    - `LocationId` integer
    - `PartId` integer
    - `Qty` number, double
    - `UnitPrice` number, double
    - `LocationName` string
    - `StoreId` string
    - `LocationGuid` string
  - `SupplierPartId` string
  - `LeakRate` number, double
  - `RefrigerantSourceTypeId` integer

## Other responses

- `400`: Bad Request - the request could not be understood or was missing required parameters.<br>Error codes:<br>502 - WorkOrder not found;
- `401`: Indicates that the requested resource requires authentication.<br>Error codes:<br/> 504 - API call rejected by security permissions;
- `500`: Error while processing request.

---

[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)
