# 주문상태 단건 수정 API

{% hint style="warning" %}
**Deprecated**

이 문서는 더 이상 관리되지 않습니다.

[PortOne 개발자센터](https://developers.portone.io/)를 이용해주세요.
{% endhint %}

### 판매상품의 주문상태를 변경합니다.

## 페이코 주문상품 단건상태 변경

<mark style="color:green;">`POST`</mark> `https://api.iamport.kr/payco/orders/status/{imp_uid}`

#### Path Parameters

| Name                                       | Type   | Description                                  |
| ------------------------------------------ | ------ | -------------------------------------------- |
| imp\_uid<mark style="color:red;">\*</mark> | String | <mark style="color:red;">**포트원 고유번호**</mark> |

#### Request Body

| Name                                     | Type   | Description                                                                                                                                                                                 |
| ---------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| status<mark style="color:red;">\*</mark> | String | <p><mark style="color:red;"><strong>주문상태코드</strong></mark></p><p><code>DELIVERY\_START (배송시작-출고지시)</code></p><p><code>PURCHASE\_DECISION (구매확정)</code></p><p><code>CANCELED (취소)</code></p> |

{% tabs %}
{% tab title="200: OK 성공" %}
{% tabs %}
{% tab title="PaycoStatusResponse" %}
**`code`** <mark style="color:red;">**\***</mark> <mark style="color:purple;">**integer**</mark>

**응답코드**

0이면 정상적인 조회, 0 이 아닌 값이면 message를 확인해봐야 합니다

**`message`** <mark style="color:red;">**\***</mark> <mark style="color:green;">**string**</mark>

**응답메세지**

code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같은 오류 메세지를 포함합니다

**`response`** <mark style="color:red;">**(PaycoStatusAnnotation, optional)**</mark>
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="PaycoStatusAnnotation" %}
**`status`** <mark style="color:red;">**\***</mark> <mark style="color:green;">**`string`**</mark>

**`PAYCO 주문변경된 상태`**

\['DELIVERY\_START', 'PURCHASE\_DECISION', 'CANCELED']
{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="401: Unauthorized 인증 Token이 전달되지 않았거나 유효하지 않은 경우" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

<details>

<summary>Response Model Schema</summary>

```
{
  "code": 0,
  "message": "string",
  "response": {
    "status": "DELIVERY_START"
  }
}
```

</details>

{% hint style="success" %}
**Swagger Test Link**

[**https://api.iamport.kr/#!/payco/changeOrderStatus**](https://api.iamport.kr/#!/payco/changeOrderStatus)
{% endhint %}


---

# 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://portone.gitbook.io/docs/api/api-6/undefined-1/api.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.
