# Refund Order

Create a refund order。

Cancel the order and get a refund. you can only do this when the order has not been shipped. This operation is performed asynchronously, and you can get the latest status information through "[Query ReFund](/admin-api/order-1/query-refund.md)"

The refund status can be updated for a maximum of 24 hours. Generally, the status will be updated within 1 hour.

### **Request Body Parameter**

| Name         | Type   | Description                                                                                                                                                                                            |
| ------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| itemId       | String | Item Id                                                                                                                                                                                                |
| skuCode      | String | Sku code                                                                                                                                                                                               |
| quantity     | Int    | Refund sku number                                                                                                                                                                                      |
| remark       | String | Refund  remark                                                                                                                                                                                         |
| countryCode  | String | Country code, the country code of the actual delivery warehouse of the sku, 'CN' for the Chinese warehouse, and 'US' for the overseas warehouse. This value comes from the Query Order API.            |
| refundReason | String | Refund reason, the default value is 'Other', other values include 'Don't Want Anymore', 'Product Selection Error/Multiple Selection', 'Incorrect Address Information', 'Out Of Stock', 'Out Of Stock'. |

<mark style="color:green;">`POST`</mark> `/openapi/v2/order/orders/{id}/refund`

{% tabs %}
{% tab title="200: OK refund order number" %}

```javascript
{
    "code":10000,
    "message":"kk.api.200",
    "data":
        "111"
}
```

{% endtab %}
{% endtabs %}

## Examples

### Refund some items

{% tabs %}
{% tab title="Request" %}
{% code overflow="wrap" lineNumbers="true" %}

```shell
curl -d '{"remark":"test","refundReason":"Other","orderItems":[{"itemId":"120001","skuCode":"FSZW08923_R_L_NUB","quantity":1,"countryCode":"CN"},{"itemId":"120002","skuCode":"FSZW08923_R_L_NUB","quantity":2,"countryCode":"US"}]}' \
-X POST "https://test-developer.kakaclo.com/openapi/openapi/v2/order/orders/10001/refund" \
-H "Authorization: Bearer {YOU_ACCES_TOKEN}" \
-H "Content-Type: application/json"
```

{% endcode %}
{% endtab %}

{% tab title="Response" %}
{% code overflow="wrap" %}

```json
HTTP/1.1 200 ok
{
    "code": 10000,
    "message": "ok",
    "data":10002
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Refund the entire order

{% tabs %}
{% tab title="Request" %}
{% code overflow="wrap" lineNumbers="true" %}

```shell
curl -d '{"remark":"other reason"}' \
-X POST "https://test-developer.kakaclo.com/openapi/openapi/v2/order/orders/10001/refund" \
-H "Authorization: Bearer {YOU_ACCES_TOKEN}" \
-H "Content-Type: application/json"
```

{% endcode %}
{% endtab %}

{% tab title="Response" %}

```json
HTTP/1.1 200 ok
{
    "code": 10000,
    "message": "ok",
    "data":10002
}
```

{% endtab %}
{% endtabs %}


---

# 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.kakaclo.com/admin-api/order-1/refund-order.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.
