---
title: "Regenerate From History"
method: POST
path: "/api/pdf/regenerate-from-history"
tags: ["PDF"]
---

# Regenerate From History

`POST /api/pdf/regenerate-from-history`

## Request

- Base URL: `https://api.soeru.biz` (the document declares no server; this is the origin it was published from)
- URL: `https://api.soeru.biz/api/pdf/regenerate-from-history`
- Auth: none declared. Required headers: `authorization`

Re-generate a PDF from a saved message in history.

Looks up the message text from message_history and the order details
from order_history.order_data JSONB. No AI API call needed.

## Headers

- `x-shop-id` string, nullable: Optional shop ID
- `authorization` string, required: Bearer <token>

## Request body

- RegenerateFromHistoryRequest: Request to re-generate PDF from message history. output_mode は Literal["full_slip"] のみ許容 (2026-04-22 メッセージカード廃止)。 order_data に items / delivery が欠けているレガシー注文については、 backend が内部的に generate_batch_pdf (カード PDF) にフォールバックするが、 UI からは選択不可。
  - `message_id` string, required
  - `output_mode` 'full_slip'

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/soeru/apis/soeru-api.md) · [All operations](https://skmtc.dev/soeru/apis/soeru-api/llms.txt) · [OpenAPI document](https://skmtc.dev/soeru/apis/soeru-api/revisions/63f8d371abed?raw)
