# Finish one routing operation; advance to the next op and complete the order when all ops are done (/docs/api-reference/production-orders/ProductionOrdersController_finishOp)

`POST /api/factories/{factoryId}/production-orders/{id}/sub-orders/{subId}/finish`

Base URL: https://api.xentr.ai

Authentication: bearer token (`Authorization: Bearer <token>`).

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `factoryId` | path | yes | string | Factory ID |
| `id` | path | yes | string | Production Order ID |
| `subId` | path | yes | string | Sub-order (operation) ID |

## Responses

### 200: Operation finished

### 400: Operation is not running

### 409: Operation changed since loaded