---
title: "送信イベント"
slug: "sending-events-1166442"
abstract: "直接HTTPリクエスト(Sitecore CDP Stream API)を使ってイベントを送信することを記述します。"
---
# 送信イベント

> !注直接HTTPリクエストを使う代わりに、Engage SDKを使ってイベントを送信することを推奨します。Engage SDKを使うと、このセクションで説明されているイベントデータのフォーマットや送信方法とは異なる必要があります。「 [送信イベント](https://doc.sitecore.com/cdp/ja/developers/api/stream-api/direct-http-requests-reference/sending-events-1166442/sending-events-using-the-engage-sdk.html "Sending events using the Engage SDK")」を参照してください。

GET /v1.2/event/create.json?client\_key=client\_key&message=event

[VIEWイベント](https://doc.sitecore.com/cdp/ja/developers/api/stream-api/direct-http-requests-reference/sending-events-1166442/view-event-1166446/view-event-1166446.html "VIEW event")など直接HTTPリクエストを使ってSitecore CDPにイベントを送信するには、Event API(Stream API型)を使ってGETリクエストを行います。イベントオブジェクトをmessageパラメータで渡します。[イベントオブジェクトのフォーマットを正しく](https://doc.sitecore.com/cdp/ja/developers/api/stream-api/direct-http-requests-reference/sending-events-1166442/sending-events-1166442.html#UUID-7b39a1ba-97bc-2a94-7753-431b57155fa8_section-idm4592064878180833375406234696 "Format of event objects")し、[必要な属性](https://doc.sitecore.com/cdp/ja/developers/api/stream-api/direct-http-requests-reference/sending-events-1166442/sending-events-1166442.html#UUID-7b39a1ba-97bc-2a94-7753-431b57155fa8_section-idm4640408171902433375375438664 "Required attributes")をすべて含めるようにしてください。

サイドバー。パラメータ

パラメータ

種類

概要

例

client\_key

ストリング

[あなたのクライアントキー](https://doc.sitecore.com/cdp/ja/developers/api/stream-api/direct-http-requests-reference/sending-events-1166442/collect-required-details.html)です。

ZpHxO9WvLOfQRVPlvo0BqB8YjGYuFfNe

event

JSON オブジェクト

すべてのイベントの詳細。

{"key1":"value","key2":"value"}

サイドバー。イベントオブジェクトのフォーマット

イベントデータはURL内のJSONオブジェクトとして送信されます。以下の点に注意してください:

-   {}
-   すべてのキーと値をダブルクォートで囲 ""。
-   改行は付けないでください。
-   キーや値の周りにスペースを入れないでください。

例30。VIEWイベントの正しくフォーマットされたイベントオブジェクト

{"channel":"MOBILE\_APP","type":"VIEW","language":"EN","currency":"EUR","page":"homepage","pos":"myretailsite/ireland","browser\_id":"a38b230c-11eb-4cf9-8d5d-274e9f344925​"}

サイドバー。必要な属性

最低限、すべてのイベントデータオブジェクトには以下の属性が含まれなければなりません。異なるイベントタイプごとに、この表に記載されている以上の属性を必要とする場合があることに注意してください。

属性

種類

概要

例

channel

文字列(大文字)

ユーザーがブランドと関わる接点です。  
  
例えば、ウェブページの場合、チャンネルは "WEB"です。モバイルアプリの画面では、チャンネルは "MOBILE\_APP"です。

以下のいずれかでなければなりません:  
  

-   "AIRPORT\_KIOSK"
-   "BRANCH"
-   "CALL\_CENTER"
-   "EMAIL"
-   "GDS"
-   "KIOSK"
-   "MOBILE\_APP"
-   "MOBILE\_WEB"
-   "SMS"
-   "OFFLINE"
-   "OTA"
-   "OTHER"
-   "WEB"

type

文字列(大文字)

ユーザーがあなたのブランドと関わる際に起こるイベントの種類。  
  
Sitecore CDP標準イベント(例えばVIEWやIDENTITY)を送信するには、値をSitecore CDP予約イベント名に設定してください。  
  
カスタムイベントを送信するには、その値を好きなカスタムイベント名に設定してください。カスタムイベント名は [Sitecore CDPの予約イベント名](https://doc.sitecore.com/cdp/ja/developers/api/stream-api/direct-http-requests-reference/sending-events-1166442/sending-events-1166442.html#UUID-7b39a1ba-97bc-2a94-7753-431b57155fa8_para-idm19018356461825044)とは異なる必要があります。  
  
Sitecore CDPが予約したイベント名:  
  

-   イベント名は "SC\_"
-   "ADD" - 標準 [的なADD](https://doc.sitecore.com/cdp/ja/developers/api/stream-api/direct-http-requests-reference/sending-events-1166442/add-event.html) イベント。
-   "ADD\_CONSUMERS" - 標準 [ADD\_CONSUMERS](https://doc.sitecore.com/cdp/ja/developers/api/stream-api/direct-http-requests-reference/sending-events-1166442/add_consumers-event.html) イベント。
-   "ADD\_CONTACTS" - 標準 [ADD\_CONTACTS](https://doc.sitecore.com/cdp/ja/developers/api/stream-api/direct-http-requests-reference/sending-events-1166442/add_contacts-event.html) イベント。
-   "CAMPAIGN\_TRACKING" - 内部予約イベント。使用しないでください。
-   "CHECKOUT" - 標準 [的なチェックアウト](https://doc.sitecore.com/cdp/ja/developers/api/stream-api/direct-http-requests-reference/sending-events-1166442/checkout-event.html) イベント。
-   "CLEAR\_CART" - 標準 [CLEAR\_CART](https://doc.sitecore.com/cdp/ja/developers/api/stream-api/direct-http-requests-reference/sending-events-1166442/clear_cart-event.html) イベント。
-   "CONFIRM" - 標準 [的なCONFIRM](https://doc.sitecore.com/cdp/ja/developers/api/stream-api/direct-http-requests-reference/sending-events-1166442/confirm-event.html) イベント。
-   "FEEDBACK" - フィードバックイベント。
-   "IDENTITY" - 標準 [的な同一イベント](https://doc.sitecore.com/cdp/ja/developers/api/stream-api/direct-http-requests-reference/sending-events-1166442/identity-event.html) 。
-   "INTERACTION" - 内部予約イベント。使用しないでください。
-   "ORDER\_CHECKOUT" - 標準 [ORDER\_CHECKOUT](https://doc.sitecore.com/cdp/ja/developers/api/stream-api/direct-http-requests-reference/sending-events-1166442/order_checkout-event.html) イベント。
-   "PAYMENT" - 標準 [的な支払い](https://doc.sitecore.com/cdp/ja/developers/api/stream-api/direct-http-requests-reference/sending-events-1166442/payment-event.html) イベント。
-   "SUBSCRIPTION" - 内部予約イベント。使用しないでください。
-   "SEARCH" - 標準 [的なSEARCH](https://doc.sitecore.com/cdp/ja/developers/api/stream-api/direct-http-requests-reference/sending-events-1166442/search-event.html) イベント。
-   "TRACKING" - 内部予約イベント。使用しないでください。
-   "VIEW" - 標準 [的なVIEW](https://doc.sitecore.com/cdp/ja/developers/api/stream-api/direct-http-requests-reference/sending-events-1166442/view-event.html) イベント。

-   "myretailsite:CLICKED\_POPUP"
-   "CUSTOM\_EVENT\_SEARCH"
-   "CUSTOM\_EVENT\_BANNER\_CLICK"

language

文字列(大文字 [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes))

ユーザーがアプリを使っている言語。  
  
例えば、ユーザーがウェブサイトで日本語を選択した場合、その言語は "JA"です。

-   "DE"
-   "EN"
-   "FR"

currency

文字列(大文字の [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes))

ユーザーがアプリで使っている通貨のアルファベット順通貨コードです。  
  
例えば、ユーザーがあなたのウェブサイトで通貨としてオーストラリアドルを選択した場合、通貨は "AUD"となります。

-   "EUR"
-   "GBP"
-   "USD"

page

ストリング

ブランドとのやり取りが行われるウェブページの名前。  
  
これはお好みのカスタム値です。

-   "home"
-   "contact-us.html"

pos

ストリング

[ブランドとのやり取りが行われる販売ポイントの名前。](https://doc.sitecore.com/cdp/ja/developers/api/stream-api/direct-http-requests-reference/sending-events-1166442/collect-required-details.html#UUID-60c4c930-3cfe-e0ad-3b98-69ceff75989f_section-idm1903325950166538)  
  
この値は、あなたのSitecore CDPインスタンス内に存在する販売時点名に設定する必要があります。

"myretailsite/ireland"

browser\_id

ストリング

[ブラウザID](https://doc.sitecore.com/cdp/ja/developers/api/stream-api/direct-http-requests-reference/sending-events-1166442/retrieve-the-browser-id.html)。

ブラウザIDは以下のような文字列です:  
  
"a38b230c-11eb-4cf9-8d5d-274e9f344925​"

curl -X GET -g '<baseURL>/v1.2/event/create.json?client\_key=<client\_key>&message={"channel":"MOBILE\_APP","type":"VIEW","language":"EN","currency":"EUR","page":"homepage","pos":"myretailsite/ireland","browser\_id":"a38b230c-11eb-4cf9-8d5d-274e9f344925​"}'

{
 "status": "OK",
 "version": "1.2",
 "client\_key": "ZpHxO9WvLOfQRVPlvo0BqB8YjGYuFfNe",
 "ref": "dcb27c41-688d-4c36-8ed7-536e7bf590ba"
}