コンテンツへスキップ

Digital Distribution Hub (1.0.0)

概要

Digital Distribution Hubは、プッシュペイメント技術やEコマースを介して、デジタルとキャッシュベースの決済を結びつけることを目的とした、エクソラの新しいソリューションです。

この参照は、以下の2つエクソラ製品のAPIエンドポイントを組み合わせたものです:ゲーム内ストア決済ステーション。2つのベースURLがあります:

  • 一般カタログカート、及び注文グループの場合は https://store.xsolla.com/api
  • 通知グループの場合は、https://ps.xsolla.com

カタロググループのAPIエンドポイントは認証を必要としません。

カート注文グループの操作を行うには、ユーザートークンを作成するを介してトークンを生成する必要があります。

注意

この参照は、将来のAPIのデザインを示すものであり、完全に機能するインターフェースではありません。現在は、カタログおよび通知グループのエンドポイントのみを試すことができます。ご意見をお聞かせいただける場合は、techdoc@xsolla.comまでご連絡ください。
OpenAPI記述をダウンロード
言語
サーバー
https://store.xsolla.com/api/
Mock server
https://xsolla.redocly.app/_mock/ja/api/digital-distribution-hub/
操作

カートにアイテムを入れる

リクエスト

カートにアイテムを入れます。カートに同じSKUのアイテムがすでにある場合、既存のアイテムは渡された値で置き換えられます。

セキュリティ
AuthForClient
パス
project_idinteger必須

プロジェクトID。

例: 44056
ボディapplication/json
currencystring(Cart-Payment_settings_currency)

標準の決済通貨。ISO 42173文字通貨コード。

itemsArray of objects必須

アイテムのリスト。

items[].​quantitynumber必須
デフォルト 123
items[].​skustring必須
デフォルト "booster_mega_1"
curl -i -X PUT \
  https://store.xsolla.com/api/v2/project/44056/cart/fill \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "quantity": 123,
      "sku": "booster_mega_1"
    }
  ]'

レスポンス

アイテムの入ったカートは正常に返却されました。

ボディapplication/json
cart_idstring

カートID。

例: "cart_id"
is_freeboolean

trueの場合、カートは無料です。

itemsArray of objects(Cart_inline_response_200_items)
items[].​attributesArray of objects(Cart_client-attributes)

アイテムに対応する属性とその値のリスト。カタログのフィルタリングに使用できます。

デフォルト []
例: {"value":{"external_id":"genre","name":"Жанр","values":[{"external_id":"genre_e3364991f92e751689a68b96598a5a5a84010b85","value":"Casual"},{"external_id":"genre_eba07bfd0f982940773cba3744d97264dd58acd7","value":"Strategy"},{"external_id":"genre_b8d0c6d8f0524c2b2d79ebb93aa3cd0e8b5199a8","value":"Mobile"}]}}
items[].​attributes[].​external_idstring(Cart_admin-attribute-external_id)[ 1 .. 255 ] characters^[a-zA-Z0-9-_]+$

一意の属性ID。external_idには、小文字のラテン英数字、ダッシュ、およびアンダースコアのみを含めることができます。

例: "attribute_1"
items[].​attributes[].​namestring

属性の名前。

例: "Genre"
items[].​attributes[].​valuesArray of objects
items[].​attributes[].​values[].​external_idstring(Cart_value-external_id)[ 1 .. 255 ] characters^[-_.\d\w]+$

属性の一意の値ID。external_idには、小文字のラテン英数字、ダッシュ、およびアンダースコアのみを含めることができます。

例: "attribute_value"
items[].​attributes[].​values[].​valuestring

属性の値。

例: "Strategy"
items[].​descriptionstring
items[].​groupsArray of objects(Cart_inline_response_200_groups)
items[].​groups[].​external_idstring
items[].​groups[].​namestring
items[].​image_urlstring
items[].​is_freeboolean
items[].​namestring or null
items[].​quantityinteger
items[].​skustring
items[].​typestring
priceobject or null(Cart_inline_response_200_price)

カートの価格。

例: "{\"amount\":\"6150.0000000000000000\",\"amount_without_discount\":\"6150.0000000000000000\",\"currency\":\"USD\"}"
price.​amountstring
デフォルト "50.0000000000000000"
price.​amount_without_discountstring
デフォルト "100.0000000000000000"
price.​currencystring
デフォルト "USD"
warningsArray of objects(Cart_inline_response_200_1_warnings)
例: [{"attributes":[],"description":"Take it, take it all! All of Xsollas riches in one Mega Booster.","groups":[{"external_id":"powerups","name":"Power Ups"}],"image_url":"https://cdn.xsolla.net/img/misc/images/e9f2f4a634bc96ea03b5d5ceadd7c55f.png","inventory_options":{"consumable":{"usages_count":1}},"is_free":false,"name":"Xsolla Booster Mega","price":{"amount":"50.0000000000000000","amount_without_discount":"100.0000000000000000","currency":"USD"},"quantity":123,"sku":"booster_mega_1","type":"virtual_good","virtual_item_type":"consumable","virtual_prices":[]}]
warnings[].​errorCodeinteger
warnings[].​errorMessagestring
warnings[].​quantityinteger
warnings[].​skustring
レスポンス
application/json
{ "cart_id": "cart_id", "is_free": false, "items": [ {} ], "price": { "amount": "6150.0000000000000000", "amount_without_discount": "6150.0000000000000000", "currency": "USD" }, "warnings": [ {} ] }

現在のカートからカートアイテムを削除する

リクエスト

カートからアイテムを削除します。

セキュリティ
AuthForClient
パス
project_idinteger必須

プロジェクトID。

例: 44056
item_skustring必須

アイテムSKU。

例: booster_mega_1
curl -i -X DELETE \
  https://store.xsolla.com/api/v2/project/44056/cart/item/booster_mega_1 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

レスポンス

カートのアイテムは正常に削除されました。

レスポンス
コンテンツなし

現在のカートからカートアイテムを更新します

リクエスト

既存のカートアイテムを更新するか、カート内にアイテムを作成します。

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

プロジェクトID。

例: 44056
item_skustring必須

アイテムSKU。

例: booster_mega_1
ボディapplication/json
currencystring(Cart-Payment_settings_currency)

標準の決済通貨。ISO 42173文字通貨コード。

quantitynumber

アイテム数量。

デフォルト 123
curl -i -X PUT \
  -u <username>:<password> \
  https://store.xsolla.com/api/v2/project/44056/cart/item/booster_mega_1 \
  -H 'Content-Type: application/json' \
  -d '{
    "currency": "string",
    "quantity": 123
  }'

レスポンス

カートは正常に更新されました。

レスポンス
コンテンツなし
操作

仮想アイテム & 通貨

操作
操作

ユーザートークン

操作
操作
操作