> For the complete documentation index, see [llms.txt](https://onestore-dev.gitbook.io/dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://onestore-dev.gitbook.io/dev/chi/tools/webshop/server.md).

# 服务器列表联动

当用户进入 ONE webshop 详情页时，Webshop 会实时查询并展示游戏服务器列表。

{% hint style="info" %}
若道具需发放至特定服务器，开发者必须提供服务器列表查询 API。该 API 会在详情页实时调用，用户选择服务器并完成购买后，服务器信息会随 PNS 一同传递。

仅当在标题注册中将以下字段设置为：\
`Developer Center > Webshop > Main Info > Purchase Input Information` = `Purchase Identifier + Server`时，服务器列表才会向用户显示。
{% endhint %}

#### **Request URI**

{% hint style="warning" %}
**注意事项**\
根据 ONE webshop 的安全策略，**仅支持 HTTPS 协议及 443 端口**，使用其他规格可能无法正常运行。
{% endhint %}

<table data-header-hidden><thead><tr><th width="184.9678955078125"></th><th></th></tr></thead><tbody><tr><td><strong>HTTP Type</strong></td><td>HTTPS</td></tr><tr><td><strong>HTTP Method</strong></td><td><mark style="color:$primary;"><code>POST</code></mark></td></tr><tr><td><strong>URL</strong></td><td>可在 <code>Developer Center > Webshop > Integration Mgmt.</code> 中注册要接收通知的服务器 URL。<br>详细设置方法请参考《<a href="/pages/N0EqKOKMSm8CJ3EVdrDg">Integration Management Guide</a>》。</td></tr><tr><td><strong>Header</strong></td><td><p>Content-Type: application/json; charset=UTF-8</p><p>Accept: application/json</p></td></tr></tbody></table>

#### **Request**

<table><thead><tr><th width="195.8836669921875">Name</th><th width="124.5450439453125">Type</th><th width="123.193603515625">Mandatory</th><th>Description</th></tr></thead><tbody><tr><td><code>param.clientId</code></td><td>String</td><td>M</td><td>ONE webshop 标题 ID（商品 ID）</td></tr><tr><td><code>signature</code></td><td>String</td><td>M</td><td><p>用于防止篡改的签名 (License Key)</p><ul><li>使用下面的指南，您可以检查 signature 是否被强制生成或伪造。<br>签名密钥可在 <code>Developer Center > Integration Mgmt. > Settings for Licensing</code> 菜单中查看</li><li>Guide : <a href="https://onestore-dev.gitbook.io/dev/chi/tools/webshop/billing#id-shi-yong-pnspushnotificationservicesignature-yan-zheng-fang-fa">Signatue验证方法</a> </li></ul></td></tr></tbody></table>

**Example**

```
curl -X POST "https://example.com/server-list" \
  -H "Content-Type: application/json; charset=UTF-8" \
  -H "Accept: application/json" \
  -d '{
    "param": {
      "clientId": "WS00000001"
     },
    "signature": "ajkfl;askfjkladfjksl"
  }'
```

#### **Response**

<table><thead><tr><th width="288.869873046875">Name</th><th width="124.5450439453125">Type</th><th width="121.3316650390625">Mandatory</th><th>Description</th></tr></thead><tbody><tr><td><code>result.code</code></td><td>String</td><td>M</td><td>"0000"：成功<br>"2000"：错误</td></tr><tr><td><code>result.message</code></td><td>String</td><td>M</td><td></td></tr><tr><td><code>serverList[]</code></td><td>List</td><td>M</td><td>服务器列表</td></tr><tr><td><code>serverList[].serviceServerName</code></td><td>String</td><td>M</td><td><p>服务器名称</p><ul><li>向用户显示的服务器名称。</li><li>建议以适合目标用户的语言提供该值。</li></ul></td></tr><tr><td><code>serverList[].serviceServerId</code></td><td>String</td><td>M</td><td>服务器 ID</td></tr></tbody></table>

**Example**

```
{
  "result": {
    "code": "0000",
    "message": "Onestore Webshop(WS00000001) servers retrieved successfully"
  },
  "serverList": [
    {
      "serviceServerId": "asia01",
      "serviceServerName": "아시아 서버"
    },
    {
      "serviceServerId": "north_america01",
      "serviceServerName": "북미 서버"
    },
    {
      "serviceServerId": "europe01",
      "serviceServerName": "유럽 서버"
    },
    {
      "serviceServerId": "africa01",
      "serviceServerName": "아프리카 서버"
    }
  ]
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://onestore-dev.gitbook.io/dev/chi/tools/webshop/server.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
