# 서버 리스트 연동

사용자가 원웹샵 상세 화면에 진입 시, 실시간으로 게임 서버 목록을 조회하여 노출합니다.

{% hint style="info" %}
아이템을 특정 서버로 지급해야 하는 경우, 개발사는 서버 목록 조회 API를 제공해야 합니다. \
API는 원웹샵 상세 화면에서 실시간으로 호출되며, 사용자가 서버를 선택해 구매하면 서버 정보가 PNS로 함께 전달됩니다.

단, 서버 목록은 타이틀 등록 시 `개발자센터 > 웹샵 > 기본정보 > 구매입력정보` 를 `구매식별자 + 서버`로 설정한 경우에만 사용자에게 표시됩니다.
{% endhint %}

#### **Request URI**

{% hint style="warning" %}
**유의사항**

원웹샵 보안 정책에 따라 **HTTPS 프로토콜 및 443 Port**만 지원하며, 그 외 규격 사용 시 정상 동작하지 않을 수 있습니다.
{% 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>수신 받을 서버 URL은 <code>개발자센터 > 웹샵 > 연동 관리</code> 메뉴에서 등록할 수 있습니다. 설정 방법은 <a href="/pages/4ej8isEhY9UMZWACKAs8">연동 관리</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>원스토어 웹샵 타이틀 ID(상품 ID)</td></tr><tr><td><code>signature</code></td><td>String</td><td>M</td><td><p>위변조 방지를 위한 서명</p><ul><li>서명키는 <code>개발자센터 > 연동 관리 > 라이선스 관리</code> 메뉴에서 확인할 수 있습니다.</li><li><a href="/pages/oRU887QZeredzPY8ym9m#id-07.pns-pushnotificationservice-signature">Signature 검증 방법</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><p>"0000": 성공</p><p>"2000": 오류 </p></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>서버 이름<br></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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
