# Inquiry History

***

## **➊ List of customer tickets**

{% hint style="info" %}
This API retrieves the list of tickets submitted by a customer.
{% endhint %}

{% hint style="danger" %}
The product system must provide the **ID (`userCode`)** as a required path parameter.\
The API returns the list of tickets associated with the specified user ID.
{% endhint %}

#### **(1) Interface Description**

* URL: https\://{domain}.oc.nhncloud.com/{serviceId}/openapi/v1/ticket/enduser/{usercode}/list.json
* URL(Beta Test Environment) : https\://{domain}.oc.beta-nhncloud.com/{serviceId}/openapi/v1/ticket/enduser/{usercode}/list.json
* URL(Development Test Environment) : https\://{domain}.oc.alpha-nhncloud.com/{serviceId}/openapi/v1/ticket/enduser/{usercode}/list.json

| Interface Name               | Protocol | Request Format | Encoding | Response Format | Interface Description          | Access Required       |
| ---------------------------- | -------- | -------------- | -------- | --------------- | ------------------------------ | --------------------- |
| **List of customer tickets** | HTTPS    | GET            | UTF-8    | JSON            | 검색 조건을 통해 조건에 맞는 고객의 티켓 리스트 노출 | Common Authentication |

***

#### **(2) Request Parameter**

| Name               | Field (Parameter) | Type    | Location | Required | Description                                                                                                                                                                       |
| ------------------ | ----------------- | ------- | -------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Service ID**     | serviceId         | String  | path     | O        | *Service ID* configured in the URL path                                                                                                                                           |
| **Usercode**       | usercode          | String  | path     | O        | *Usercode(Unique)* configured in the URL path                                                                                                                                     |
| **Category ID**    | categoryId        | Integer | query    | X        | Category(Submission type) ID                                                                                                                                                      |
| **Ticket status**  | status            | String  | query    | X        | <p>Ticket Status<br><br>(<code>new</code>: Unassigned, <code>open</code>: In progress, <code>reply</code>: Pending, <code>solved</code>: Solved, <code>closed</code>: Closed)</p> |
| **Language**       | language          | String  | query    | X        | Default helpcenter language of the service                                                                                                                                        |
| **Channel**        | source            | String  | query    | X        | 문의 채널(web: PC웹, spweb: 모바일 웹, api: API. 복수의 채널 조회 시 콤마로 구분하여 사용(예: web,spweb,api). 기본 값은 web,spweb,api                                                                            |
| **Sort order**     | sort              | String  | query    | X        | 정렬 순서(기본값: updatedDt:desc; 정렬 형식: 오름차순:asc, 내림차순:desc)                                                                                                                            |
| **Page**           | page              | Integer | query    | X        | Default value: `1`                                                                                                                                                                |
| **Items per page** | pageSize          | Integer | query    | X        | Default value: `10`; max=`200`                                                                                                                                                    |

***

#### **(3) Response data**

| Name                | Field (Parameter) | Type    | Description                                                                                                                                                                       |
| ------------------- | ----------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **result.contents** | ticketId          | String  | Ticket ID                                                                                                                                                                         |
|                     | subject           | String  | Ticket title                                                                                                                                                                      |
|                     | categoryId        | Integer | Submission type ID                                                                                                                                                                |
|                     | categoryName      | String  | Submission type Name                                                                                                                                                              |
|                     | categoryFullName  | String  | Submission type depth (Each depth is separated by the “>” symbol.)                                                                                                                |
|                     | status            | String  | <p>Ticket Status<br><br>(<code>new</code>: Unassigned, <code>open</code>: In progress, <code>reply</code>: Pending, <code>solved</code>: Solved, <code>closed</code>: Closed)</p> |
|                     | statusName        | String  | Ticket status name                                                                                                                                                                |
|                     | createdDt         | Long    | Created date                                                                                                                                                                      |
|                     | updatedDt         | Long    | Updated date                                                                                                                                                                      |
|                     | displayDt         | String  | Displayed date (yyyy.MM.dd)                                                                                                                                                       |
| **result**          | total             | Integer | Total                                                                                                                                                                             |
|                     | pages             | Integer | Total pages                                                                                                                                                                       |
|                     | pageNum           | Integer | Current page                                                                                                                                                                      |
|                     | pageSize          | Integer | Items per page                                                                                                                                                                    |

***

#### **(4) Response Body**

```json
{       
  "header": {       
    "resultCode": 200,      
    "resultMessage": "",        
    "isSuccessful": true        
  },        
  "result": {       
    "contents": [       
      {     
        "ticketId": "T1658213182227yb9hI",      
        "subject": "유형11",      
        "categoryId": 2542,     
        "categoryName": "유형1-1-1-1-1",      
        "categoryFullName": "유형1>유형1-1>유형1-1-1>유형1-1-1-1>유형1-1-1-1-1",      
        "status": "reply",      
        "statusName": "추가 확인",      
        "content": null,        
        "createdDt": 1658213182000,     
        "updatedDt": 1658215682000,     
        "contents": null,       
        "attachments": null,        
        "displayDt": "2022.07.19"       
      },        
      {     
        "ticketId": "T16582131010751o8BM",      
        "subject": "유형10",      
        "categoryId": 2542,     
        "categoryName": "유형1-1-1-1-1",      
        "categoryFullName": "유형1>유형1-1>유형1-1-1>유형1-1-1-1>유형1-1-1-1-1",      
        "status": "solved",     
        "statusName": "답변 완료",      
        "content": null,        
        "createdDt": 1658213101000,     
        "updatedDt": 1658215702000,     
        "contents": null,       
        "attachments": null,        
        "displayDt": "2022.07.19"       
      },        
      {     
        "ticketId": "T1658213078429EFmxm",      
        "subject": "유형9",       
        "categoryId": 2542,     
        "categoryName": "유형1-1-1-1-1",      
        "categoryFullName": "유형1>유형1-1>유형1-1-1>유형1-1-1-1>유형1-1-1-1-1",      
        "status": "closed",     
        "statusName": "최종 완료",      
        "content": null,        
        "createdDt": 1658213078000,     
        "updatedDt": 1658215720000,     
        "contents": null,       
        "attachments": null,        
        "displayDt": "2022.07.19"       
      },        
      {     
        "ticketId": "T1658213060072Witj6",      
        "subject": "유형8",       
        "categoryId": 2542,     
        "categoryName": "유형1-1-1-1-1",      
        "categoryFullName": "유형1>유형1-1>유형1-1-1>유형1-1-1-1>유형1-1-1-1-1",      
        "status": "open",       
        "statusName": "문의 확인",      
        "content": null,        
        "createdDt": 1658213060000,     
        "updatedDt": 1658215646000,     
        "contents": null,       
        "attachments": null,        
        "displayDt": "2022.07.19"       
      },        
      {     
        "ticketId": "T1658212816320fVxqS",      
        "subject": "유형7",       
        "categoryId": 2542,     
        "categoryName": "유형1-1-1-1-1",      
        "categoryFullName": "유형1>유형1-1>유형1-1-1>유형1-1-1-1>유형1-1-1-1-1",      
        "status": "new",        
        "statusName": "접수 완료",      
        "content": null,        
        "createdDt": 1658212816000,     
        "updatedDt": 1658212816000,     
        "contents": null,       
        "attachments": null,        
        "displayDt": "2022.07.19"       
      },        
      {     
        "ticketId": "T1658211072628h00Qf",      
        "subject": "유형6",       
        "categoryId": 2542,     
        "categoryName": "유형1-1-1-1-1",      
        "categoryFullName": "유형1>유형1-1>유형1-1-1>유형1-1-1-1>유형1-1-1-1-1",      
        "status": "new",        
        "statusName": "접수 완료",      
        "content": null,        
        "createdDt": 1658211073000,     
        "updatedDt": 1658211073000,     
        "contents": null,       
        "attachments": null,        
        "displayDt": "2022.07.19"       
      },        
      {     
        "ticketId": "T1658211058049HP1U0",      
        "subject": "유형5",       
        "categoryId": 2542,     
        "categoryName": "유형1-1-1-1-1",      
        "categoryFullName": "유형1>유형1-1>유형1-1-1>유형1-1-1-1>유형1-1-1-1-1",      
        "status": "new",        
        "statusName": "접수 완료",      
        "content": null,        
        "createdDt": 1658211058000,     
        "updatedDt": 1658211058000,     
        "contents": null,       
        "attachments": null,        
        "displayDt": "2022.07.19"       
      },        
      {     
        "ticketId": "T165821104308563aoM",      
        "subject": "유형4",       
        "categoryId": 2542,     
        "categoryName": "유형1-1-1-1-1",      
        "categoryFullName": "유형1>유형1-1>유형1-1-1>유형1-1-1-1>유형1-1-1-1-1",      
        "status": "new",        
        "statusName": "접수 완료",      
        "content": null,        
        "createdDt": 1658211043000,     
        "updatedDt": 1658211043000,     
        "contents": null,       
        "attachments": null,        
        "displayDt": "2022.07.19"       
      },        
      {     
        "ticketId": "T1658211028245FwMKd",      
        "subject": "유형3",       
        "categoryId": 2542,     
        "categoryName": "유형1-1-1-1-1",      
        "categoryFullName": "유형1>유형1-1>유형1-1-1>유형1-1-1-1>유형1-1-1-1-1",      
        "status": "new",        
        "statusName": "접수 완료",      
        "content": null,        
        "createdDt": 1658211028000,     
        "updatedDt": 1658211028000,     
        "contents": null,       
        "attachments": null,        
        "displayDt": "2022.07.19"       
      },        
      {     
        "ticketId": "T1658211012753VCyy2",      
        "subject": "유형2",       
        "categoryId": 2542,     
        "categoryName": "유형1-1-1-1-1",      
        "categoryFullName": "유형1>유형1-1>유형1-1-1>유형1-1-1-1>유형1-1-1-1-1",      
        "status": "new",        
        "statusName": "접수 완료",      
        "content": null,        
        "createdDt": 1658211013000,     
        "updatedDt": 1658211013000,     
        "contents": null,       
        "attachments": null,        
        "displayDt": "2022.07.19"       
      }     
    ],      
    "total": 12,        
    "pages": 2,     
    "pageNum": 1,       
    "pageSize": 10      
  }     
}
```

***

## **➋ Ticket Details**

{% hint style="info" %}
This API retrieves detailed information for the selected ticket, including the inquiry content and processing details.
{% endhint %}

{% hint style="danger" %}
You must provide the **ticket ID (`ticketId`)** of the ticket selected from the **➊ List of Customer tickets.** The API then returns the detailed information for the specified ticket.
{% endhint %}

#### **(1) Interface description**

* URL: https\://{domain}.oc.nhncloud.com/{serviceId}/openapi/v1/ticket/enduser/{usercode}/{ticketId}/detail.json
* URL(Beta Test Environment) : https\://{domain}.oc.beta-nhncloud.com/{serviceId}/openapi/v1/ticket/enduser/{usercode}/{ticketId}/detail.json
* URL(Development Test Environment) : https\://{domain}.oc.alpha-nhncloud.com/{serviceId}/openapi/v1/ticket/enduser/{usercode}/{ticketId}/detail.json

| Interface Name     | Protocol | Request Format | Encoding | Response Format | Interface Description                         | Access Required       |
| ------------------ | -------- | -------------- | -------- | --------------- | --------------------------------------------- | --------------------- |
| **Ticket details** | HTTPS    | GET            | UTF-8    | JSON            | Retrieves detailed information for the ticket | Common Authentication |

***

#### **(2) Request parameter**

<table><thead><tr><th width="134">Name</th><th width="125">Field (Parameter)</th><th width="116">Type</th><th width="101">Location</th><th width="66">Required</th><th>Description</th></tr></thead><tbody><tr><td><strong>Service ID</strong></td><td>serviceId</td><td>String</td><td>path</td><td>O</td><td><em>Service ID</em> configured in the URL path</td></tr><tr><td><strong>ID</strong></td><td>usercode</td><td>String</td><td>path</td><td>O</td><td>User ID (User unique ID</td></tr><tr><td><strong>Ticket ID</strong></td><td>ticketId</td><td>String</td><td>path</td><td>O</td><td>Ticket ID</td></tr><tr><td><strong>Language</strong></td><td>language</td><td>String</td><td>query</td><td>X</td><td>Default helpcenter language of the service</td></tr></tbody></table>

***

#### **(3) Response data**

| Name               | Field (Parameter)                 | Type    | Description                                                                                                                                                                       |
| ------------------ | --------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **result.content** | ticketId                          | String  | Ticket ID                                                                                                                                                                         |
|                    | subject                           | String  | Service ID                                                                                                                                                                        |
|                    | categoryId                        | Integer | Category(Submission type) ID                                                                                                                                                      |
|                    | categoryName                      | String  | Category name                                                                                                                                                                     |
|                    | categoryFullName                  | String  | Category depth (Each depth is separated by the “>” symbol.)                                                                                                                       |
|                    | status                            | String  | <p>Ticket status<br><br>(<code>new</code>: Unassigned, <code>open</code>: In progress, <code>reply</code>: Pending, <code>solved</code>: Solved, <code>closed</code>: Closed)</p> |
|                    | statusName                        | String  | Ticket status name                                                                                                                                                                |
|                    | content                           | String  | Contents                                                                                                                                                                          |
|                    | createdDt                         | Long    | Created date                                                                                                                                                                      |
|                    | updatedDt                         | Long    | Updated date                                                                                                                                                                      |
|                    | contents                          | Array   | 티켓 상세 내용                                                                                                                                                                          |
|                    | contents.content                  | String  | 내용 상세                                                                                                                                                                             |
|                    | contents.type                     | String  | 문의 유형. enduser: 문의(접수 완료), csuser: 답변(접수 완료)                                                                                                                                      |
|                    | contents.typeName                 | String  | 내용 유형 명                                                                                                                                                                           |
|                    | contents.createdDt                | Long    | 티켓 처리 시간                                                                                                                                                                          |
|                    | contents.displayDt                | String  | 내용 노출 시간(yyyy.MM.dd)                                                                                                                                                              |
|                    | contents.attachments              | Array   | 티켓 처리 내용 첨부파일                                                                                                                                                                     |
|                    | contents.attachments.attachmentId | String  | 티켓 처리 내용 첨부파일 ID                                                                                                                                                                  |
|                    | contents.attachments.fileName     | String  | 티켓 처리 내용 첨부파일 명                                                                                                                                                                   |
|                    | contents.attachments.contentType  | String  | 티켓 처리 내용 첨부파일 유형                                                                                                                                                                  |
|                    | contents.attachments.disposition  | String  | 티켓 처리 내용 첨부파일 처리 방식(attachment: 첨부파일)                                                                                                                                             |
|                    | contents.attachments.size         | Long    | 티켓 처리 내용 첨부파일 사이즈                                                                                                                                                                 |
|                    | contents.attachments.createdDt    | Long    | 티켓 처리 내용 첨부파일 업로드 시간                                                                                                                                                              |
|                    | attachments                       | Array   | 티켓 문의 첨부파일                                                                                                                                                                        |
|                    | attachments.attachmentId          | String  | 티켓 문의 첨부파일 ID                                                                                                                                                                     |
|                    | attachments.fileName              | String  | 티켓 문의 첨부파일 명                                                                                                                                                                      |
|                    | attachments.contentType           | String  | 티켓 문의 첨부파일 유형                                                                                                                                                                     |
|                    | attachments.disposition           | String  | 티켓 문의 첨부파일 처리 방식(attachment: 첨부파일)                                                                                                                                                |
|                    | attachments.size                  | Long    | 티켓 문의 첨부파일 사이즈                                                                                                                                                                    |
|                    | attachments.createdDt             | Long    | 티켓 문의 첨부파일 업로드 시간                                                                                                                                                                 |
|                    | displayDt                         | String  | 노출 시간(yyyy.MM.dd)                                                                                                                                                                 |
| result             | total                             | Integer | 총 건수                                                                                                                                                                              |
|                    | pages                             | Integer | 총 페이지 수                                                                                                                                                                           |
|                    | pageNum                           | Integer | 페이지                                                                                                                                                                               |
|                    | pageSize                          | Integer | 페이지 당 건수                                                                                                                                                                          |

***

**(4) Response Body**

```json
{       
  "header": {       
    "resultCode": 200,      
    "resultMessage": "",        
    "isSuccessful": true        
  },        
  "result": {       
    "content": {        
      "ticketId": "T1658199661153IXTfw",        
      "subject": "유형",      
      "categoryId": 2542,       
      "categoryName": "유형1-1-1-1-1",        
      "categoryFullName": "유형1>유형1-1>유형1-1-1>유형1-1-1-1>유형1-1-1-1-1",        
      "status": "solved",       
      "statusName": "답변 완료",        
      "content": "문의내용",        
      "createdDt": 1658199661000,       
      "updatedDt": 1658279983000,       
      "contents": [     
        {       
          "content": "<p>solved</p>",       
          "type": "reply",      
          "typeName": "답변",     
          "createdDt": 1658279983000,       
          "displayDt": "2022.07.20",        
          "attachments": [      
            {       
              "attachmentId": "a9e126cf01654631acc2d1e56e8c694e",       
              "fileName": "image.png",      
              "contentType": "image/png",       
              "disposition": "attachment",      
              "size": 90576,        
              "createdDt": 1658279969000        
            }       
          ]     
        },      
        {       
          "content": "<p>append commnet</p>",       
          "type": "enduser",        
          "typeName": "질문",     
          "createdDt": 1658279813000,       
          "displayDt": "2022.07.20",        
          "attachments": null       
        },      
        {       
          "content": "<p>append comment</p>",       
          "type": "enduser",        
          "typeName": "질문",     
          "createdDt": 1658216460000,       
          "displayDt": "2022.07.19",        
          "attachments": null       
        },      
        {       
          "content": "<p>solved</p>",       
          "type": "reply",      
          "typeName": "답변",     
          "createdDt": 1658216406000,       
          "displayDt": "2022.07.19",        
          "attachments": null       
        }       
      ],        
      "attachments": null,      
      "displayDt": "2022.07.19"     
    }       
  }     
}
```

***

## **➌ 티켓 첨부파일**

> * 티켓에 첨부파일이 있을 경우, 열기 및 다운로드할 수 있는 API 입니다.
> * [➋ 티켓 상세](#undefined-1)에서 반환된 **첨부파일 ID(attachmentId)**&#xB97C; 필수로 제공해야 합니다.

**(1) 인터페이스 설명**

* URL: https\://{domain}.oc.nhncloud.com/{serviceId}/api/v2/ticket/attachments/{id}
* URL (생산 테스트 환경) : https\://{domain}.oc.beta-nhncloud.com/{serviceId}/api/v2/ticket/attachments/{id}
* URL (개발 테스트 환경) : https\://{domain}.oc.alpha-nhncloud.com/{serviceId}/api/v2/ticket/attachments/{id}

| 인터페이스 명           | 프로토콜  | 호출방향 | 인코딩   | 결과 형식 | 인터페이스 설명        | 접근제한 여부 |
| ----------------- | ----- | ---- | ----- | ----- | --------------- | ------- |
| 티켓 첨부파일 열기 및 다운로드 | HTTPS | GET  | UTF-8 | JSON  | 티켓 첨부파일 열기/다운로드 | 필요 없음   |

***

**(2) 요청 파라미터 정의**

| 명칭        | Field (Parameter) | 데이터 타입 | 변수 유형 | 필수 | 설명                                             |
| --------- | ----------------- | ------ | ----- | -- | ---------------------------------------------- |
| 서비스 ID    | serviceId         | String | path  | O  | URL PATH 내에 설정한 {serviceId}                    |
| 첨부한 파일 ID | id                | String | path  | O  | 첨부파일 ID, URL PATH 내에 설정한 {id}                  |
| 처리방식      | type              | String | query | X  | 기본 값은 브라우저로 열기(download: 다운로드, open: 브라우저로 열기) |

***

**(3) 결과 데이터**

* File

***

## **➍ 고객 재문의**

> * 고객이 답변 내역에 대해 추가 질문을 할 수 있도록 구현하고 싶을 경우 사용하는 API 입니다.
> * [➋ 티켓 상세](#undefined-1)에서 상세 내역을 조회한 후 고객이 추가질문을 작성할 수 있는 필드를 제공하고, 재문의 API를 호출하면 해당 티켓에 추가 질문이 등록되는 방식입니다.

**(1) 인터페이스 설명**

* URL: https\://{domain}.oc.nhncloud.com/{serviceId}/openapi/v1/ticket/enduser/{usercode}/{ticketId}/comment.json
* URL (생산 테스트 환경) : https\://{domain}.oc.beta-nhncloud.com/{serviceId}/openapi/v1/ticket/enduser/{usercode}/{ticketId}/comment.json
* URL (개발 테스트 환경) : https\://{domain}.oc.alpha-nhncloud.com/{serviceId}/openapi/v1/ticket/enduser/{usercode}/{ticketId}/comment.json

| 인터페이스 명 | 프로토콜  | 호출방향 | 인코딩   | 결과 형식 | 인터페이스 설명          | 접근제한 여부 |
| ------- | ----- | ---- | ----- | ----- | ----------------- | ------- |
| 고객 재문의  | HTTPS | POST | UTF-8 | JSON  | 티켓 ID 기준으로 고객 재문의 | 공통 인증   |

***

**(2) 요청 파라미터 정의**

| 명칭     | Field (Parameter) | 데이터 타입 | 변수 유형 | 필수 | 설명                                                               |
| ------ | ----------------- | ------ | ----- | -- | ---------------------------------------------------------------- |
| 서비스 ID | serviceId         | String | path  | O  | 서비스 ID，URL PATH 내에 설정한 {serviceId}                               |
| 아이디    | usercode          | String | path  | O  | 아이디(사용자 고유 ID), 문의 접수 시의 usercode                                |
| 티켓 ID  | ticketId          | String | path  | O  | 티켓 ID                                                            |
| 내용     | comment           | String | body  | O  | 재문의 내용                                                           |
| 첨부파일   | attachments       | String | query | X  | 첨부파일 ID. 복수의 파일 첨부시 파일 ID를 (,)로 분리, max는 5건(파일ID1,파일ID2,…,파일ID5) |

***

**(3) 결과 데이터**

| 명칭             | Field (Parameter)        | 데이터 타입 | 설명                        |
| -------------- | ------------------------ | ------ | ------------------------- |
| result.content | content                  | String | 재문의 내용                    |
|                | type                     | String | 타입. 고정값: enduser          |
|                | typeName                 | String | 타입 명칭                     |
|                | createdDt                | Long   | 제출 시간                     |
|                | displayDt                | String | 노출 시간(yyyy.MM.dd)         |
|                | attachments              | Array  | 첨부파일                      |
|                | attachments.attachmentId | String | 첨부파일 ID                   |
|                | attachments.fileName     | String | 첨부파일 명                    |
|                | attachments.contentType  | String | 첨부파일 유형                   |
|                | attachments.disposition  | String | 파일 처리방식(attachment: 첨부파일) |
|                | attachments.size         | Long   | 첨부파일 사이즈                  |
|                | attachments.createdDt    | Long   | 첨부파일 업로드 시간               |

***

**(4) Response Body**

```json
{       
  "header": {       
    "resultCode": 200,      
    "resultMessage": "",        
    "isSuccessful": true        
  },        
  "result": {       
    "content": {        
      "content": "<p>append comnment</p>",      
      "type": "enduser",        
      "typeName": null,     
      "createdDt": 1658286589999,       
      "displayDt": null,        
      "attachments": [      
        {       
          "attachmentId": "a9e126cf01654631acc2d1e56e8c694e",       
          "fileName": "image.png",      
          "contentType": "image/png",       
          "disposition": "attachment",      
          "size": 90576,        
          "createdDt": 1658279969000        
        }       
      ]     
    }       
  }     
}
```


---

# 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://docs.contiple.com/eng/api-guide/open-api/inquiry-history.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.
