# com.paratus-ai.supplier.quote（見積依頼）

> 状態: ドラフト（0.1.0-draft）。公開規格として確定する前の内容で、今後の版で変わることがあります。

見積を依頼し、案件を作る。事業者の回答はメール、または案件の状態（GET /v1/cases/{id}）で返す。発注の確定（confirm-order）の委任状（mandate）は省略でき、省略したとき・検証できないとき・登録済みの来訪AIのときは 202 human_confirmation_required と確認リンク（confirmation_url）を返す。検収の確認（confirm-completion）は、発注の記録があり、事業者が完了を記録した案件だけで受け付ける（それ以外は validation_error。reason は order_required・completion_not_reported）。

- REST: `POST /v1/quotes`、`GET /v1/cases/{id}`
- MCP ツール: `request_quote`
- JSON Schema: https://paratus-ai.com/spec/supplier/0.1/quote.schema.json

## 応答の項目

| 項目 | 型 | 説明 |
|---|---|---|
| `case_id` | string |  |
| `status` | string（`pending`） |  |
| `expected_response_by` | string・null | 回答の目安の日時 |

## 要求の項目

| 項目 | 型 | 説明 |
|---|---|---|
| `organization_id` | string |  |
| `offering_id` | string |  |
| `location_id` | string |  |
| `parameters` | object | 依頼の条件（数量など） |
| `buyer` | object | 依頼主の連絡先 |
| `buyer.email` | string |  |
| `buyer.phone` | string |  |
| `buyer.external_ref` | string |  |
| `buyer.display_name` | string |  |
| `message` | string | 依頼の本文（5,000文字まで） |

## 案件の状態（`GET /v1/cases/{id}`）

JSON Schema: https://paratus-ai.com/spec/supplier/0.1/quote.schema.json#/$defs/case_status

| 項目 | 型 | 説明 |
|---|---|---|
| `case_id` | string |  |
| `reference_code` | string | 案件番号 |
| `status` | string（`awaiting_response`・`handed_off`・`responded`・`quoted`・`committed`・`trial_booked`・`completion_reported`・`completed`・`trial_attended`・`following`・`closed`・`cancellation_completed`・`cancellation_requested`・`switch_presented`） | 案件の状態。completion_reported は事業者が完了を記録した段階（買い手の検収待ち）、completed は買い手の検収確認または自動完了。handed_off・trial_booked・trial_attended・following・cancellation_requested・cancellation_completed・switch_presented は、もとになる出来事を本製品が記録しないため、現時点では発生しない |
| `expected_response_by` | string・null | 回答の目安の日時 |
| `events` | array | 案件の出来事（古い順。備考は返さない） |
| `events[].id` | string |  |
| `events[].code` | string | 出来事の種類（inquiry_received・quote_sent・order_confirmed など）。booking_handoff・booking_confirmed・enrollment_confirmed・trial_booked・trial_attended・follow_up_drafted・follow_up_sent・auto_completed・phone_answered・cancellation_requested・cancellation_completed・presented_as_switch は、現時点では発生しない |
| `events[].occurred_at` | string・null |  |
| `events[].basis` | string（`buyer_confirmed`・`self_reported`・`system`） | 記録の根拠 |
| `events[].actor_type` | string（`organization`・`buyer`・`agent`・`system`） |  |
| `events[].amount` | number・null | 金額（税抜） |
| `events[].currency` | string・null |  |
| `events[].due_date` | string・null | 納期 |
| `events[].quote_id` | string・null |  |
| `quote` | object・null | 送付済みの最新の見積（無ければ null） |
| `quote.version` | number・null | 版 |
| `quote.amount` | number・null | 小計（税抜） |
| `quote.tax` | number・null | 消費税 |
| `quote.total_incl_tax` | number・null | 合計（税込） |
| `quote.currency` | string |  |
| `quote.valid_until` | string・null | 有効期限 |
| `quote.lead_time_days` | number・null | 納期（ご発注からの日数） |
| `quote.lead_time_unit` | string（`calendar`・`business`） | 納期の日数の単位（calendar 暦日・business 営業日） |
| `quote.line_items` | 任意 | 明細 |
| `quote.labor_cost` | number・null | うち労務費 |
| `quote.quote_period_days` | number・null | 見積期間（日） |
| `quote.hash` | string | 照合用ハッシュ |
| `quote.sent_at` | string・null | 送付日時 |
| `messages` | array | 本製品から送った回答（依頼主のメールが無い案件の回答はここで渡す） |
| `messages[].id` | string |  |
| `messages[].channel` | string |  |
| `messages[].subject` | string・null |  |
| `messages[].body` | string・null | 本文（確認リンクは URL を差し込んで返す） |
| `messages[].sent_at` | string・null |  |
