---
title: "Delete operation unit by external code"
method: DELETE
path: "/os/v1/operation-units/external/{externalCode}"
tags: ["Operation Unit", "Operation Unit"]
---

# Delete operation unit by external code

`DELETE /os/v1/operation-units/external/{externalCode}`

Deletes an operation unit by its external code.

An operation unit cannot be deleted if it has active relationships with position(s) or child operation units.

## Path parameters

- `externalCode` string, required

## Response `200`

The Operation Unit has been successfully deleted (HTTP 200; handler returns no payload).

## Other responses

- `401` — Unauthorized - Invalid or missing token
- `404` — Not Found - Operation unit not found
- `422` — Unprocessable Entity - Operation unit has active dependencies
- `500` — Internal Server Error - Unexpected failure

---

[API](https://skmtc.net/gupy/apis/gupy-public-api.md) · [All operations](https://skmtc.net/gupy/apis/gupy-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gupy/gupy-public-api/revisions/3f26defa2a42/schema)
