> ## Documentation Index
> Fetch the complete documentation index at: https://api.sosmednext.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Refill

> Mengajukan permintaan refill untuk pesanan yang memiliki garansi refill.

Gunakan endpoint ini untuk mengajukan refill pada pesanan yang sudah selesai namun mengalami penurunan (drop). Pastikan layanan yang dipesan memiliki properti `refill: true` pada daftar layanan.

## Body Parameters (JSON)

<ParamField body="order" type="integer">
  ID Order untuk refill satu pesanan.
</ParamField>

<ParamField body="orders" type="string">
  ID Order dipisahkan koma untuk refill banyak pesanan sekaligus (maks 100 ID). Contoh: `"1010,1011,1012"`
</ParamField>

> **Catatan:** Gunakan salah satu parameter `order` atau `orders`, jangan keduanya bersamaan.

## Contoh Request (Single)

```bash theme={null}
curl -X POST \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"order": 9210}' \
  "https://app.sosmednext.com/api/v1/refill"
```

## Response Single

```json Response Sukses (200 OK) theme={null}
{
  "refill": "1"
}
```

## Contoh Request (Multiple)

```bash theme={null}
curl -X POST \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"orders": "9210,9211,9212"}' \
  "https://app.sosmednext.com/api/v1/refill"
```

## Response Multiple

```json Response Sukses (200 OK) theme={null}
[
  { "order": 9210, "refill": 1 },
  { "order": 9211, "refill": 2 },
  { "order": 9212, "refill": { "error": "Service does not support refill" } }
]
```

```json Response Gagal (400) theme={null}
{
  "error": "Order not found"
}
```
