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

# メッセージ統計をCSVでエクスポートする

> キャンペーンとユーザージャーニーの日別統計をCSVで取得します。

期間を指定するには、`start` と `end` を組み合わせるか、`since` または `last` を使用します。デフォルトの取得期間は7日間です。1日分のデータを取得するには、`start` と `end` に同じ日付を指定します。`offset` は `since` または `last` と併用できます。日付はKST基準で、当日を除きます。


## OpenAPI

````yaml /ja/api-reference/openapi.yaml get /v1/projects/{projectId}/statistics.csv
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:
  /v1/projects/{projectId}/statistics.csv:
    get:
      summary: get-campaign-statistics-csv
      operationId: getCampaignStatisticsCsv
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: プロジェクトIDです。
        - name: start
          in: query
          required: false
          description: 開始日です（YYYY-MM-DD、KST）。endと併用します。
          schema:
            type: string
            format: date
        - name: end
          in: query
          required: false
          description: 終了日です（YYYY-MM-DD、KST）。startと併用します。
          schema:
            type: string
            format: date
        - name: since
          in: query
          required: false
          description: 指定日以降のデータを取得します。
          schema:
            type: string
            format: date
        - name: last
          in: query
          required: false
          description: 直近N期間のデータを取得します。正の数を指定します。
          schema:
            type: integer
            minimum: 1
        - name: offset
          in: query
          required: false
          description: sinceまたはlastの基準日を指定した期間分だけ前に移動します。
          schema:
            type: integer
            minimum: 0
        - name: timeUnit
          in: query
          required: false
          description: lastまたはoffsetに使用する期間の単位です。
          schema:
            type: string
            enum:
              - day
              - week
              - month
            default: day
        - name: tag
          in: query
          required: false
          description: 繰り返し指定できます。いずれかのタグに一致するキャンペーンだけを返し、ユーザージャーニーは除外します。
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          description: >-
            データがある場合は `text/csv` を返します。日付は `DD/MM/YYYY` 形式で、未対応の指標は `0`
            です。コンバージョンの種類は `전체 전환`（全体）、`직접 전환`（直接）、`전환 매출`（売上）のいずれかです。最大10件を
            `conversion_1` から `conversion_10`
            に出力し、残りの列は空欄になります。該当するデータがない場合、期間指定に関する一部のエラーが発生した場合、またはCSVが2
            MBを超える場合は `text/plain` のメッセージを返します。
          headers:
            Content-Disposition:
              description: Attachment filename for CSV responses.
              schema:
                type: string
          content:
            text/csv:
              schema:
                type: string
              example: >
                date,resource_type,resource_id,resource_name,node_id,node_name,variant_id,variant_name,channel,channel_subtype,brand_message_target,tags,message_sent,message_failed,delivered,click,conversion_1_name,conversion_1_type,conversion_1_count,conversion_2_name,conversion_2_type,conversion_2_count,conversion_3_name,conversion_3_type,conversion_3_count,conversion_4_name,conversion_4_type,conversion_4_count,conversion_5_name,conversion_5_type,conversion_5_count,conversion_6_name,conversion_6_type,conversion_6_count,conversion_7_name,conversion_7_type,conversion_7_count,conversion_8_name,conversion_8_type,conversion_8_count,conversion_9_name,conversion_9_type,conversion_9_count,conversion_10_name,conversion_10_type,conversion_10_count

                01/06/2025,campaign,campaign_example,Welcome,,,,,push-notification,text,,summer,1500,23,1477,234,purchase,전체
                전환,45,,,,,,,,,,,,,,,,,,,,,,,,,,,
            text/plain:
              schema:
                type: string
              example: No data found for the specified date range and filters.
        '400':
          description: プロジェクトIDまたはクエリパラメーターが不正です。
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
        '403':
          description: このプロジェクトではCSV出力が無効です。
          content:
            text/plain:
              schema:
                type: string
        '408':
          description: クエリがタイムアウトしました。
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '500':
          description: サーバーエラーです。
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
      security: []

````

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