---
title: "Creates link between two Work Orders"
method: PUT
path: "/workorders/{workorderId}/link"
tags: ["WorkOrders"]
---

# Creates link between two Work Orders

`PUT /workorders/{workorderId}/link`

## Request

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

Current Work Order marked as a parent, linking Work Order marked as follow Up. If you set 'workorderIdToLink' parameter then 'WorkorderIds' parameter of requested body will be ignored.  
  
Available for provider and subscriber usage.

## Path parameters

- `workorderId` integer, required

## Query parameters

- `workorderIdToLink` integer

## Request body

- ServiceChannelServicesMessagingWorkordersLinkWorkordersRequest: Link Workorders Request
  - `WorkorderIds` integer[]: Array of Workorder Ids to link
  - `UnlinkLinkedWorkorders` boolean: Unlink linked Workorders if true

## Response `204`

Indicates that the request succeeded

## Other responses

- `400`: Bad Request - the request could not be understood or was missing required parameters.<br/>Error codes:<br/> 917 - Wrong Parent Work Order Id;<br> 932 - Wrong Linked Work Order Id;<br> 601 - Location doesn't match
- `401`: Indicates that the requested resource requires authentication.<br>Error codes:<br> 504 - API call rejected by security permissions;

---

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