> 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/tools/webshop/server.md).

# 서버 리스트 연동

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

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

단, 서버 목록은 `ONEconsole > 웹샵 > 개발자 > 플레이어 식별 필드` 메뉴에서 식별 필드 타입을 `서버 리스트`로 설정한 경우에만 사용자에게 표시됩니다.
{% endhint %}

#### **Request URI**

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

ONEshop 보안 정책에 따라 **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>ONEconsole > 웹샵 > 개발자 > 서버 연동</code> 메뉴에서 등록할 수 있습니다. 설정 방법은 <a href="/dev/webshop/integration.md">연동 관리</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>Signature 검증 방법 가이드</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": "ONEshop(WS00000001) servers retrieved successfully"
  },
  "serverList": [
    {
      "serviceServerId": "asia01",
      "serviceServerName": "아시아 서버"
    },
    {
      "serviceServerId": "north_america01",
      "serviceServerName": "북미 서버"
    },
    {
      "serviceServerId": "europe01",
      "serviceServerName": "유럽 서버"
    },
    {
      "serviceServerId": "africa01",
      "serviceServerName": "아프리카 서버"
    }
  ]
}
```
