Skip to content

購入数をエクスポート

get

/purchases/quantity_series

このエンドポイントを使用して、指定した期間におけるアプリ内の購入総数を返します。

前提条件

このエンドポイントを使用するには、purchases.quantity_series 権限を持つ APIキーが必要です。

レート制限

このエンドポイントには、1時間あたり1,000リクエストの共有レート制限が適用されます。このレート制限は、APIレート制限に記載されているように、/custom_attributes/events、および /events/list エンドポイントと共有されます。

リクエストパラメーター

パラメーター 必須 データタイプ 説明
ending_at オプション 日時 (ISO-8601 文字列) データエクスポートを終了する日付。デフォルトはリクエストの時刻です。
length 必須 整数 返されるシリーズに含める ending_at までの最大日数。1以上100以下(両端を含む)でなければなりません。
unit オプション 文字列 データポイント間の時間の単位。日または時間を指定でき、デフォルトは日です。
app_id オプション 文字列 API Keysページから取得したアプリAPI識別子。除外された場合、ワークスペース内のすべてのアプリの結果が返されます。
product オプション 文字列 応答をフィルターする製品の名前。除外された場合、すべてのアプリの結果が返されます。

リクエスト例

1
2
curl --location --request GET 'https://rest.iad-01.braze.com/purchases/quantity_series?length=100' \
--header 'Authorization: Bearer YOUR-REST-API-KEY'

応答

1
2
3
4
5
6
7
8
9
10
{
  "message": (required, string) the status of the export, returns 'success' when completed without errors,
  "data" : [
    {
      "time" : (string) the date as ISO 8601 date,
      "purchase_quantity" : (int) the number of items purchased in the time period
      },
    ...
  ]
}
New Stuff!