OpenAPI Türkçe gyrohosting.com ↗

Orders

Preview (quote) and place orders for any product.

#GET/orders

List ordersScope: Orders/GetOrderscoreGetOrdersOpenAPI for this operation

List orders. Orders of the calling account.

Core WISECP client endpoint (Turkish reference: https://dev.wisecp.com/tr/musteri-olarak-siparis).

Parameters

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

Responses

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

Examples

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

Create orderScope: Orders/CreateOrdercoreCreateOrderOpenAPI for this operation

Create order. Orders of the calling account.

Spends money / creates an invoice. Money rules apply (AK-40): "confirm": true in the body, an Idempotency-Key header, account balance only (no stored card), daily limit of paid API operations per account (default 50, operator can override per account/reseller, resets 00:00 Europe/Istanbul); violations answer 422 with [confirm_required], [idempotency_key_required], [balance_only] or [daily_limit] in the message.

Core WISECP client endpoint (Turkish reference: https://dev.wisecp.com/tr/musteri-olarak-siparis).

Parameters

FieldinTypeDescription
Idempotency-Key requiredheaderstring

Request body

FieldTypeDescription
terms requiredbooleanŞartların kabulü. Doğru gönderilmelidir.
items requiredstringitems[]Sipariş satırları. Birden yirmiye kadar.
product_id requiredintegerSipariş edilecek ürünün numarası.
cycle requiredstringÖ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).

Responses

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

Examples

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    # all flags
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

Preview orderScope: Orders/PreviewOrdercorePreviewOrderOpenAPI for this operation

Preview order. Orders of the calling account.

Core WISECP client endpoint (Turkish reference: https://dev.wisecp.com/tr/musteri-olarak-siparis).

Request body

FieldTypeDescription
items requiredstringitems[]Sipariş satırları. Birden yirmiye kadar; şekli sipariş ucuyla aynıdır.
product_id requiredintegerSipariş edilecek ürünün numarası.
cycle requiredstringÖ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

Responses

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

Examples

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    # all flags
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}

Get order (path: {id})Scope: Orders/GetOrdercoreGetOrderOpenAPI for this operation

Get order (path: {id}). Orders of the calling account.

Core WISECP client endpoint (Turkish reference: https://dev.wisecp.com/tr/musteri-olarak-siparis).

Parameters

FieldinTypeDescription
id requiredpathinteger

Responses

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

Examples

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}`);