OpenAPI English gyrohosting.com ↗
Markdown olarak görClaude'da aç ↗

Siparişler

Her ürün için teklif ve sipariş.

#GET/orders

Siparişleri ListelemeKapsam: Orders/GetOrderscoreGetOrdersBu işlemin OpenAPI parçası

Hesabın siparişlerini en yeniden başlayarak döndürür. — anahtarın sahibi

Parametreler

AlaninTürAçıklama
pagequeryintegerKaçıncı sayfa.
limitqueryintegerSayfa başına satır. En çok 100.
statusquerystringDurum süzgeci: bekliyor, işlemde, etkin ya da iptal.

Yanıtlar

200Success — data: array<object>
401Missing, invalid or revoked key
403Key lacks the scope, IP not allowed, or feature disabled
422status_invalid

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/orders' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro order list
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/orders", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/orders", {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#POST/orders

Sipariş VermeKapsam: Orders/CreateOrdercoreCreateOrderBu işlemin OpenAPI parçası

Para harcar / fatura oluşturur. Para kuralları (AK-40): gövdede "confirm": true, Idempotency-Key başlığı, yalnız bakiye (kayıtlı kart yok), hesap başına günlük ücretli işlem sınırı (varsayılan 50, hesap/bayi bazında değiştirilebilir, 00:00 TR'de sıfırlanır). Siparişi verir ve aynı çağrıda tahsil eder. — bakiye ya da kayıtlı kart

Parametreler

AlaninTürAçıklama
Idempotency-Key zorunluheaderstring

İstek gövdesi

AlanTürAçıklama
terms zorunlubooleanŞartların kabulü. Doğru gönderilmelidir.
items zorunlustringitems[]Sipariş satırları. Birden yirmiye kadar.
product_id zorunluintegerSipariş edilecek ürünün numarası.
cycle zorunlustringÖdeme döngüsü. Ürünün fiyatlı döngülerinden biri olmalıdır.
quantityintegerAdet. Yalnız ürün çoklu alıma izin veriyorsa dikkate alınır.
addonsobjectSeçilen ek hizmetler. Ek hizmet numarasını seçenek numarasına eşler. Ürünün ilk dönemi ücretsiz dahil ettiği ek hizmet gönderilmese de siparişe eklenir. İlk dönem tutarı 0 olur, yenilemeler ek hizmet fiyatından faturalanır ve siparişten çıkarılamaz.
addons_qtyobjectAdetli ek hizmetlerin sayısı.
requirementsobjectÜrünün sorduğu alanların yanıtları. Zorunlu işaretlenen her alan gönderilmelidir.
requirement_filesobjectDosya isteyen alanların içeriği. Kodlanmış içerik olarak gönderilir; adres kabul edilmez.
metricsstringAçılacak ölçümlerin numaraları.
domainobjectSatırın alan adı ekseni. Seçim, ad, alt alan adı kökü ve lisans alanlarını taşır.
couponsstringKupon kodları. Operatörün kendiliğinden uygulanan kuponları da katılır.
billing_profile_idintegerFatura profilinin numarası.
notesstringSipariş notu. Bin karakterden uzunu kırpılır.
paymentobjectpaymentÖdeme kaynağı. Toplam sıfırın üstündeyse zorunludur.
methodstringÖdeme yolu: hesap bakiyesi ya da kayıtlı kart.
card_idintegerÇekilecek kartın numarası. Verilmezse hesabın varsayılan kartı çekilir.
project_idintegerOptional project for the new service(s) (0 = default project). Checked before the order: unknown id = 404 project_not_found (GyroAPI order endpoints) or 422 checkout_blocked with [project_not_found] (POST /orders).

Yanıtlar

200Success — data: object
401Missing, invalid or revoked key
403Key lacks the scope, IP not allowed, or feature disabled
422card_not_chargeable, checkout_blocked, insufficient_balance, no_stored_card, payment_method_restricted, terms_required, verification_required
404not_found

Örnekler

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/orders' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"terms": true, "items": "string", "product_id": 1, "cycle": "string", "quantity": 1, "addons": {}, "addons_qty": {}, "requirements": {}, "requirement_files": {}, "metrics": "string", "domain": {}, "coupons": "string", "billing_profile_id": 1, "notes": "string", "payment": {}, "method": "string", "card_id": 1, "project_id": 1}'
gyro order create --help    # tüm seçenekler
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
h["Idempotency-Key"] = str(uuid.uuid4())
r = requests.post("https://www.gyrohosting.com/api/v1/client/orders", headers=h, json={"terms": True, "items": "string", "product_id": 1, "cycle": "string", "quantity": 1, "addons": {}, "addons_qty": {}, "requirements": {}, "requirement_files": {}, "metrics": "string", "domain": {}, "coupons": "string", "billing_profile_id": 1, "notes": "string", "payment": {}, "method": "string", "card_id": 1, "project_id": 1}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/orders", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({"terms": true, "items": "string", "product_id": 1, "cycle": "string", "quantity": 1, "addons": {}, "addons_qty": {}, "requirements": {}, "requirement_files": {}, "metrics": "string", "domain": {}, "coupons": "string", "billing_profile_id": 1, "notes": "string", "payment": {}, "method": "string", "card_id": 1, "project_id": 1}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#POST/orders/preview

Siparişi FiyatlandırmaKapsam: Orders/PreviewOrdercorePreviewOrderBu işlemin OpenAPI parçası

Sipariş gövdesini fiyatlandırır ve tek satır bile yazmaz. — hiçbir şey yazılmaz

İstek gövdesi

AlanTürAçıklama
items zorunlustringitems[]Sipariş satırları. Birden yirmiye kadar; şekli sipariş ucuyla aynıdır.
product_id zorunluintegerSipariş edilecek ürünün numarası.
cycle zorunlustringÖdeme döngüsü. Ürünün fiyatlı döngülerinden biri olmalıdır.
quantityintegerAdet. Yalnız ürün çoklu alıma izin veriyorsa dikkate alınır.
addonsobjectSeçilen ek hizmetler. Ek hizmet numarasını seçenek numarasına eşler. Ürünün ilk dönemi ücretsiz dahil ettiği ek hizmet gönderilmese de siparişe eklenir. İlk dönem tutarı 0 olur, yenilemeler ek hizmet fiyatından faturalanır ve siparişten çıkarılamaz.
addons_qtyobjectAdetli ek hizmetlerin sayısı.
requirementsobjectÜrünün sorduğu alanların yanıtları. Zorunlu işaretlenen her alan gönderilmelidir.
requirement_filesobjectDosya isteyen alanların içeriği. Kodlanmış içerik olarak gönderilir; adres kabul edilmez.
metricsstringAçılacak ölçümlerin numaraları.
domainobjectSatırın alan adı ekseni. Seçim, ad, alt alan adı kökü ve lisans alanlarını taşır.
couponsstringDenenecek kupon kodları.
billing_profile_idintegerFatura profilinin numarası. Vergi bağlamını belirler; verilmezse varsayılan profil, hesapta kayıtlı profil yoksa hesabın ülkesi kullanılır.
paymentobjectÖdeme bloğu. Verilirse yöntemin komisyonu toplama eklenir; bakiye yeterliliği burada denetlenmez.
methodstring
card_idstring

Yanıtlar

200Success — data: object
401Missing, invalid or revoked key
403Key lacks the scope, IP not allowed, or feature disabled
422coupon_invalid, cycle_invalid, domain_acquisition_not_here, items_required, product_not_orderable, requirement_missing
404not_found

Örnekler

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/orders/preview' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"items": "string", "product_id": 1, "cycle": "string", "quantity": 1, "addons": {}, "addons_qty": {}, "requirements": {}, "requirement_files": {}, "metrics": "string", "domain": {}, "coupons": "string", "billing_profile_id": 1, "payment": {}, "method": "string", "card_id": "string"}'
gyro order preview --help    # tüm seçenekler
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/orders/preview", headers=h, json={"items": "string", "product_id": 1, "cycle": "string", "quantity": 1, "addons": {}, "addons_qty": {}, "requirements": {}, "requirement_files": {}, "metrics": "string", "domain": {}, "coupons": "string", "billing_profile_id": 1, "payment": {}, "method": "string", "card_id": "string"}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/orders/preview", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"items": "string", "product_id": 1, "cycle": "string", "quantity": 1, "addons": {}, "addons_qty": {}, "requirements": {}, "requirement_files": {}, "metrics": "string", "domain": {}, "coupons": "string", "billing_profile_id": 1, "payment": {}, "method": "string", "card_id": "string"}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#GET/orders/{id}

Sipariş Detayını OkumaKapsam: Orders/GetOrdercoreGetOrderBu işlemin OpenAPI parçası

Siparişin satırlarını, doğan hizmetlerini ve faturasını döndürür. — anahtarın sahibi

Parametreler

AlaninTürAçıklama
id zorunlupathinteger

Yanıtlar

200Success — data: object
401Missing, invalid or revoked key
403Key lacks the scope, IP not allowed, or feature disabled
404not_found

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/orders/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro order get 12345
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/orders/12345", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/orders/12345", {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);