/
現在のカートからすべてのカートアイテムを削除
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.
OpenAPI記述をダウンロード
言語
サーバー
Mock server
https://xsolla.redocly.app/_mock/ja/api/shop-builder/
https://store.xsolla.com/api/
個人用カタログ
ユーザー属性に応じたルールを指定することができるAPIです。 ユーザーが具体的なルールの条件をすべて満たした場合、パーソナライズされたアイテムが表示されます。
パーソナライズされたプロモーションについては、プロモーションセクションを参照してください。
購入前に属性を渡すには、Xsolla Login APIを使うか、Pay Station APIを使ってトークンを生成する際にそれをuser.attributesプロパティに渡します。
操作
- Mock serverhttps://xsolla.redocly.app/_mock/ja/api/shop-builder/v2/project/{project_id}/cart
- https://store.xsolla.com/api/v2/project/{project_id}/cart
- 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/44056/cart?currency=USD&locale=en' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'レスポンス
application/json
{ "cart_id": "cart_id", "is_free": false, "items": [ { … } ], "price": { "amount": "6150.0000000000000000", "amount_without_discount": "6150.0000000000000000", "currency": "USD" }, "promotions": [ { … } ] }
- Mock serverhttps://xsolla.redocly.app/_mock/ja/api/shop-builder/v2/project/{project_id}/cart/clear
- https://store.xsolla.com/api/v2/project/{project_id}/cart/clear
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
https://xsolla.redocly.app/_mock/ja/api/shop-builder/v2/project/44056/cart/clear \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'- Mock serverhttps://xsolla.redocly.app/_mock/ja/api/shop-builder/v2/project/{project_id}/cart/fill
- https://store.xsolla.com/api/v2/project/{project_id}/cart/fill
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
https://xsolla.redocly.app/_mock/ja/api/shop-builder/v2/project/44056/cart/fill \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"items": [
{
"quantity": 123,
"sku": "com.xsolla.booster_mega_1"
}
]
}'アイテムの入ったカートは正常に返送されました。
カート価格。
例: {"amount":"6150.0000000000000000","amount_without_discount":"6150.0000000000000000","currency":"USD"}
カート全体に適用されたプロモーション。この配列は、次の場合に返されます:
プロモーションがカート合計金額に影響する場合。例えば、購入割引設定が適用されたプロモーションコード。
プロモーションがボーナスアイテムをカートに追加する場合。
注文レベルに適用されるプロモーションがない場合は、空の配列が返されます。
レスポンス
application/json
{ "cart_id": "cart_id", "is_free": false, "items": [ { … } ], "price": { "amount": "6150.0000000000000000", "amount_without_discount": "6150.0000000000000000", "currency": "USD" }, "promotions": [ { … } ], "warnings": [ { … } ] }