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

# エクスポートしたキャンペーンイベントを取得する

> エクスポートのリクエストから返された`export_id`を使って結果を取得します。1ページあたり最大1,000件です。

> [!NOTE]
>
> **ページネーション**
>
> このAPIはページベースのページネーションを使用します。
>
> * **ページ番号**: 0から始まる整数です。
> * **ページサイズ**: 1ページあたり最大1,000件のイベントデータです。
> * **総ページ数**: `total_page_count`フィールドで返されます。
> * **データがある場合の有効なページ範囲**: 0から(total\_page\_count - 1)までです。
>
> エクスポート結果にデータがない場合は、ページ0をリクエストすると、空の`data`配列と値が0の`total_page_count`が返されます。

> [!NOTE]
>
> **チャネル別のメッセージデータ対応条件**
>
> push-notification以外のチャネルでは、message\_data列は2025-07-18以降のデータでのみ利用できます。
>
> in-app-messageとin-web-messageチャネルでは、以下のバージョン以降のSDKも必要です。
>
> * iOS SDK: 1.17.2
> * Android SDK: 1.18.1
> * React Native SDK: 3.10.1
> * JavaScript SDK: 2.17.4

### メッセージデータの例

> [tab] text-message
>
> ```json
> {
>   "requestId": "リクエストID",
>   "requestDate": "YYYY-MM-DD HH:mm:ss",
>   "templateId": "テンプレートID",
>   "title": "メッセージの件名",
>   "body": "本文の内容",
>   "sendNo": "07000000000",
>   "recipientNo": "01012345678",
>   "messageType": "MMS",
>   "countryCode": "82",
>   "adYn": "N",
>   "attachFileList": [
>     {
>       "fileId": 123456789,
>       "fileName": "image.jpg",
>       "filePath": "/path/to/image/",
>       "saveFileName": "saved.jpg",
>       "uploadType": "TEMPORARY"
>     }
>   ]
> }
> ```

> [tab] email
>
> ```json
> {
>   "title": "メール件名",
>   "body": {
>     "html": "<html><body><p>メール本文</p></body></html>",
>     "text": "内容"
>   }
> }
> ```

> [tab] kakao-friendtalk
>
> ```json
> {
>   "plusFriendId": "@チャネル名",
>   "senderKey": "発信キー",
>   "recipientNo": "01012345678",
>   "content": "メッセージの内容",
>   "buttons": [
>     {
>       "ordering": 1,
>       "type": "WL",
>       "name": "ボタン名",
>       "linkMo": "https://m.example.com",
>       "linkPc": "https://example.com",
>       "schemeIos": "",
>       "schemeAndroid": ""
>     }
>   ],
>   "isAd": true
> }
> ```

> [tab] kakao-alimtalk
>
> ```json
> {
>   "plusFriendId": "@チャネル名",
>   "senderKey": "発信キー",
>   "recipientNo": "01012345678",
>   "templateCode": "テンプレートコード",
>   "content": "[ブランド] メッセージ本文",
>   "templateExtra": "補足案内",
>   "buttons": [
>     {
>       "ordering": 1,
>       "type": "WL",
>       "name": "ボタン名",
>       "linkMo": "https://m.example.com",
>       "linkPc": "https://example.com"
>     }
>   ]
> }
> ```

> [tab] kakao-brand-message (基本型)
>
> 含まれるフィールドは`messageType`によって異なります。
>
> ```json
> {
>   "messageType": "COMMERCE",
>   "content": "サンプル利用者へのおすすめ商品です。",
>   "imageUrl": "https://example.com/product.png",
>   "commerce": {
>     "title": "おすすめ商品",
>     "regularPrice": "10000",
>     "discountPrice": "9000",
>     "discountRate": "10"
>   },
>   "buttons": [
>     {
>       "name": "商品を見る",
>       "linkType": "WL",
>       "linkMobile": "https://example.com/products/1"
>     }
>   ]
> }
> ```

> [tab] kakao-brand-message (自由型)
>
> ```json
> {
>   "chatBubbleType": "WIDE_ITEM_LIST",
>   "header": "おすすめ商品",
>   "attachment": {
>     "item": {
>       "list": [
>         {
>           "imgUrl": "https://mud-kage.kakao.com/example/product-1.jpg",
>           "urlMobile": "https://example.com/products/1"
>         },
>         {
>           "title": "2つ目の商品",
>           "imgUrl": "https://mud-kage.kakao.com/example/product-2.jpg",
>           "urlMobile": "https://example.com/products/2"
>         },
>         {
>           "title": "3つ目の商品",
>           "imgUrl": "https://mud-kage.kakao.com/example/product-3.jpg",
>           "urlMobile": "https://example.com/products/3"
>         }
>       ]
>     },
>     "button": [
>       {
>         "name": "もっと見る",
>         "type": "WL",
>         "urlMobile": "https://example.com/products"
>       }
>     ]
>   }
> }
> ```

> [tab] in-app-message
>
> ```json
> {
>   "templateName": "テンプレート名"
> }
> ```

> [tab] in-web-message
>
> ```json
> {
>   "templateName": "テンプレート名"
> }
> ```

> [tab] web-push-notification
>
> ```json
> {
>   "notifly": {
>     "ti": "件名",
>     "bd": "本文",
>     "cid": "キャンペーンID",
>     "mid": "メッセージID",
>     "u": "https://your-link.com",
>     "ic": "https://your-icon.png",
>     "bg": "#ffffff",
>     "im": "https://your-image.jpg",
>     "sd": "/push-sound.mp3",
>     "tg": "notifly-push-notification",
>     "vb": [200, 100, 200],
>     "ri": false,
>     "data": {},
>     "ac": [
>       { "action": "click", "title": "Go to Link" },
>       { "action": "close", "title": "Close" }
>     ]
>   }
> }
> ```

> [tab] webhook
>
> ```json
> {
>   "url": "https://your.webhook.endpoint",
>   "method": "POST",
>   "headers": {
>     "Content-Type": "application/json"
>   },
>   "data": "{ \"key\": \"value\" }"
> }
> ```


## OpenAPI

````yaml /ja/api-reference/openapi.yaml get /projects/{projectId}/campaign-event-data/exports/{exportId}/result
openapi: 3.0.3
info:
  title: Notifly API
  version: 1.0.0
  contact:
    email: contact@notifly.tech
servers:
  - url: https://api.notifly.tech
    description: Notifly APIサーバー
security: []
tags:
  - name: catalog
    x-group: カタログ
paths:
  /projects/{projectId}/campaign-event-data/exports/{exportId}/result:
    get:
      summary: get-campaign-event-export-result
      operationId: getCampaignEventExportResult
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: プロジェクトIDです。
        - name: exportId
          in: path
          required: true
          schema:
            type: string
          description: エクスポートのリクエストで返されたIDです。
        - name: page
          in: query
          required: true
          schema:
            type: integer
            minimum: 0
          description: >-
            0から始まるページ番号です。結果がある場合は0から`total_page_count -
            1`まで指定できます。結果が空の場合は0を指定します。
      responses:
        '200':
          description: 指定したページを取得しました。
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/CampaignEventData'
                  total_page_count:
                    type: integer
              example:
                status: success
                data:
                  - id: E252EB67-48E3-49DC-866D-F8C26161230D
                    user_id: user_12345
                    notifly_user_id: notifly_user_abcde
                    device_id: ios_device_98765
                    notifly_device_id: notifly_device_xyz
                    channel: push_notification
                    event_name: send_success
                    failure_reason: null
                    resource_title: 6월 신규 혜택 안내
                    resource_type: campaign
                    campaign_id: camp_202406_promo
                    experiment_group_name: A
                    user_journey_id: null
                    user_journey_node_id: null
                    time: '1749373994000000'
                    message_data:
                      title: 지금 확인하고 혜택 받기!
                      body: 6월 신규 회원님만을 위한 특별 이벤트 🎁
                      link: link://link/feed?id=1243
                    channel_metadata:
                      channel_subtype: image
                      brand_message_target: null
                total_page_count: 1
        '202':
          description: エクスポートデータを作成中です。
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  message:
                    type: string
              example:
                status: processing
                message: Data is being generated.
        '404':
          description: 指定した`projectId`または`exportId`が存在しません。
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  message:
                    type: string
              example:
                status: not_found
                message: The specified project_id and export_id could not be found.
        '408':
          description: リクエストがタイムアウトしました。
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Timeout
        '416':
          description: 指定したページ番号が不正です。
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  message:
                    type: string
              example:
                status: invalid_page
                message: The requested page does not exist.
        '500':
          description: サーバー内部エラーです。
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  message:
                    type: string
              example:
                status: error
                message: An error occurred while processing the data.
      security:
        - bearerAuth: []
components:
  schemas:
    CampaignEventData:
      type: object
      properties:
        id:
          type: string
          description: イベントIDです。
        user_id:
          type: string
          description: ユーザーIDです。
        notifly_user_id:
          type: string
          description: NotiflyユーザーIDです。
        device_id:
          type: string
          description: デバイスIDです。
        notifly_device_id:
          type: string
          description: NotiflyデバイスIDです。
        channel:
          type: string
          description: 送信チャネルです。
        event_name:
          type: string
          description: イベント名です。
        failure_reason:
          type: string
          nullable: true
          description: 失敗の理由です。失敗した場合のみ含まれます。
        resource_title:
          type: string
          description: リソースのタイトルです。
        resource_type:
          type: string
          description: リソースのタイプです。`campaign`または`user-journey`です。
        campaign_id:
          type: string
          nullable: true
          description: キャンペーンIDです。
        experiment_group_name:
          type: string
          nullable: true
          description: A/Bテストのグループ名です。
        user_journey_id:
          type: string
          nullable: true
          description: ユーザージャーニーIDです。
        user_journey_node_id:
          type: string
          nullable: true
          description: ユーザージャーニーのノードIDです。
        time:
          type: string
          description: イベントの発生時刻です。マイクロ秒単位のタイムスタンプです。
        message_data:
          type: object
          description: メッセージデータです。構造はチャネルによって異なります。上のメッセージデータの例を参照してください。
        channel_metadata:
          type: object
          description: >-
            チャネルのメタデータです。`channel_subtype`はメッセージタイプ、`brand_message_target`はブランドメッセージの配信対象を示します。ほかのチャネルでは`brand_message_target`が`null`になります。
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: '`POST /authenticate`で発行したトークンをBearer形式で送信します。'

````

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