soeru Orders API
The Orders API from soeru — 8 operation(s) for orders.
The Orders API from soeru — 8 operation(s) for orders.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/soeru-biz:soeru-biz-orders-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: soeru Orders API
description: AIパーソナライズ明細書メッセージ自動生成SaaS
version: 0.1.0
tags:
- name: Orders
paths:
/api/orders:
get:
tags:
- Orders
summary: Get Orders
description: 'Fetch orders from the shop''s EC platform via the appropriate adapter.
Rate limit: 20 requests per minute per user.'
operationId: get_orders_api_orders_get
parameters:
- name: date_from
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Start date YYYY-MM-DD
title: Date From
description: Start date YYYY-MM-DD
- name: date_to
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: End date YYYY-MM-DD
title: Date To
description: End date YYYY-MM-DD
- name: date
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Single date YYYY-MM-DD (legacy)
title: Date
description: Single date YYYY-MM-DD (legacy)
- name: x-shop-id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional shop ID
title: X-Shop-Id
description: Optional shop ID
- name: authorization
in: header
required: true
schema:
type: string
description: Bearer <token>
title: Authorization
description: Bearer <token>
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/orders/message-status:
post:
tags:
- Orders
summary: Get Message Status
description: '選択注文のメッセージ状況を軽量に返す (ライブ取得なし, 2026-06-23 B)。
AI が MCP の save_message でメッセージを書き戻したら、出荷キューが自動で表示
更新するためのポーリング用。message_history だけを引くので速い。
Returns: {"messages": {order_id: {message_status, message_id?, message_text?,
message_confirmed_at?, pdf_generated?}}}
2026-07-01: 認証を optional 化。出荷キューは本 endpoint を 6 秒間隔で
ポーリングするため、セッション切れのタブが Authorization ヘッダ無しで叩き
続けると、required 認証依存だと FastAPI が 422 を無限に量産してログを汚す
(実害はないが本番ログが埋まる)。未認証/無効トークンは 422 を出さず空
{"messages": {}} を返して黙らせる。データは一切返さないので情報漏れは無い。
2026-07-02 hardening:
- `request: Request` を明示: get_current_user の A17 stack-walk IP throttle
(middleware/auth.py) がフレームから Request を見つけて不正トークン連打を
レート制限できるようにする (無いと throttle が silent skip になる)。
- 空を返すのは「想定内の認証失敗 (400/401/403/429)」のみに限定。DB 障害など
それ以外の例外は silent fallback にせず logger.warning + re-raise で表面化
させる ([[feedback_silent_fallback_visibility]])。'
operationId: get_message_status_api_orders_message_status_post
parameters:
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
- name: x-shop-id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Shop-Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/MessageStatusRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/orders/test-connection:
post:
tags:
- Orders
summary: Test Connection
description: Test platform API connection with provided credentials.
operationId: test_connection_api_orders_test_connection_post
parameters:
- name: authorization
in: header
required: true
schema:
type: string
description: Bearer <token>
title: Authorization
description: Bearer <token>
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TestConnectionRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/orders/sync-history:
post:
tags:
- Orders
summary: Sync Order History
description: 'Sync historical orders to build order_history table.
Fetches all orders from the past N months and saves them to the
order_history table for accurate repeat-customer counting.
Uses platform-specific maximum periods when months_back is 0 or omitted.'
operationId: sync_order_history_api_orders_sync_history_post
parameters:
- name: x-shop-id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional shop ID
title: X-Shop-Id
description: Optional shop ID
- name: authorization
in: header
required: true
schema:
type: string
description: Bearer <token>
title: Authorization
description: Bearer <token>
requestBody:
content:
application/json:
schema:
anyOf:
- $ref: '#/components/schemas/SyncHistoryRequest'
- type: 'null'
title: Body
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/orders/resync-now:
post:
tags:
- Orders
summary: Resync Now
description: '全期間 再同期をバックグラウンドで開始する (2026-05-31 項目1b).
/sync-history は同期完了まで HTTP を握り続けるため、楽天 24ヶ月フル再同期の
ように重い処理だと途中でクライアント / プロキシ側が切れて中断する恐れがある。
こちらは fire_order_history_resync で background task として走らせ、即座に
return する。完了 (または一部失敗) は右上のベルで通知される。
内部で credential 検証 / フル再同期 / 穴の自己修復 / 完了通知まで行うため、
このエンドポイントは task を起動するだけ。'
operationId: resync_now_api_orders_resync_now_post
parameters:
- name: x-shop-id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional shop ID
title: X-Shop-Id
description: Optional shop ID
- name: authorization
in: header
required: true
schema:
type: string
description: Bearer <token>
title: Authorization
description: Bearer <token>
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/orders/sync-limits:
get:
tags:
- Orders
summary: Get Sync Limits
description: Return platform-specific sync limits for the current shop.
operationId: get_sync_limits_api_orders_sync_limits_get
parameters:
- name: x-shop-id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional shop ID
title: X-Shop-Id
description: Optional shop ID
- name: authorization
in: header
required: true
schema:
type: string
description: Bearer <token>
title: Authorization
description: Bearer <token>
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/orders/history-stats:
get:
tags:
- Orders
summary: Get History Stats
description: Get statistics about the order_history table for this shop.
operationId: get_history_stats_api_orders_history_stats_get
parameters:
- name: x-shop-id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional shop ID
title: X-Shop-Id
description: Optional shop ID
- name: authorization
in: header
required: true
schema:
type: string
description: Bearer <token>
title: Authorization
description: Bearer <token>
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/orders/import-csv:
post:
tags:
- Orders
summary: Import Csv Orders
description: Import orders from a CSV/TSV file (Amazon, 楽天, Yahoo, etc.).
operationId: import_csv_orders_api_orders_import_csv_post
parameters:
- name: x-shop-id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional shop ID
title: X-Shop-Id
description: Optional shop ID
- name: authorization
in: header
required: true
schema:
type: string
description: Bearer <token>
title: Authorization
description: Bearer <token>
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/Body_import_csv_orders_api_orders_import_csv_post'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
MessageStatusRequest:
properties:
order_ids:
items:
type: string
type: array
title: Order Ids
type: object
required:
- order_ids
title: MessageStatusRequest
Body_import_csv_orders_api_orders_import_csv_post:
properties:
file:
type: string
contentMediaType: application/octet-stream
title: File
type: object
required:
- file
title: Body_import_csv_orders_api_orders_import_csv_post
TestConnectionRequest:
properties:
platform:
type: string
title: Platform
default: rakuten
service_secret:
anyOf:
- type: string
- type: 'null'
title: Service Secret
license_key:
anyOf:
- type: string
- type: 'null'
title: License Key
rakuten_service_secret:
anyOf:
- type: string
- type: 'null'
title: Rakuten Service Secret
rakuten_license_key:
anyOf:
- type: string
- type: 'null'
title: Rakuten License Key
amazon_seller_id:
anyOf:
- type: string
- type: 'null'
title: Amazon Seller Id
amazon_mws_auth_token:
anyOf:
- type: string
- type: 'null'
title: Amazon Mws Auth Token
amazon_marketplace_id:
anyOf:
- type: string
- type: 'null'
title: Amazon Marketplace Id
shopify_store_domain:
anyOf:
- type: string
- type: 'null'
title: Shopify Store Domain
shopify_access_token:
anyOf:
- type: string
- type: 'null'
title: Shopify Access Token
shopify_client_id:
anyOf:
- type: string
- type: 'null'
title: Shopify Client Id
shopify_client_secret:
anyOf:
- type: string
- type: 'null'
title: Shopify Client Secret
yahoo_app_id:
anyOf:
- type: string
- type: 'null'
title: Yahoo App Id
yahoo_secret:
anyOf:
- type: string
- type: 'null'
title: Yahoo Secret
yahoo_seller_id:
anyOf:
- type: string
- type: 'null'
title: Yahoo Seller Id
type: object
title: TestConnectionRequest
description: 'Platform-agnostic test connection request.
Supports both legacy field names (service_secret/license_key) and
platform-prefixed names (rakuten_service_secret/rakuten_license_key).'
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
SyncHistoryRequest:
properties:
months_back:
type: integer
maximum: 120.0
minimum: 0.0
title: Months Back
default: 0
type: object
title: SyncHistoryRequest