- SKUによる販売可能なアイテムを取得する
Shop Builder API (2.0.0)
- Version: 2.0.0
- Servers:
https://store.xsolla.com/api - Contact Us by Email
- Contact URL: https://xsolla.com/
- Required TLS version: 1.2
Shop Builder API provides a third-party solution for implementing the server side for your store interface. Use the endpoints to manage in-game items, in-game currencies, cart, player inventory, promotions, game library, etc.
個人用カタログ
ユーザー属性に応じたルールを指定することができるAPIです。 ユーザーが具体的なルールの条件をすべて満たした場合、パーソナライズされたアイテムが表示されます。
パーソナライズされたプロモーションについては、プロモーションセクションを参照してください。
購入前に属性を渡すには、Xsolla Login APIを使うか、Pay Station APIを使ってトークンを生成する際にそれをuser.attributesプロパティに渡します。
リクエスト
IDによる販売可能なアイテムを取得します。
このエンドポイントは認証なしでアクセスでき、一般的なデータを返します。しかし、認証は、利用可能なユーザー制限やプロモーションのような、パーソナライズされた結果のためのユーザー固有の詳細で応答の質を高めます。
- Mock serverhttps://xsolla.redocly.app/_mock/ja/api/shop-builder/v2/project/{project_id}/items/id/{item_id}
- https://store.xsolla.com/api/v2/project/{project_id}/items/id/{item_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://xsolla.redocly.app/_mock/ja/api/shop-builder/v2/project/59080/items/id/259774?promo_code=WINTER2021&show_inactive_time_limited_items=1&additional_fields%5B%5D=media_list' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'販売可能なアイテムが正常に受信されました。
アイテムに対応する属性と値のリスト。カタログのフィルタリングに使用できます。
アイテムが所属するグループ。
画像URL。
カート内の特定アイテムに適用されるプロモーション。この配列は、以下のケースで返されます:
特定のアイテムに対して、割引キャンペーンが構成されている場合。
選択されたアイテムの割引設定を持つプロモーションコードが適用された場合。
アイテムレベルのプロモーションが適用されない場合は、空の配列が返されます。
アイテムタイプ:virtual_good/virtual_currency/bundle/game_key/physical_good。
仮想アイテムタイプ。
| 列挙型 値 | 説明 |
|---|---|
| consumable | 使用後にインベントリから消えるアイテム(例:弾丸)。 |
| non_consumable | 無期限でインベントリに保管できるアイテム。 |
| non_renewing_subscription | 期間限定のサービスやコンテンツへのアクセスを表すことができる時間制限のあるアイテム。 |
{ "attributes": [], "can_be_bought": true, "custom_attributes": { "attr": "value", "purchased": 0 }, "description": "Electric shield", "groups": [ { … } ], "image_url": "https://cdn3.xsolla.com/img/misc/images/d2d6b1b517e6a7f3765c3bb5a3cfb87d.png", "is_free": false, "item_id": 259774, "limits": { "per_user": { … } }, "name": "Electric shield", "price": { "amount": "9.99", "amount_without_discount": "9.99", "currency": "USD" }, "promotions": [ { … } ], "sku": "com.xsolla.electric_shield_1", "type": "virtual_good", "virtual_item_type": "non_consumable", "virtual_prices": [ { … }, { … }, { … } ], "vp_rewards": [ { … }, { … } ] }
リクエスト
カタログを作成するためにSKUによる販売可能なアイテムを取得します。
このエンドポイントは認証なしでアクセスでき、一般的なデータを返します。しかし、認証は、利用可能なユーザー制限やプロモーションのような、パーソナライズされた結果のためのユーザー固有の詳細で応答の質を高めます。
- Mock serverhttps://xsolla.redocly.app/_mock/ja/api/shop-builder/v2/project/{project_id}/items/sku/{sku}
- https://store.xsolla.com/api/v2/project/{project_id}/items/sku/{sku}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://xsolla.redocly.app/_mock/ja/api/shop-builder/v2/project/59080/items/sku/electric_shield?promo_code=WINTER2021&show_inactive_time_limited_items=1&additional_fields%5B%5D=media_list' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'販売可能なアイテムが正常に受信されました。
アイテムに対応する属性と値のリスト。カタログのフィルタリングに使用できます。
アイテムが所属するグループ。
画像URL。
カート内の特定アイテムに適用されるプロモーション。この配列は、以下のケースで返されます:
特定のアイテムに対して、割引キャンペーンが構成されている場合。
選択されたアイテムの割引設定を持つプロモーションコードが適用された場合。
アイテムレベルのプロモーションが適用されない場合は、空の配列が返されます。
アイテムタイプ:virtual_good/virtual_currency/bundle/game_key/physical_good。
仮想アイテムタイプ。
| 列挙型 値 | 説明 |
|---|---|
| consumable | 使用後にインベントリから消えるアイテム(例:弾丸)。 |
| non_consumable | 無期限でインベントリに保管できるアイテム。 |
| non_renewing_subscription | 期間限定のサービスやコンテンツへのアクセスを表すことができる時間制限のあるアイテム。 |
{ "attributes": [], "can_be_bought": true, "custom_attributes": { "attr": "value", "purchased": 0 }, "description": "Electric shield", "groups": [ { … } ], "image_url": "https://cdn3.xsolla.com/img/misc/images/d2d6b1b517e6a7f3765c3bb5a3cfb87d.png", "is_free": false, "item_id": 259774, "limits": { "per_user": { … } }, "name": "Electric shield", "price": { "amount": "9.99", "amount_without_discount": "9.99", "currency": "USD" }, "promotions": [ { … } ], "sku": "com.xsolla.electric_shield_1", "type": "virtual_good", "virtual_item_type": "non_consumable", "virtual_prices": [ { … }, { … }, { … } ], "vp_rewards": [ { … }, { … } ] }