コンテンツへスキップ

Subscriptions API (2.0)

概要

  • Version: 2.0
  • Servers: https://api.xsolla.com/merchant/v2/

このAPIリファレンスでは、サブスクリプション、クーポン、およびプロモーションを管理するためのエンドポイントについて説明します。 サブスクリプションの詳細については、製品ガイドおよび用語集を参照してください。

OpenAPI記述をダウンロード
言語
サーバー
Mock server
https://xsolla.redocly.app/_mock/ja/api/subscriptions/
操作
操作
操作

Subscription management

操作
操作

プロモーション

操作

有効期間の一覧

リクエスト

プロモーションが有効な日付/時刻の範囲を取得します。

通知

APIコールにproject_idパスパラメータが含まれていないため、会社の全プロジェクトで有効なAPIキーを使用して認可を設定する必要があります。

セキュリティ
basicAuth
パス
merchant_idinteger必須

マーチャントID。

promotion_idinteger必須

プロモーションID。

curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/ja/api/subscriptions/merchants/{merchant_id}/promotions/{promotion_id}/periods'

レスポンス

OK。

ボディapplication/json
idinteger
periodsArray of objects

日時範囲。

レスポンス
application/json
{ "id": 17840, "periods": [ {} ] }

有効期間の設定

リクエスト

プロモーションが有効な日付/時刻の範囲を設定します。プロモーションが読み取り専用 (read_only = true) の場合、既存の期間を編集することはできませんが、新しい期間を追加することはできます。

通知

APIコールにproject_idパスパラメータが含まれていないため、会社の全プロジェクトで有効なAPIキーを使用して認可を設定する必要があります。

セキュリティ
basicAuth
パス
merchant_idinteger必須

マーチャントID。

promotion_idinteger必須

プロモーションID。

ボディapplication/json必須
periodsArray of objects

日時範囲。

curl -i -X PUT \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/ja/api/subscriptions/merchants/{merchant_id}/promotions/{promotion_id}/periods' \
  -H 'Content-Type: application/json' \
  -d '{
    "periods": [
      {
        "from": "2019-03-02T00:00:00+04:00",
        "to": "2019-04-02T00:00:00+04:00"
      }
    ]
  }'

レスポンス

No Content (コンテンツなし) 。

プロモーションの見直し

リクエスト

プロモーションを有効にする前に確認する必要があります。このメソッドは、エラーがある場合はそのリストを返します。

通知

APIコールにproject_idパスパラメータが含まれていないため、会社の全プロジェクトで有効なAPIキーを使用して認可を設定する必要があります。

セキュリティ
basicAuth
パス
merchant_idinteger必須

マーチャントID。

promotion_idinteger必須

プロモーションID。

curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/ja/api/subscriptions/merchants/{merchant_id}/promotions/{promotion_id}/review'

レスポンス

OK。

ボディapplication/jsonArray [
componentstring
messagestring
]
レスポンス
application/json
[ { "component": "rewards", "message": "Please select a reward" } ]
操作

Subscription management

操作