---
title: "Get Customer Context"
method: GET
path: "/api/messages/customer-context/{customer_email}"
tags: ["Messages"]
---

# Get Customer Context

`GET /api/messages/customer-context/{customer_email}`

## 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/messages/customer-context/{customer_email}`
- Auth: none declared. Required headers: `authorization`

お客様カルテ + 過去メッセージを 1 本で返す (明細書作成のサイドパネル用).

2026-05-24: 生成メッセージの良し悪しを「お客様の文脈を見ながら」判断・編集できる
サイドパネルのためのエンドポイント。get_customer_card (注文回数/最終注文/累計/
平均間隔/購入履歴) と過去メッセージ(feedback付き)を 1 リクエストで返す。

カルテは「今回の注文も含めた通算」を見せたいので exclude_order_id は使わず
全注文で集計する (除外すると 2回目なのに『1回』『累計が今回分だけ少ない』等の
誤表示になる。2026-05-24 sho 指摘で修正)。exclude_order_id 引数は後方互換で残置。

## Path parameters

- `customer_email` string, required

## Query parameters

- `exclude_order_id` string, nullable

## Headers

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

## 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)
