Xsolla-logoXsolla Developers
前往发布商帐户

按ID获取可售商品Client-side

get/v2/project/{project_id}/items/id/{item_id}

Gets a sellable item by its ID.

Note

This endpoint, accessible without authorization, returns generic data. However, authorization enriches the response with user-specific details for a personalized result, such as available user limits and promotions.
SecurityXsollaLoginUserJWT
Request
path Parameters
project_id
required
integer

项目ID。您可以在您的发布商帐户项目名称旁边找到。

Example: 59080
item_id
required
string

物品ID。

Example: 259774
query Parameters
promo_code
string [ 1 .. 128 ] characters

区分大小写的唯一券码。包含字母和数字。

Example: promo_code=WINTER2021
show_inactive_time_limited_items
integer
Default: 0

显示用户不可用的时效性商品。此类商品的有效期尚未开始或已过期。

Example: show_inactive_time_limited_items=1
Responses
200

已成功接收可售商品。

404

未找到商品。请确保project_iditem_id正确无误。

Request samples
curl -i -X GET \
  'https://store.xsolla.com/api/v2/project/{project_id}/items/id/{item_id}?promo_code=WINTER2021&show_inactive_time_limited_items=1' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'
Response samples
application/json
{}