Sipariş Oluştur
Bu eylem ile API üzerinden yeni bir sipariş oluşturulur.
Method / Endpoint
POST/ {{API_URL}} buy
İstek Parametreleri
| İsim | Zorunlu | Açıklama |
|---|---|---|
| key | Evet | API Key |
| type | Evet | Ürün Türü. Olabilecek değerler: hosting, server, software, special, sms |
| id | Evet | Ürün ID Numarası |
| period_type | Evet | Siparişin hangi periyota ait olacağı. Olabilecek değerler: none, year, month, week, day, hour |
| period_duration | Evet | Siparişin Periyot Süresi |
| options[...array...] | İsteğe Bağlı | Eğer siparişte domain, hostname, nameserver, password, IP gibi bilgilere ihtiyaç duyuluyorsa, bu parametre içinde gönderilir. |
Örnek cURL İsteği
curl --location 'https://example.com/api/reseller/buy' \
--data '{
"key":"UzZBSlBWeWk0UEcrVWxlU0RjS1B1dz09",
"type":"hosting",
"id":33,
"period_type":"month",
"period_duration":1,
"options":
{
"domain":"example123.com"
}
}'
Örnek JSON Yanıtı
{
"status": "successful",
"invoice_id": 3,
"order_id": 3,
"fee": "14.0000",
"fee_formatted": "$14"
}