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/ko/api/shop-builder/
https://store.xsolla.com/api/
개인 맞춤형 카탈로그
이 API를 사용하여 사용자 특성에 대한 규칙을 지정할 수 있습니다. 사용자가 구체적인 규칙에 대한 모든 조건을 충족하면 개인 맞춤형 아이템이 표시됩니다.
개인 맞춤형 프로모션에 대한 내용은 프로모션 섹션을 참조하십시오.
구매 전에 특성을 전달하려면 엑솔라 로그인 API를 사용하거나 페이 스테이션 API를 사용하여 토큰을 생성하는 동안 user.attributes 특성으로 특성을 전달할 수 있습니다.
작업
- Mock serverhttps://xsolla.redocly.app/_mock/ko/api/shop-builder/v2/project/{project_id}/promocode/code/{promocode_code}/rewards
- https://store.xsolla.com/api/v2/project/{project_id}/promocode/code/{promocode_code}/rewards
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://xsolla.redocly.app/_mock/ko/api/shop-builder/v2/project/44056/promocode/code/SO6rew99j9/rewards \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'응답
application/json
{ "bonus": [ { … }, { … } ], "discount": { "percent": "10.00" }, "discounted_items": [ { … } ], "is_selectable": true }
- Mock serverhttps://xsolla.redocly.app/_mock/ko/api/shop-builder/v2/project/{project_id}/promocode/redeem
- https://store.xsolla.com/api/v2/project/{project_id}/promocode/redeem
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://xsolla.redocly.app/_mock/ko/api/shop-builder/v2/project/44056/promocode/redeem \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"cart": {
"id": "current"
},
"coupon_code": "SUMMER2021",
"selected_unit_items": {
"game_1": "game_1_steam",
"game_2": "game_2_playstation"
}
}'프로모션 코드를 성공적으로 사용했습니다.
예제: [{"attributes":[],"can_be_bought":{"$ref":"../schemas/Can_be_bought.yaml"},"description":"Take it, take it all! All of Xsolla's riches in one Mega Booster.","groups":[{"external_id":"powerups","name":"Power Ups"}],"image_url":"https://cdn.xsolla.net/img/misc/images/e9f2f4a634bc96ea03b5d5ceadd7c55f.png","is_free":false,"limits":{"$ref":"../schemas/Catalog_item_limits.yaml"},"name":"Xsolla Booster Mega","periods":{"$ref":"../schemas/item-periods.yaml"},"price":{"amount":"50.0000000000000000","amount_without_discount":"100.0000000000000000","currency":"USD"},"promotions":{"$ref":"../schemas/Catalog_item_promotions.yaml"},"quantity":123,"sku":"com.xsolla.booster_mega_1","type":"virtual_good","virtual_item_type":"consumable","virtual_prices":[],"vp_rewards":{"$ref":"../schemas/reward-chain-client/client-item-value-point-reward.yaml"}}]
장바구니 가격입니다.
예제: {"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": "12300.0000000000000000", "currency": "USD" }, "rewards": { "bonus": [ … ], "discount": { … }, "discounted_items": [ … ], "is_selectable": false } }
- Mock serverhttps://xsolla.redocly.app/_mock/ko/api/shop-builder/v2/project/{project_id}/promocode/remove
- https://store.xsolla.com/api/v2/project/{project_id}/promocode/remove
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
https://xsolla.redocly.app/_mock/ko/api/shop-builder/v2/project/44056/promocode/remove \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"cart": {
"id": "current"
}
}'프로모션 코드를 성공적으로 취소했습니다.
예제: [{"attributes":[],"can_be_bought":true,"description":"Take it, take it all! All of Xsolla's riches in one Mega Booster.","groups":[{"external_id":"powerups","name":"Power Ups"}],"image_url":"https://cdn.xsolla.net/img/misc/images/e9f2f4a634bc96ea03b5d5ceadd7c55f.png","is_free":false,"limits":{"per_user":{"available":3,"recurrent_schedule":{"interval_type":"weekly","reset_next_date":1746057600},"total":5}},"name":"Xsolla Booster Mega","periods":[{"date_from":"2020-08-11T10:00:00+03:00","date_until":"2020-08-11T20:00:00+03:00"}],"price":{"amount":"50.0000000000000000","amount_without_discount":"100.0000000000000000","currency":"USD"},"promotions":[{"bonus":[{"image_url":"https://cdn.xsolla.net/img/misc/images/2fc5c491a47413a8e8000447889093c2.png","name":"Xsolla Minigun","quantity":1,"sku":"com.xsolla.minigun_1","type":"virtual_good"}],"date_end":"2026-04-15T16:16:00+03:00","date_start":"2020-04-15T16:16:00+03:00","discount":{"percent":"50.00"},"name":"Bonus promotion"}],"quantity":123,"sku":"com.xsolla.booster_mega_1","type":"virtual_good","virtual_item_type":"consumable","virtual_prices":[],"vp_rewards":[{"amount":130,"image_url":"https://cdn3.xsolla.com/img/misc/images/54c0cf9d345817cdacfdde198db178e0.jpg","item_id":175232,"name":"Value point","sku":"com.xsolla.value_point_1"},{"amount":50,"image_url":"https://cdn3.xsolla.com/img/misc/images/54c0cf9d345817cdacfdde198db178e0.jpg","is_clan":true,"item_id":186321,"name":"Clan Reward VP 1","sku":"com.xsolla.clan_value_point_1"}]}]
응답
application/json
{ "cart_id": "cart_id", "is_free": false, "items": [ { … } ], "price": { "amount": "6150.0000000000000000", "amount_without_discount": "6150.0000000000000000", "currency": "USD" } }