> For the complete documentation index, see [llms.txt](https://docs.kakaclo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kakaclo.com/admin-api/order-1/refund-order.md).

# 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 %}
