> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bizmori.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 注文レポートを取得

> レポートのステータスと、`completed` のときはダウンロード URL を取得します。作成リクエストのない locale は `404 REPORT_NOT_FOUND` です。

`download.url` は呼び出すたびに新しく署名され、300 秒後に失効します。失効した URL はストレージが `403` を返し、更新できません。URL を保存せず、ユーザーがダウンロードを押したときにこの API を呼び出し、返された URL へすぐに移動してください。

注文の保管期限を過ぎると、レポートのステータスに関係なく `400 ORDER_EXPIRED` を返します。




## OpenAPI

````yaml ja/api-reference/openapi.yaml GET /api/v3/orders/{orderId}/reports/{locale}
openapi: 3.0.0
info:
  title: BIZ MORI API
  version: 2.0.0
  description: >-
    BIZ MORI API は、デジタルコンテンツ保護のための4つのコアサービスを提供します:

    - **Anti-AI**: 画像をAI学習から保護

    - **Watermark Embed**: 画像に不可視のデジタル watermark を埋め込み

    - **Watermark Extract**: 画像から watermark を抽出・検証

    - **AI Detection**: 画像がAI生成かどうかを検知

    - **テストAPIキー**: `sk_test_`
    プレフィックスのキーは同じBearer認証を使用し、実際の処理サービスの実行やクレジットの消費なしに注文ライフサイクルを検証できます。テストアップロードの内容は破棄され、結果ファイルは作成されません
  contact:
    name: BIZ MORI サポート
    email: support@bizmori.com
  license:
    name: Proprietary
    url: https://docs.bizmori.com/legal/terms
servers:
  - url: https://api.bizmori.com
    description: 本番環境
security: []
tags:
  - name: Anti-AI
    description: Anti-AI画像保護の注文
  - name: Watermark Embed
    description: watermark 埋め込みの注文
  - name: Watermark Extract
    description: watermark 抽出の注文
  - name: AI Detection
    description: AI生成画像検知の注文
  - name: Orders
    description: 注文の照会と管理
  - name: Webhooks
    description: Webhookの設定とイベント
  - name: Reports
    description: watermark 抽出・AI Detection 注文の PDF 分析レポート
paths:
  /api/v3/orders/{orderId}/reports/{locale}:
    get:
      tags:
        - Reports
      summary: 注文レポートを取得
      description: >
        レポートのステータスと、`completed` のときはダウンロード URL を取得します。作成リクエストのない locale は `404
        REPORT_NOT_FOUND` です。


        `download.url` は呼び出すたびに新しく署名され、300 秒後に失効します。失効した URL はストレージが `403`
        を返し、更新できません。URL を保存せず、ユーザーがダウンロードを押したときにこの API を呼び出し、返された URL
        へすぐに移動してください。


        注文の保管期限を過ぎると、レポートのステータスに関係なく `400 ORDER_EXPIRED` を返します。
      operationId: getOrderReport
      parameters:
        - in: path
          name: orderId
          required: true
          schema:
            type: string
            pattern: ^[0-9]{1,20}$
          description: 注文 ID
        - in: path
          name: locale
          required: true
          schema:
            type: string
            enum:
              - ko-KR
              - en-US
              - ja-JP
          description: レポートの言語
      responses:
        '200':
          description: >-
            `queued`・`processing`・`completed`・`failed` 状態のレポート。`download` は
            `completed` のときだけ存在
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderReportResponse'
              example:
                data:
                  orderId: '1234567891'
                  reportType: watermarkDetection
                  locale: en-US
                  status: completed
                  download:
                    url: https://s3.ap-northeast-2.amazonaws.com/...
                    expiresInSeconds: 300
                  failure: null
        '400':
          description: 不正なリクエスト、注文の種類が対応していない locale、または保管期限を過ぎた注文
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                validation:
                  value:
                    code: VALIDATION_FAILED
                locale:
                  value:
                    code: REPORT_LOCALE_UNSUPPORTED
                expired:
                  value:
                    code: ORDER_EXPIRED
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: 注文が存在しない、この locale のレポートがリクエストされていない、または完了したレポートファイルが存在しない
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                order:
                  value:
                    code: ORDER_NOT_FOUND
                report:
                  value:
                    code: REPORT_NOT_FOUND
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          description: レポート作成を一時的に利用できない
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: SERVICE_UNAVAILABLE
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: >
            curl -X GET
            https://api.bizmori.com/api/v3/orders/ORDER_ID/reports/en-US \
              -H "Authorization: Bearer YOUR_API_KEY"
        - lang: javascript
          label: JavaScript
          source: >
            const orderId = 'ORDER_ID';

            const locale = 'en-US';

            const response = await
            fetch(`https://api.bizmori.com/api/v3/orders/${orderId}/reports/${locale}`,
            {
              headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
            });

            const { data } = await response.json();

            if (data.status === 'completed') window.location.href =
            data.download.url;
        - lang: python
          label: Python
          source: |
            import requests

            order_id = 'ORDER_ID'
            locale = 'en-US'
            response = requests.get(
                f'https://api.bizmori.com/api/v3/orders/{order_id}/reports/{locale}',
                headers={'Authorization': 'Bearer YOUR_API_KEY'}
            )
            data = response.json()['data']
            if data['status'] == 'completed':
                pdf = requests.get(data['download']['url']).content
components:
  schemas:
    OrderReportResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/OrderReportResource'
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: エラーコード
    OrderReportResource:
      type: object
      required:
        - orderId
        - reportType
        - locale
        - status
        - download
      properties:
        orderId:
          type: string
          description: 注文 ID
        reportType:
          type: string
          enum:
            - watermarkDetection
            - aiDetection
          description: BIZ MORI が注文の種類から決定
        locale:
          type: string
          enum:
            - ko-KR
            - en-US
            - ja-JP
        status:
          type: string
          enum:
            - queued
            - processing
            - completed
            - failed
          description: レポートの作成ステータス
        download:
          nullable: true
          description: ダウンロード情報。`status` が `completed` のときだけ存在
          allOf:
            - $ref: '#/components/schemas/OrderReportDownload'
        failure:
          nullable: true
          description: 失敗情報。`status` が `failed` のときだけ存在
          allOf:
            - $ref: '#/components/schemas/OrderReportFailure'
    OrderReportDownload:
      type: object
      required:
        - url
        - expiresInSeconds
      properties:
        url:
          type: string
          format: uri
          description: >
            300 秒間有効な PDF の署名付き URL。watermark レポートは `<注文名>-report-<locale>.pdf`
            という名前で保存されます(例: `春キャンペーン-report-ja-JP.pdf`)。

            URL を保存せず、新しい URL が必要なときはレポート API を再度呼び出してください。
        expiresInSeconds:
          type: integer
          enum:
            - 300
    OrderReportFailure:
      type: object
      required:
        - code
        - retryable
      properties:
        code:
          type: string
          enum:
            - REPORT_GENERATION_FAILED
            - REPORT_NOT_AVAILABLE
        retryable:
          type: boolean
          description: >
            `true` の場合、同じ注文・locale で `POST /api/v3/orders/{orderId}/reports`
            を再度呼び出すと新しく作成できます。

            watermark レポートは失敗が 3 回に達すると `false` です。
  responses:
    Unauthorized:
      description: 認証失敗
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: AUTH_NOT_AUTHENTICATED
    InternalError:
      description: 内部サーバーエラー
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: SERVER_INTERNAL_ERROR
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        外部クライアントアクセス用のBearer APIキー。本番キーは `sk_` プレフィックスを使用し、テストキーは `sk_test_`
        プレフィックスを使用して、処理やクレジット消費なしに注文ライフサイクルを検証します。

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.