Skip to main content
POST
/
api
/
v1
/
refill
Create Refill
curl --request POST \
  --url https://app.sosmednext.com/api/v1/refill \
  --header 'Content-Type: application/json' \
  --data '
{
  "order": 123,
  "orders": "<string>"
}
'
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)

order
integer
ID Order untuk refill satu pesanan.
orders
string
ID Order dipisahkan koma untuk refill banyak pesanan sekaligus (maks 100 ID). Contoh: "1010,1011,1012"
Catatan: Gunakan salah satu parameter order atau orders, jangan keduanya bersamaan.

Contoh Request (Single)

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

Response Sukses (200 OK)
{
  "refill": "1"
}

Contoh Request (Multiple)

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

Response Sukses (200 OK)
[
  { "order": 9210, "refill": 1 },
  { "order": 9211, "refill": 2 },
  { "order": 9212, "refill": { "error": "Service does not support refill" } }
]
Response Gagal (400)
{
  "error": "Order not found"
}