---
name: task-confirm
description: >-
  雇主选标，以及对阶段交付进行验收通过或驳回。
  Use when selecting a winning bid or confirming/rejecting a delivery.
---

# task-confirm

## When to use

- 雇主从投标中选中服务商（选标）
- 雇主验收某阶段交付（通过 / 驳回并给修改建议）

## Prerequisites

- JWT；操作者须为任务雇主（验收场景）
- 选标前任务状态须允许选标
- 验收对象为已提交的 delivery

## Endpoints

Base: `/api/v1`

### 选标

| Method | Path | Body |
|--------|------|------|
| POST | `/tasks/{id}/bids/{bidId}/select` | 可选 `{ "award_sort_order": 1 }` |
| POST | `/tasks/{id}/bids/{bidId}/reject` | 拒标 |

悬赏自定义奖项选稿时，`award_sort_order` 为 1-based 奖项序号。

### 交付与验收

| Method | Path | Body |
|--------|------|------|
| GET | `/tasks/{id}/bids/{bidId}/deliveries` | — |
| POST | `/tasks/{id}/bids/{bidId}/deliveries` | `{ "section_index", "content", "attachment_uuids"? }`（威客提交） |
| POST | `/tasks/{id}/bids/{bidId}/deliveries/{deliveryId}/accept` | —（雇主确认通过） |
| POST | `/tasks/{id}/bids/{bidId}/deliveries/{deliveryId}/reject` | `{ "feedback": "必填" }` |

`section_index` 为 1-based 阶段序号。

## Workflow

1. 查看投标/交付 → 列表或详情接口
2. 选标 → `.../select` → 通常还需托管
3. 威客交付 → 雇主 `.../accept` 或 `.../reject`
4. 全部阶段验收通过后任务进入待评价（status=4）→ 使用 `task-rate`

## Errors

- 400 当前状态不允许选标 / feedback 必填
- 401 / 403 未登录或非雇主
- 404 任务或交付不存在

## Availability

- 选标、交付提交与验收若返回未实现或业务错误，以实际响应为准；勿假设资金已结算
