{
 "openapi": "3.1.0",
 "info": {
  "title": "Gyro Public API",
  "version": "2.30.0",
  "summary": "Manage Gyro cloud servers, SSH keys and billing programmatically.",
  "x-summary-tr": "Gyro bulut sunucularınızı, SSH anahtarlarınızı ve faturalarınızı programla yönetin.",
  "contact": {
   "name": "Gyro Hosting",
   "url": "https://www.gyrohosting.com"
  },
  "license": {
   "name": "Proprietary",
   "identifier": "LicenseRef-Gyro-API-Terms"
  }
 },
 "servers": [
  {
   "url": "https://www.gyrohosting.com/api/v1/client",
   "description": "Production"
  }
 ],
 "paths": {
  "/orders": {
   "post": {
    "tags": [
     "Orders"
    ],
    "operationId": "coreCreateOrder",
    "summary": "Create order",
    "x-summary-tr": "Sipariş Verme",
    "x-scope": "Orders/CreateOrder",
    "x-generated": "core-catalog",
    "description": "Create order. Orders of the calling account.\n\n**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. \n\nCore WISECP client endpoint (Turkish reference: https://dev.wisecp.com/tr/musteri-olarak-siparis).",
    "x-description-tr": "**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",
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "object",
           "additionalProperties": true
          }
         }
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "422": {
      "description": "card_not_chargeable, checkout_blocked, insufficient_balance, no_stored_card, payment_method_restricted, terms_required, verification_required",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "not_found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "terms": {
          "type": "boolean",
          "description": "Şartların kabulü. Doğru gönderilmelidir."
         },
         "items": {
          "type": "string",
          "description": "items[]Sipariş satırları. Birden yirmiye kadar."
         },
         "product_id": {
          "type": "integer",
          "description": "Sipariş edilecek ürünün numarası."
         },
         "cycle": {
          "type": "string",
          "description": "Ödeme döngüsü. Ürünün fiyatlı döngülerinden biri olmalıdır."
         },
         "quantity": {
          "type": "integer",
          "description": "Adet. Yalnız ürün çoklu alıma izin veriyorsa dikkate alınır."
         },
         "addons": {
          "type": "object",
          "description": "Seç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_qty": {
          "type": "object",
          "description": "Adetli ek hizmetlerin sayısı."
         },
         "requirements": {
          "type": "object",
          "description": "Ürünün sorduğu alanların yanıtları. Zorunlu işaretlenen her alan gönderilmelidir."
         },
         "requirement_files": {
          "type": "object",
          "description": "Dosya isteyen alanların içeriği. Kodlanmış içerik olarak gönderilir; adres kabul edilmez."
         },
         "metrics": {
          "type": "string",
          "description": "Açılacak ölçümlerin numaraları."
         },
         "domain": {
          "type": "object",
          "description": "Satırın alan adı ekseni. Seçim, ad, alt alan adı kökü ve lisans alanlarını taşır."
         },
         "coupons": {
          "type": "string",
          "description": "Kupon kodları. Operatörün kendiliğinden uygulanan kuponları da katılır."
         },
         "billing_profile_id": {
          "type": "integer",
          "description": "Fatura profilinin numarası."
         },
         "notes": {
          "type": "string",
          "description": "Sipariş notu. Bin karakterden uzunu kırpılır."
         },
         "payment": {
          "type": "object",
          "description": "paymentÖdeme kaynağı. Toplam sıfırın üstündeyse zorunludur."
         },
         "method": {
          "type": "string",
          "description": "Ödeme yolu: hesap bakiyesi ya da kayıtlı kart."
         },
         "card_id": {
          "type": "integer",
          "description": "Çekilecek kartın numarası. Verilmezse hesabın varsayılan kartı çekilir."
         },
         "project_id": {
          "type": "integer",
          "minimum": 0,
          "description": "Optional 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)."
         }
        },
        "required": [
         "cycle",
         "items",
         "product_id",
         "terms"
        ]
       }
      }
     }
    },
    "parameters": [
     {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "minLength": 8,
       "maxLength": 191
      }
     }
    ]
   }
  }
 },
 "components": {
  "schemas": {
   "Error": {
    "type": "object",
    "required": [
     "error"
    ],
    "properties": {
     "error": {
      "type": "object",
      "required": [
       "code",
       "message"
      ],
      "properties": {
       "code": {
        "type": "string",
        "example": "server_not_found"
       },
       "message": {
        "type": "string"
       },
       "details": {
        "type": "object",
        "additionalProperties": true,
        "description": "Extra data. Limit refusals add the LimitHint fields (`limit_exceeded: true`, `limit_key`, `limit`, `current`, `how_to_increase`, `support_ticket`, `hint`): account limits are raised with a support ticket. Validation errors (length, format) never carry the limit hint.",
        "x-description-tr": "Ek veri. Sınır retlerinde LimitHint alanları gelir: hesap sınırları destek talebiyle artırılır. Doğrulama hataları (uzunluk, biçim) sınır ipucu taşımaz."
       }
      }
     }
    }
   }
  },
  "responses": {
   "Forbidden": {
    "description": "Key lacks the scope, IP not allowed, or feature disabled",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   },
   "Unauthorized": {
    "description": "Missing, invalid or revoked key",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   }
  }
 },
 "security": [
  {
   "bearerAuth": []
  }
 ]
}