Notification API ドキュメント

通知 API(Notification API)

Notification API を使用すると、eBay 通知エクスペリエンス全体を管理できます。通知トピックの参照、宛先エンドポイントの作成・管理、サブスクリプションの構成・テスト、およびメッセージペイロードの整合性確認をサポートします。

バージョン: v1.6.2

ベースURL: https://api.ebay.com/commerce/notification/v1

認証(OAuth スコープ)

Client Credentials スコープ:

スコープ説明
https://api.ebay.com/oauth/api_scopeeBay の公開データを表示

Authorization Code スコープ:

スコープ説明
https://api.ebay.com/oauth/api_scope/commerce.notification.subscription通知サブスクリプションの表示と管理
https://api.ebay.com/oauth/api_scope/commerce.notification.subscription.readonly通知サブスクリプションの表示

リソース一覧

Notification API は以下の 7 リソース、合計 21 エンドポイントで構成されています。

リソース 説明
configアプリレベルの構成(アラート設定)2
destination通知の宛先エンドポイントの管理5
public_key通知検証用の公開キー取得1
subscription通知サブスクリプションの管理5
subscription (enable/disable)サブスクリプションの有効化/無効化2
subscription filterサブスクリプションフィルターの管理3
subscription testサブスクリプションのテスト1
topic通知トピックの参照2

config — アプリケーション構成(2 エンドポイント)

GET /config

getConfig — 以前に作成された構成を取得します。

レスポンス: 200 → Config / 404 / 500

PUT /config

updateConfig — 新しい構成を作成または既存の構成を更新します。アラート設定が可能です。

パラメータ場所必須説明
Content-Typeヘッダー必須application/json

リクエストボディ: Config

レスポンス: 204 / 400 / 500

destination — 宛先管理(5 エンドポイント)

GET /destination

getDestinations — 宛先リソースのページ分けされたコレクションを取得します。

パラメータ場所必須説明
limitクエリ任意ページあたりの最大件数。最小: 10、最大: 100、デフォルト: 20
continuation_tokenクエリ任意次ページの継続トークン。

レスポンス: 200 → DestinationSearchResponse / 400 / 500

POST /destination

createDestination — HTTP プッシュ通知を受信する宛先エンドポイントを作成します。エンドポイントは challengeResponse で応答する準備が必要です。

パラメータ場所必須説明
Content-Typeヘッダー必須application/json

リクエストボディ: DestinationRequest

レスポンス: 201 / 400 / 409 / 500

GET /destination/{destination_id}

getDestination — 特定の宛先の詳細を取得します。

パラメータ場所必須説明
destination_idパス必須宛先の一意の識別子。

レスポンス: 200 → Destination / 400 / 404 / 500

PUT /destination/{destination_id}

updateDestination — 宛先を更新します。

パラメータ場所必須説明
destination_idパス必須宛先の一意の識別子。
Content-Typeヘッダー必須application/json

リクエストボディ: DestinationRequest

レスポンス: 204 / 400 / 404 / 409 / 500

DELETE /destination/{destination_id}

deleteDestination — 宛先を削除します。アクティブな宛先は削除できません。サブスクリプションを無効にしてから削除してください。

パラメータ場所必須説明
destination_idパス必須削除する宛先の一意の識別子。

レスポンス: 204 / 400 / 404 / 409 / 500

public_key — 公開キー取得(1 エンドポイント)

GET /public_key/{public_key_id}

getPublicKey — 通知の処理と検証に使用する公開キーを取得します。キー ID は通知の X-EBAY-SIGNATURE ヘッダーから取得されます。

重要: 取得した公開キーは一時的にキャッシュしてください(推奨: 1 時間)。通知ごとにリクエストすると API 呼び出し制限を超える可能性があります。

パラメータ場所必須説明
public_key_idパス必須公開キーの一意の ID(X-EBAY-SIGNATURE ヘッダーから取得)。

レスポンス: 200 → PublicKey / 400 / 404 / 500

subscription — サブスクリプション管理(5 エンドポイント)

GET /subscription

getSubscriptions — すべてのサブスクリプションのページ分けされたリストを取得します。

パラメータ場所必須説明
limitクエリ任意ページあたりの最大件数。最小: 10、最大: 100、デフォルト: 20
continuation_tokenクエリ任意次ページの継続トークン。

レスポンス: 200 → SubscriptionSearchResponse / 400 / 500

POST /subscription

createSubscription — トピックとスキーマバージョンのサブスクリプションを作成します。無効モードで作成し、テスト後に有効化できます。

パラメータ場所必須説明
Content-Typeヘッダー必須application/json

リクエストボディ: CreateSubscriptionRequest

レスポンス: 201 / 400 / 403 / 409 / 500

GET /subscription/{subscription_id}

getSubscription — 指定されたサブスクリプションの詳細を取得します。

パラメータ場所必須説明
subscription_idパス必須サブスクリプションの一意の識別子。

レスポンス: 200 → Subscription / 400 / 404 / 500

PUT /subscription/{subscription_id}

updateSubscription — サブスクリプションを更新します。

パラメータ場所必須説明
subscription_idパス必須サブスクリプションの一意の識別子。
Content-Typeヘッダー必須application/json

リクエストボディ: UpdateSubscriptionRequest

レスポンス: 204 / 400 / 404 / 409 / 500

DELETE /subscription/{subscription_id}

deleteSubscription — サブスクリプションを削除します(ステータスに関係なく削除可能)。

パラメータ場所必須説明
subscription_idパス必須サブスクリプションの一意の識別子。

レスポンス: 204 / 400 / 404 / 500

subscription — 有効化/無効化(2 エンドポイント)

POST /subscription/{subscription_id}/disable

disableSubscription — サブスクリプションを無効にし、通知の配信を停止します。

パラメータ場所必須説明
subscription_idパス必須無効にする有効なサブスクリプションの ID。

レスポンス: 204 / 400 / 404 / 500

POST /subscription/{subscription_id}/enable

enableSubscription — 無効なサブスクリプションを有効にします。

パラメータ場所必須説明
subscription_idパス必須有効にする無効なサブスクリプションの ID。

レスポンス: 204 / 400 / 404 / 409 / 500

subscription filter — フィルター管理(3 エンドポイント)

POST /subscription/{subscription_id}/filter

createSubscriptionFilter — サブスクリプションのフィルターを作成します。指定した基準に一致する通知のみが配信されます。フィルターは JSON Schema(バージョン 2020-12 以降)で定義します。作成直後は PENDING ステータスで、確認後に ENABLED に移行します。

パラメータ場所必須説明
subscription_idパス必須サブスクリプションの一意の識別子。
Content-Typeヘッダー必須application/json

リクエストボディ: CreateSubscriptionFilterRequest

レスポンス: 201 / 400 / 403 / 404 / 500

GET /subscription/{subscription_id}/filter/{filter_id}

getSubscriptionFilter — 指定されたサブスクリプションフィルターの詳細を取得します。

パラメータ場所必須説明
subscription_idパス必須サブスクリプションの一意の識別子。
filter_idパス必須フィルターの一意の識別子。

レスポンス: 200 → SubscriptionFilter / 400 / 403 / 404 / 500

DELETE /subscription/{subscription_id}/filter/{filter_id}

deleteSubscriptionFilter — アクティブなフィルターを無効にします。PENDING ステータスのフィルターは無効にできません。

パラメータ場所必須説明
subscription_idパス必須サブスクリプションの一意の識別子。
filter_idパス必須フィルターの一意の識別子。

レスポンス: 204 / 400 / 403 / 404 / 500

subscription test — テスト(1 エンドポイント)

POST /subscription/{subscription_id}/test

testSubscription — モックテストペイロードをトリガーし、サブスクリプションをエンドツーエンドでテストします。テストペイロードと実際のペイロードを区別するには notificationId を使用します。

パラメータ場所必須説明
subscription_idパス必須テストするサブスクリプションの一意の識別子。

レスポンス: 202 / 400 / 404 / 500

topic — トピック参照(2 エンドポイント)

GET /topic

getTopics — サポートされているすべての通知トピックのページ分けされたコレクションを返します。スキーマバージョン、形式、メタデータを含みます。

パラメータ場所必須説明
limitクエリ任意ページあたりの最大件数。最小: 10、最大: 100、デフォルト: 20
continuation_tokenクエリ任意次ページの継続トークン。

レスポンス: 200 → TopicSearchResponse / 400 / 500

GET /topic/{topic_id}

getTopic — 指定されたトピックの詳細を取得します。

パラメータ場所必須説明
topic_idパス必須通知トピックの一意の識別子。

レスポンス: 200 → Topic / 400 / 404 / 500

スキーマ定義(全 18 スキーマ)

構成

Config

フィールド説明
alertEmailstringアラートメールアドレス

宛先

Destination

フィールド説明
destinationIdstring宛先の一意の ID
namestring宛先名
statusstringステータス
deliveryConfigDeliveryConfig配信構成

DestinationRequest

フィールド説明
namestring宛先名
statusstringステータス
deliveryConfigDeliveryConfig配信構成

DeliveryConfig

フィールド説明
endpointstringエンドポイント URL
verificationTokenstring検証トークン

DestinationSearchResponse

フィールド説明
destinationsarray[Destination]宛先の配列
hrefstring現在の結果の URI
nextstring次ページの URI
limitinteger最大件数
totalinteger総数

公開キー

PublicKey

フィールド説明
keystring公開キーの値
algorithmstringアルゴリズム
digeststringダイジェスト

サブスクリプション

Subscription

フィールド説明
subscriptionIdstringサブスクリプション ID
topicIdstringトピック ID
destinationIdstring宛先 ID
statusstringステータス
payloadSubscriptionPayloadDetailペイロード詳細
filterIdstringフィルター ID
creationDatestring作成日時

CreateSubscriptionRequest

フィールド説明
topicIdstringトピック ID
destinationIdstring宛先 ID
statusstringステータス
payloadSubscriptionPayloadDetailペイロード詳細

UpdateSubscriptionRequest

フィールド説明
destinationIdstring宛先 ID
statusstringステータス
payloadSubscriptionPayloadDetailペイロード詳細

SubscriptionPayloadDetail

フィールド説明
formatstring形式(例: JSON)
schemaVersionstringスキーマバージョン
deliveryProtocolstring配信プロトコル

SubscriptionSearchResponse

フィールド説明
subscriptionsarray[Subscription]サブスクリプションの配列
hrefstring現在の結果の URI
nextstring次ページの URI
limitinteger最大件数
totalinteger総数

フィルター

CreateSubscriptionFilterRequest

フィールド説明
filterSchemaobject有効な JSON Schema(バージョン 2020-12 以降)

SubscriptionFilter

フィールド説明
filterIdstringフィルター ID
subscriptionIdstringサブスクリプション ID
filterSchemaobjectフィルタースキーマ
filterStatusstringフィルターステータス(PENDING / ENABLED)
creationDatestring作成日時

トピック

Topic

フィールド説明
topicIdstringトピック ID
descriptionstring説明
statusstringステータス
contextstringコンテキスト
scopestringスコープ
filterablebooleanフィルタリング可能かどうか
authorizationScopesarray[string]必要な認可スコープ
supportedPayloadsarray[PayloadDetail]サポートされるペイロード

PayloadDetail

フィールド説明
formatstring形式
schemaVersionstringスキーマバージョン
deliveryProtocolstring配信プロトコル
deprecatedboolean非推奨かどうか

TopicSearchResponse

フィールド説明
topicsarray[Topic]トピックの配列
hrefstring現在の結果の URI
nextstring次ページの URI
limitinteger最大件数
totalinteger総数

共通スキーマ

Error

フィールド説明
categorystringエラーカテゴリ
domainstringエラードメイン
errorIdintegerエラー ID
messagestring短いメッセージ
longMessagestring詳細メッセージ
inputRefIdsarray[string]入力参照 ID
outputRefIdsarray[string]出力参照 ID
parametersarray[ErrorParameter]エラーパラメータ
subdomainstringエラーサブドメイン

ErrorParameter

フィールド説明
namestringパラメータ名
valuestringパラメータ値

エンドポイント一覧(全 21 エンドポイント)

メソッド エンドポイント operationId 説明
GET/configgetConfig構成を取得
PUT/configupdateConfig構成を作成/更新
GET/destinationgetDestinations宛先一覧を取得
POST/destinationcreateDestination宛先を作成
GET/destination/{destination_id}getDestination宛先の詳細を取得
PUT/destination/{destination_id}updateDestination宛先を更新
DELETE/destination/{destination_id}deleteDestination宛先を削除
GET/public_key/{public_key_id}getPublicKey公開キーを取得
GET/subscriptiongetSubscriptionsサブスクリプション一覧を取得
POST/subscriptioncreateSubscriptionサブスクリプションを作成
GET/subscription/{subscription_id}getSubscriptionサブスクリプションの詳細を取得
PUT/subscription/{subscription_id}updateSubscriptionサブスクリプションを更新
DELETE/subscription/{subscription_id}deleteSubscriptionサブスクリプションを削除
POST/subscription/{subscription_id}/disabledisableSubscriptionサブスクリプションを無効化
POST/subscription/{subscription_id}/enableenableSubscriptionサブスクリプションを有効化
POST/subscription/{subscription_id}/filtercreateSubscriptionFilterフィルターを作成
GET/subscription/{subscription_id}/filter/{filter_id}getSubscriptionFilterフィルターの詳細を取得
DELETE/subscription/{subscription_id}/filter/{filter_id}deleteSubscriptionFilterフィルターを削除
POST/subscription/{subscription_id}/testtestSubscriptionサブスクリプションをテスト
GET/topicgetTopicsトピック一覧を取得
GET/topic/{topic_id}getTopicトピックの詳細を取得
トップに戻る