{
    "openapi": "3.1.0",
    "info": {
        "title": "Hemen Mağaza API",
        "version": "v1",
        "description": "Mağazanızın ürün, stok, fiyat, sipariş, gönderi, fatura ve müşterilerini kendi yazılımınızdan yönetin. Anahtarı panelde Ayarlar › API anahtarları sayfasından alın ve Authorization: Bearer hm_sk_… başlığıyla gönderin. Anahtar başına dakikada 120 istek."
    },
    "servers": [
        {
            "url": "https://api.hemenmagaza.com/v1"
        }
    ],
    "security": [
        {
            "bearerAuth": []
        }
    ],
    "tags": [
        {
            "name": "Mağaza",
            "description": "Anahtarın hangi mağazaya ait olduğu, özet sayılar ve mağaza ayarları."
        },
        {
            "name": "Ürünler",
            "description": "Dış sistemlerde bizim ürün kimliğimiz yoktur, SKU vardır: ürünler SKU ile de bulunur ve güncellenir."
        },
        {
            "name": "Stok ve fiyat",
            "description": "Entegrasyonların en çok kullandığı uçlar. Yazılan stok ve fiyat vitrine hemen yansır. Varyantlı ürünün stoğu ve fiyatı varyantlarına yazılır. Toplu uçlar tek istekte 500 SKU alır, anahtar başına dakikada 10 çağrıyla sınırlıdır. Hatalı satır diğerlerini durdurmaz, her SKU kendi sonucunu döner."
        },
        {
            "name": "Kategoriler",
            "description": "Kategori ağacı ve kategori yönetimi."
        },
        {
            "name": "Siparişler",
            "description": "Sipariş detayı adresleri, ödeme ve kargo yöntemini, toplamları ve kalem başına kalan fatura/gönderi adedini taşır. Webhook gövdeleri de aynı biçimdedir."
        },
        {
            "name": "Gönderi ve fatura",
            "description": "Gönderi mağazanın kendi kargosuyla yazılır: stok depodan düşer, müşteriye gönderi e-postası gider. Hemen Kargo bu uçtan alınmaz. Fatura dış programda kesildiyse numarası ve bağlantısı faturaya kaydedilir."
        },
        {
            "name": "Müşteriler",
            "description": "Müşteri kayıtları ve grupları."
        },
        {
            "name": "Webhook adresleri",
            "description": "Olay olunca sisteminize imzalı istek gönderilir. Adresler panelde (Ayarlar › API anahtarları) ya da bu uçlarla yönetilir. Adres https olmalı ve internetten erişilebilmeli."
        },
        {
            "name": "Vitrin scriptleri",
            "description": "Vitrinin her sayfasında yüklenen scriptler: ölçüm pikseli, canlı destek, yorum rozeti. Adres https olmalı. consent_required açıksa script yalnız ziyaretçi çerez iznini verince yüklenir."
        }
    ],
    "paths": {
        "/store": {
            "get": {
                "tags": [
                    "Mağaza"
                ],
                "operationId": "storeShow",
                "summary": "Mağaza ve anahtar bilgisi",
                "description": "İlk deneme isteği. Mağazanın adı, adresi, paketi ve anahtarın yetkileri döner.\n\nYetki: `store:read`",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                },
                                "example": {
                                    "data": {
                                        "id": "lorve",
                                        "name": "Lorve",
                                        "domain": "lorve.com",
                                        "plan": "growth",
                                        "key": {
                                            "name": "Logo ERP",
                                            "scopes": [
                                                "store:read",
                                                "inventory:write"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "store:read"
            }
        },
        "/store/dashboard": {
            "get": {
                "tags": [
                    "Mağaza"
                ],
                "operationId": "storeDashboard",
                "summary": "Özet sayılar",
                "description": "Sipariş, ürün ve müşteri sayıları. Ciro alanları satış özetindeki kuralla hesaplanır.\n\nYetki: `store:read`",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "store:read"
            }
        },
        "/store/dashboard/operations": {
            "get": {
                "tags": [
                    "Mağaza"
                ],
                "operationId": "storeOperations",
                "summary": "Bekleyen işler",
                "description": "Faturalanacak, gönderilecek siparişler ve düşük stok.\n\nYetki: `store:read`",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "store:read"
            }
        },
        "/store/dashboard/sales": {
            "get": {
                "tags": [
                    "Mağaza"
                ],
                "operationId": "storeSales",
                "summary": "Satış özeti",
                "description": "Son 7, 30 ya da 90 günün cirosu ve sipariş sayısı, bir önceki aynı uzunluktaki dönemle; gün gün seri ve en çok satan 5 ürün. Ciro: iptal, dolandırıcılık ve ödemesi tamamlanmamış siparişler hariç, iadeler düşülmüş.\n\nYetki: `store:read`",
                "parameters": [
                    {
                        "name": "days",
                        "in": "query",
                        "required": false,
                        "description": "7, 30 ya da 90; varsayılan 7.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "store:read"
            }
        },
        "/settings/summary": {
            "get": {
                "tags": [
                    "Mağaza"
                ],
                "operationId": "settingsSummary",
                "summary": "Ayar özeti",
                "description": "Varsayılan kanal, para birimi, dil.\n\nYetki: `store:read`",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "store:read"
            }
        },
        "/inventory-sources": {
            "get": {
                "tags": [
                    "Mağaza"
                ],
                "operationId": "inventorySourcesIndex",
                "summary": "Stok kaynakları (depolar)",
                "description": "Stok yazarken kullanılacak depo id ve kodları.\n\nYetki: `store:read`",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "store:read"
            }
        },
        "/channels": {
            "get": {
                "tags": [
                    "Mağaza"
                ],
                "operationId": "channelsIndex",
                "summary": "Satış kanalları",
                "description": "Yetki: `store:read`",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "store:read"
            }
        },
        "/currencies": {
            "get": {
                "tags": [
                    "Mağaza"
                ],
                "operationId": "currenciesIndex",
                "summary": "Para birimleri",
                "description": "Yetki: `store:read`",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "store:read"
            }
        },
        "/tax-categories": {
            "get": {
                "tags": [
                    "Mağaza"
                ],
                "operationId": "taxCategoriesIndex",
                "summary": "Vergi sınıfları",
                "description": "Yetki: `store:read`",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "store:read"
            }
        },
        "/products": {
            "get": {
                "tags": [
                    "Ürünler"
                ],
                "operationId": "productsIndex",
                "summary": "Ürün listesi",
                "description": "Arama, SKU ve tür süzgeciyle; updated_since ile yalnız değişenler.\n\nYetki: `products:read`",
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "SKU ya da ad içinde arar.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sku",
                        "in": "query",
                        "required": false,
                        "description": "Tam SKU eşleşmesi.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "skus",
                        "in": "query",
                        "required": false,
                        "description": "Virgülle ayrılmış SKU listesi, en fazla 100.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "description": "simple, configurable, bundle…",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "top_level",
                        "in": "query",
                        "required": false,
                        "description": "1: varyantları dışarıda bırakır, yalnız ana ürünler.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Sayfa numarası (en yeniden eskiye sıralı liste).",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Sayfa başına kayıt, en fazla 100. Varsayılan 20.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "required": false,
                        "description": "ISO 8601 zaman. Yalnız bu andan sonra değişen kayıtlar, eskiden yeniye. Senkron için.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "Önceki cevaptaki meta.next_cursor. updated_since ile birlikte kullanılır.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "products:read"
            },
            "post": {
                "tags": [
                    "Ürünler"
                ],
                "operationId": "productsStore",
                "summary": "Ürün oluşturma",
                "description": "Basit (simple), sanal (virtual: kargo gerekmez) ya da varyantlı (configurable) ürün oluşturur. Varyantlı üründe super_attributes ile seçilen değerlerin her birleşimi için bir varyant açılır; fiyat, ağırlık ve stok varyantlara yazılır.\n\nYetki: `products:write`",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "products:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "sku": {
                                        "type": "string",
                                        "description": "Benzersiz stok kodu."
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Ürün adı."
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "simple, virtual ya da configurable; sonradan değişmez."
                                    },
                                    "super_attributes": {
                                        "type": "object",
                                        "description": "Yalnız configurable: {\"size\": [12, 14], \"color\": [3]} biçiminde özellik kodu → değer id listesi (products/variant-options). En fazla 100 varyant."
                                    },
                                    "price": {
                                        "type": "number",
                                        "description": "Satış fiyatı."
                                    },
                                    "qty": {
                                        "type": "number",
                                        "description": "Stok adedi (ilk açık depo ya da inventory_source_id)."
                                    },
                                    "inventory_source_id": {
                                        "type": "integer",
                                        "description": "Stoğun yazılacağı depo."
                                    },
                                    "status": {
                                        "type": "boolean",
                                        "description": "Satışta mı."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Açıklama (HTML)."
                                    },
                                    "short_description": {
                                        "type": "string",
                                        "description": "Kısa açıklama."
                                    },
                                    "url_key": {
                                        "type": "string",
                                        "description": "Adres parçası; verilmezse addan üretilir."
                                    },
                                    "weight": {
                                        "type": "number",
                                        "description": "Ağırlık."
                                    },
                                    "category_ids": {
                                        "type": "array",
                                        "description": "Kategori id listesi.",
                                        "items": {
                                            "type": [
                                                "object",
                                                "integer",
                                                "string"
                                            ]
                                        }
                                    },
                                    "meta_title": {
                                        "type": "string",
                                        "description": "SEO başlığı."
                                    },
                                    "meta_description": {
                                        "type": "string",
                                        "description": "SEO açıklaması."
                                    }
                                },
                                "required": [
                                    "sku",
                                    "name",
                                    "type"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/products/variant-options": {
            "get": {
                "tags": [
                    "Ürünler"
                ],
                "operationId": "productsVariantOptions",
                "summary": "Varyant seçenekleri",
                "description": "Varyantlı ürün için kullanılabilecek özellikler (beden, renk…), değerleri ve mağazada en çok kullanılanlar.\n\nYetki: `products:read`",
                "parameters": [
                    {
                        "name": "attribute_family_id",
                        "in": "query",
                        "required": false,
                        "description": "Özellik ailesi; verilmezse varsayılan.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "products:read"
            }
        },
        "/products/low-stock": {
            "get": {
                "tags": [
                    "Ürünler"
                ],
                "operationId": "productsLowStock",
                "summary": "Stoğu azalan ürünler",
                "description": "Yetki: `products:read`",
                "parameters": [
                    {
                        "name": "threshold",
                        "in": "query",
                        "required": false,
                        "description": "Eşik, varsayılan 5.",
                        "schema": {
                            "type": "number"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "products:read"
            }
        },
        "/products/by-sku/{sku}": {
            "get": {
                "tags": [
                    "Ürünler"
                ],
                "operationId": "productsBySkuShow",
                "summary": "SKU ile ürün",
                "description": "Yetki: `products:read`",
                "parameters": [
                    {
                        "name": "sku",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "products:read"
            },
            "put": {
                "tags": [
                    "Ürünler"
                ],
                "operationId": "productsBySkuUpdate",
                "summary": "SKU ile ürün güncelleme",
                "description": "Yetki: `products:write`",
                "parameters": [
                    {
                        "name": "sku",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "products:write",
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "sku": {
                                        "type": "string",
                                        "description": "Benzersiz stok kodu."
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Ürün adı."
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "simple, virtual ya da configurable; sonradan değişmez."
                                    },
                                    "price": {
                                        "type": "number",
                                        "description": "Satış fiyatı."
                                    },
                                    "qty": {
                                        "type": "number",
                                        "description": "Stok adedi (ilk açık depo ya da inventory_source_id)."
                                    },
                                    "inventory_source_id": {
                                        "type": "integer",
                                        "description": "Stoğun yazılacağı depo."
                                    },
                                    "status": {
                                        "type": "boolean",
                                        "description": "Satışta mı."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Açıklama (HTML)."
                                    },
                                    "short_description": {
                                        "type": "string",
                                        "description": "Kısa açıklama."
                                    },
                                    "url_key": {
                                        "type": "string",
                                        "description": "Adres parçası; verilmezse addan üretilir."
                                    },
                                    "weight": {
                                        "type": "number",
                                        "description": "Ağırlık."
                                    },
                                    "category_ids": {
                                        "type": "array",
                                        "description": "Kategori id listesi.",
                                        "items": {
                                            "type": [
                                                "object",
                                                "integer",
                                                "string"
                                            ]
                                        }
                                    },
                                    "meta_title": {
                                        "type": "string",
                                        "description": "SEO başlığı."
                                    },
                                    "meta_description": {
                                        "type": "string",
                                        "description": "SEO açıklaması."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/products/{id}": {
            "get": {
                "tags": [
                    "Ürünler"
                ],
                "operationId": "productsShow",
                "summary": "Ürün detayı",
                "description": "Kategoriler ve depo bazında stok dahil.\n\nYetki: `products:read`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "products:read"
            },
            "put": {
                "tags": [
                    "Ürünler"
                ],
                "operationId": "productsUpdate",
                "summary": "Ürün güncelleme",
                "description": "Yetki: `products:write`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "products:write",
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "sku": {
                                        "type": "string",
                                        "description": "Benzersiz stok kodu."
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Ürün adı."
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "simple, virtual ya da configurable; sonradan değişmez."
                                    },
                                    "price": {
                                        "type": "number",
                                        "description": "Satış fiyatı."
                                    },
                                    "qty": {
                                        "type": "number",
                                        "description": "Stok adedi (ilk açık depo ya da inventory_source_id)."
                                    },
                                    "inventory_source_id": {
                                        "type": "integer",
                                        "description": "Stoğun yazılacağı depo."
                                    },
                                    "status": {
                                        "type": "boolean",
                                        "description": "Satışta mı."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Açıklama (HTML)."
                                    },
                                    "short_description": {
                                        "type": "string",
                                        "description": "Kısa açıklama."
                                    },
                                    "url_key": {
                                        "type": "string",
                                        "description": "Adres parçası; verilmezse addan üretilir."
                                    },
                                    "weight": {
                                        "type": "number",
                                        "description": "Ağırlık."
                                    },
                                    "category_ids": {
                                        "type": "array",
                                        "description": "Kategori id listesi.",
                                        "items": {
                                            "type": [
                                                "object",
                                                "integer",
                                                "string"
                                            ]
                                        }
                                    },
                                    "meta_title": {
                                        "type": "string",
                                        "description": "SEO başlığı."
                                    },
                                    "meta_description": {
                                        "type": "string",
                                        "description": "SEO açıklaması."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Ürünler"
                ],
                "operationId": "productsDestroy",
                "summary": "Ürün silme",
                "description": "Yetki: `products:write`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "products:write"
            }
        },
        "/products/{id}/copy": {
            "post": {
                "tags": [
                    "Ürünler"
                ],
                "operationId": "productsCopy",
                "summary": "Ürünü kopyalama",
                "description": "Kopya kapalı (satışta değil) açılır.\n\nYetki: `products:write`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "products:write"
            }
        },
        "/products/{id}/categories": {
            "patch": {
                "tags": [
                    "Ürünler"
                ],
                "operationId": "productsCategories",
                "summary": "Ürünün kategorileri",
                "description": "Verilen liste ürünün kategorilerinin tamamı olur.\n\nYetki: `products:write`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "products:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "category_ids": {
                                        "type": "array",
                                        "description": "Kategori id listesi; boş liste bütün kategorilerden çıkarır.",
                                        "items": {
                                            "type": [
                                                "object",
                                                "integer",
                                                "string"
                                            ]
                                        }
                                    }
                                },
                                "required": [
                                    "category_ids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/products/{id}/status": {
            "patch": {
                "tags": [
                    "Ürünler"
                ],
                "operationId": "productsStatus",
                "summary": "Ürünü yayına alma / kaldırma",
                "description": "Yetki: `products:write`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "products:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "boolean",
                                        "description": "true: satışta, false: kapalı."
                                    }
                                },
                                "required": [
                                    "status"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/products/{id}/images": {
            "get": {
                "tags": [
                    "Ürünler"
                ],
                "operationId": "productsImages",
                "summary": "Ürün görselleri",
                "description": "Yetki: `products:read`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "products:read"
            },
            "post": {
                "tags": [
                    "Ürünler"
                ],
                "operationId": "productsImagesStore",
                "summary": "Görsel yükleme",
                "description": "multipart/form-data ile tek dosya (JPG, PNG, WebP; en fazla 15 MB). WebP'ye çevrilir, uzun kenarı 2400 px'e indirilir. Ürün başına en fazla 20 görsel. Cevap ürünün güncel görsel listesidir.\n\nYetki: `products:write`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "products:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "image": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "Görsel dosyası."
                                    },
                                    "cover": {
                                        "type": "boolean",
                                        "description": "1: kapak yapar (başa koyar). Yoksa sona eklenir."
                                    }
                                },
                                "required": [
                                    "image"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/products/{id}/images/{image_id}": {
            "delete": {
                "tags": [
                    "Ürünler"
                ],
                "operationId": "productsImagesDestroy",
                "summary": "Görsel silme",
                "description": "Cevap ürünün güncel görsel listesidir.\n\nYetki: `products:write`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "image_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "products:write"
            }
        },
        "/products/{id}/stock": {
            "get": {
                "tags": [
                    "Ürünler"
                ],
                "operationId": "productsStockShow",
                "summary": "Ürünün depo bazında stoğu",
                "description": "Yetki: `products:read`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "products:read"
            },
            "patch": {
                "tags": [
                    "Stok ve fiyat"
                ],
                "operationId": "productsStock",
                "summary": "Tek ürün stoğu",
                "description": "Yetki: `inventory:write`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "inventory:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "qty": {
                                        "type": "integer",
                                        "description": "Yeni adet (0 ve üstü)."
                                    },
                                    "inventory_source_id": {
                                        "type": "string",
                                        "description": "Depo id ya da kodu."
                                    }
                                },
                                "required": [
                                    "qty"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/inventory": {
            "patch": {
                "tags": [
                    "Stok ve fiyat"
                ],
                "operationId": "inventoryBulk",
                "summary": "Toplu stok (SKU ile)",
                "description": "Yetki: `inventory:write`",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                },
                                "example": {
                                    "data": [
                                        {
                                            "sku": "TSHIRT-S-BEYAZ",
                                            "id": 812,
                                            "status": "updated",
                                            "source": "default",
                                            "qty_before": 9,
                                            "qty": 14
                                        },
                                        {
                                            "sku": "TSHIRT-M-BEYAZ",
                                            "status": "not_found"
                                        }
                                    ],
                                    "meta": {
                                        "total": 2,
                                        "updated": 1,
                                        "failed": 1
                                    },
                                    "message": "Stoklar işlendi."
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "inventory:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "items": {
                                        "type": "array",
                                        "description": "1–500 satır: {sku, qty, inventory_source_id?}. Depo verilmezse ilk açık depo.",
                                        "items": {
                                            "type": [
                                                "object",
                                                "integer",
                                                "string"
                                            ]
                                        }
                                    }
                                },
                                "required": [
                                    "items"
                                ]
                            },
                            "example": {
                                "items": [
                                    {
                                        "sku": "TSHIRT-S-BEYAZ",
                                        "qty": 14
                                    },
                                    {
                                        "sku": "TSHIRT-M-BEYAZ",
                                        "qty": 0,
                                        "inventory_source_id": "merkez"
                                    }
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/prices": {
            "patch": {
                "tags": [
                    "Stok ve fiyat"
                ],
                "operationId": "pricesBulk",
                "summary": "Toplu fiyat (SKU ile)",
                "description": "special_price indirimli fiyattır; null gönderilirse indirim kalkar, gönderilmezse dokunulmaz.\n\nYetki: `prices:write`",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "prices:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "items": {
                                        "type": "array",
                                        "description": "1–500 satır: {sku, price?, special_price?}; ikisinden en az biri.",
                                        "items": {
                                            "type": [
                                                "object",
                                                "integer",
                                                "string"
                                            ]
                                        }
                                    }
                                },
                                "required": [
                                    "items"
                                ]
                            },
                            "example": {
                                "items": [
                                    {
                                        "sku": "TSHIRT-S-BEYAZ",
                                        "price": 449.9,
                                        "special_price": 399.9
                                    },
                                    {
                                        "sku": "KUPA-01",
                                        "special_price": null
                                    }
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/products/{id}/price": {
            "patch": {
                "tags": [
                    "Stok ve fiyat"
                ],
                "operationId": "productsPrice",
                "summary": "Tek ürün fiyatı",
                "description": "Yetki: `prices:write`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "prices:write",
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "price": {
                                        "type": "number",
                                        "description": "Satış fiyatı."
                                    },
                                    "special_price": {
                                        "type": "number",
                                        "description": "İndirimli fiyat; null indirimi kaldırır."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/categories": {
            "get": {
                "tags": [
                    "Kategoriler"
                ],
                "operationId": "categoriesIndex",
                "summary": "Kategori ağacı",
                "description": "Bütün kategoriler, alt kategorileriyle.\n\nYetki: `categories:read`",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "categories:read"
            },
            "post": {
                "tags": [
                    "Kategoriler"
                ],
                "operationId": "categoriesStore",
                "summary": "Kategori oluşturma",
                "description": "Yetki: `categories:write`",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "categories:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Kategori adı."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Açıklama (isteğe bağlı)."
                                    },
                                    "parent_id": {
                                        "type": "integer",
                                        "description": "Üst kategori; verilmezse mağazanın ana kategorisinin altına açılır."
                                    },
                                    "slug": {
                                        "type": "string",
                                        "description": "Adres parçası."
                                    },
                                    "status": {
                                        "type": "boolean",
                                        "description": "Açık mı."
                                    },
                                    "position": {
                                        "type": "integer",
                                        "description": "Sıra."
                                    },
                                    "display_mode": {
                                        "type": "string",
                                        "description": "products_only, description_only, products_and_description"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/categories/{id}": {
            "get": {
                "tags": [
                    "Kategoriler"
                ],
                "operationId": "categoriesShow",
                "summary": "Kategori detayı",
                "description": "Yetki: `categories:read`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "categories:read"
            },
            "put": {
                "tags": [
                    "Kategoriler"
                ],
                "operationId": "categoriesUpdate",
                "summary": "Kategori güncelleme",
                "description": "Yetki: `categories:write`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "categories:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Kategori adı."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Açıklama."
                                    },
                                    "parent_id": {
                                        "type": "integer",
                                        "description": "Üst kategori."
                                    },
                                    "slug": {
                                        "type": "string",
                                        "description": "Adres parçası."
                                    },
                                    "status": {
                                        "type": "boolean",
                                        "description": "Açık mı."
                                    },
                                    "position": {
                                        "type": "integer",
                                        "description": "Sıra."
                                    },
                                    "display_mode": {
                                        "type": "string",
                                        "description": "products_only, description_only, products_and_description"
                                    }
                                },
                                "required": [
                                    "name",
                                    "description"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Kategoriler"
                ],
                "operationId": "categoriesDestroy",
                "summary": "Kategori silme",
                "description": "Yetki: `categories:write`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "categories:write"
            }
        },
        "/categories/{id}/status": {
            "patch": {
                "tags": [
                    "Kategoriler"
                ],
                "operationId": "categoriesStatus",
                "summary": "Kategoriyi açma / kapama",
                "description": "Yetki: `categories:write`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "categories:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "boolean",
                                        "description": "true: açık."
                                    }
                                },
                                "required": [
                                    "status"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/orders": {
            "get": {
                "tags": [
                    "Siparişler"
                ],
                "operationId": "ordersIndex",
                "summary": "Sipariş listesi",
                "description": "Yetki: `orders:read`",
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Sipariş no, e-posta ya da müşteri adı.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "pending, pending_payment, processing, completed, canceled, closed, fraud",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Sayfa numarası (en yeniden eskiye sıralı liste).",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Sayfa başına kayıt, en fazla 100. Varsayılan 20.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "required": false,
                        "description": "ISO 8601 zaman. Yalnız bu andan sonra değişen kayıtlar, eskiden yeniye. Senkron için.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "Önceki cevaptaki meta.next_cursor. updated_since ile birlikte kullanılır.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "orders:read"
            }
        },
        "/orders/{id}": {
            "get": {
                "tags": [
                    "Siparişler"
                ],
                "operationId": "ordersShow",
                "summary": "Sipariş detayı",
                "description": "Yetki: `orders:read`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                },
                                "example": {
                                    "data": {
                                        "id": 1042,
                                        "increment_id": "1042",
                                        "status": "processing",
                                        "grand_total": 1249.8,
                                        "currency_code": "TRY",
                                        "customer_name": "Ayşe Yılmaz",
                                        "customer_email": "ayse@example.com",
                                        "customer_phone": "5551112233",
                                        "payment": {
                                            "method": "iyzico",
                                            "title": "Kredi kartı"
                                        },
                                        "shipping": {
                                            "method": "free_free",
                                            "title": "Ücretsiz kargo",
                                            "amount": 0
                                        },
                                        "shipping_address": {
                                            "first_name": "Ayşe",
                                            "last_name": "Yılmaz",
                                            "address": "Bağdat Cad. No 12",
                                            "city": "İstanbul",
                                            "state": "Kadıköy",
                                            "postcode": "34710",
                                            "country": "TR",
                                            "phone": "5551112233"
                                        },
                                        "items": [
                                            {
                                                "id": 3301,
                                                "sku": "TSHIRT-S-BEYAZ",
                                                "name": "Basic tişört",
                                                "qty_ordered": 2,
                                                "qty_invoiced": 2,
                                                "qty_shipped": 0,
                                                "qty_to_ship": 2,
                                                "price": 449.9
                                            }
                                        ],
                                        "can": {
                                            "invoice": false,
                                            "ship": true,
                                            "cancel": false
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "orders:read"
            }
        },
        "/orders/{id}/timeline": {
            "get": {
                "tags": [
                    "Siparişler"
                ],
                "operationId": "ordersTimeline",
                "summary": "Sipariş notları",
                "description": "Yetki: `orders:read`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "orders:read"
            }
        },
        "/orders/{id}/invoices": {
            "get": {
                "tags": [
                    "Siparişler"
                ],
                "operationId": "ordersInvoices",
                "summary": "Siparişin faturaları",
                "description": "Yetki: `orders:read`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "orders:read"
            },
            "post": {
                "tags": [
                    "Gönderi ve fatura"
                ],
                "operationId": "ordersInvoicesStore",
                "summary": "Fatura oluşturma",
                "description": "items verilmezse faturalanacak her şey faturalanır. Sipariş ödendi sayılır.\n\nYetki: `invoices:write`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "invoices:write",
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "items": {
                                        "type": "array",
                                        "description": "{order_item_id ya da sku, qty} satırları.",
                                        "items": {
                                            "type": [
                                                "object",
                                                "integer",
                                                "string"
                                            ]
                                        }
                                    },
                                    "external_number": {
                                        "type": "string",
                                        "description": "Dış e-fatura / e-arşiv numarası."
                                    },
                                    "external_url": {
                                        "type": "string",
                                        "description": "Faturanın https bağlantısı."
                                    }
                                }
                            },
                            "example": {
                                "external_number": "GIB2026000000123",
                                "external_url": "https://efatura.example.com/GIB2026000000123.pdf"
                            }
                        }
                    }
                }
            }
        },
        "/orders/{id}/shipments": {
            "get": {
                "tags": [
                    "Siparişler"
                ],
                "operationId": "ordersShipments",
                "summary": "Siparişin gönderileri",
                "description": "Yetki: `orders:read`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "orders:read"
            },
            "post": {
                "tags": [
                    "Gönderi ve fatura"
                ],
                "operationId": "ordersShipmentsStore",
                "summary": "Gönderi oluşturma",
                "description": "items verilmezse gönderilecek her şey gider. Depo verilmezse kalemler stoğu olan depolara panel gibi dağıtılır.\n\nYetki: `shipments:write`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "shipments:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "carrier_title": {
                                        "type": "string",
                                        "description": "Kargo firması, ör. Aras Kargo."
                                    },
                                    "track_number": {
                                        "type": "string",
                                        "description": "Takip numarası; sonradan da eklenebilir."
                                    },
                                    "inventory_source_id": {
                                        "type": "string",
                                        "description": "Gönderinin çıkacağı depo (id ya da kod)."
                                    },
                                    "items": {
                                        "type": "array",
                                        "description": "{order_item_id ya da sku, qty} satırları.",
                                        "items": {
                                            "type": [
                                                "object",
                                                "integer",
                                                "string"
                                            ]
                                        }
                                    }
                                },
                                "required": [
                                    "carrier_title"
                                ]
                            },
                            "example": {
                                "carrier_title": "Aras Kargo",
                                "track_number": "1234567890",
                                "items": [
                                    {
                                        "sku": "TSHIRT-S-BEYAZ",
                                        "qty": 2
                                    }
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/orders/{id}/comments": {
            "post": {
                "tags": [
                    "Siparişler"
                ],
                "operationId": "ordersCommentsStore",
                "summary": "Siparişe not ekleme",
                "description": "Yetki: `orders:write`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "orders:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "comment": {
                                        "type": "string",
                                        "description": "Not, en fazla 1000 karakter."
                                    },
                                    "customer_notified": {
                                        "type": "boolean",
                                        "description": "Müşteriye e-postayla bildirilsin mi."
                                    }
                                },
                                "required": [
                                    "comment"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/orders/{id}/cancel": {
            "post": {
                "tags": [
                    "Siparişler"
                ],
                "operationId": "ordersCancel",
                "summary": "Siparişi iptal etme",
                "description": "Faturalanmış ya da gönderilmiş kalem varsa iptal edilemez.\n\nYetki: `orders:write`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "orders:write"
            }
        },
        "/orders/{id}/status": {
            "patch": {
                "tags": [
                    "Siparişler"
                ],
                "operationId": "ordersStatus",
                "summary": "Sipariş durumunu değiştirme",
                "description": "Yalnız elle anlamlı geçişler: pending/pending_payment → processing ya da fraud; processing → fraud; fraud → pending ya da processing. Tamamlandı, iptal ve kapandı durumları fatura, gönderi, iptal ve iade işlemlerinden kendiliğinden gelir.\n\nYetki: `orders:write`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "orders:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "description": "Yeni durum."
                                    },
                                    "comment": {
                                        "type": "string",
                                        "description": "Siparişe düşülecek nota eklenir."
                                    }
                                },
                                "required": [
                                    "status"
                                ]
                            },
                            "example": {
                                "status": "processing",
                                "comment": "Havale hesaba geçti."
                            }
                        }
                    }
                }
            }
        },
        "/orders/{id}/shipments/{shipmentId}": {
            "patch": {
                "tags": [
                    "Gönderi ve fatura"
                ],
                "operationId": "ordersShipmentsUpdate",
                "summary": "Takip bilgisini güncelleme",
                "description": "Yetki: `shipments:write`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "shipmentId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "shipments:write",
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "carrier_title": {
                                        "type": "string",
                                        "description": "Kargo firması."
                                    },
                                    "track_number": {
                                        "type": "string",
                                        "description": "Takip numarası."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/orders/{id}/invoices/{invoiceId}": {
            "patch": {
                "tags": [
                    "Gönderi ve fatura"
                ],
                "operationId": "ordersInvoicesUpdate",
                "summary": "Dış fatura bilgisini güncelleme",
                "description": "Yetki: `invoices:write`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "invoiceId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "invoices:write",
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "external_number": {
                                        "type": "string",
                                        "description": "Dış e-fatura numarası."
                                    },
                                    "external_url": {
                                        "type": "string",
                                        "description": "Faturanın https bağlantısı."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/customers": {
            "get": {
                "tags": [
                    "Müşteriler"
                ],
                "operationId": "customersIndex",
                "summary": "Müşteri listesi",
                "description": "Yetki: `customers:read`",
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Ad, e-posta ya da telefon.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Sayfa numarası (en yeniden eskiye sıralı liste).",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Sayfa başına kayıt, en fazla 100. Varsayılan 20.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "required": false,
                        "description": "ISO 8601 zaman. Yalnız bu andan sonra değişen kayıtlar, eskiden yeniye. Senkron için.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "Önceki cevaptaki meta.next_cursor. updated_since ile birlikte kullanılır.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "customers:read"
            },
            "post": {
                "tags": [
                    "Müşteriler"
                ],
                "operationId": "customersStore",
                "summary": "Müşteri oluşturma",
                "description": "Yetki: `customers:write`",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "customers:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "first_name": {
                                        "type": "string",
                                        "description": "Ad."
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Soyad."
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "E-posta, mağazada benzersiz."
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Telefon, benzersiz."
                                    },
                                    "gender": {
                                        "type": "string",
                                        "description": "Cinsiyet."
                                    },
                                    "date_of_birth": {
                                        "type": "string",
                                        "description": "YYYY-AA-GG."
                                    },
                                    "customer_group_id": {
                                        "type": "integer",
                                        "description": "Müşteri grubu."
                                    },
                                    "status": {
                                        "type": "boolean",
                                        "description": "Açık mı."
                                    }
                                },
                                "required": [
                                    "first_name",
                                    "last_name",
                                    "email"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/customers/groups": {
            "get": {
                "tags": [
                    "Müşteriler"
                ],
                "operationId": "customersGroups",
                "summary": "Müşteri grupları",
                "description": "Yetki: `customers:read`",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "customers:read"
            }
        },
        "/customers/{id}": {
            "get": {
                "tags": [
                    "Müşteriler"
                ],
                "operationId": "customersShow",
                "summary": "Müşteri detayı",
                "description": "Yetki: `customers:read`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "customers:read"
            },
            "put": {
                "tags": [
                    "Müşteriler"
                ],
                "operationId": "customersUpdate",
                "summary": "Müşteri güncelleme",
                "description": "Yetki: `customers:write`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "customers:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "first_name": {
                                        "type": "string",
                                        "description": "Ad."
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Soyad."
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "E-posta, mağazada benzersiz."
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Telefon, benzersiz."
                                    },
                                    "gender": {
                                        "type": "string",
                                        "description": "Cinsiyet."
                                    },
                                    "date_of_birth": {
                                        "type": "string",
                                        "description": "YYYY-AA-GG."
                                    },
                                    "customer_group_id": {
                                        "type": "integer",
                                        "description": "Müşteri grubu."
                                    },
                                    "status": {
                                        "type": "boolean",
                                        "description": "Açık mı."
                                    }
                                },
                                "required": [
                                    "first_name",
                                    "last_name",
                                    "email"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Müşteriler"
                ],
                "operationId": "customersDestroy",
                "summary": "Müşteri silme",
                "description": "Yetki: `customers:write`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "customers:write"
            }
        },
        "/customers/{id}/orders": {
            "get": {
                "tags": [
                    "Müşteriler"
                ],
                "operationId": "customersOrders",
                "summary": "Müşterinin siparişleri",
                "description": "Yetki: `customers:read`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "customers:read"
            }
        },
        "/customers/{id}/status": {
            "patch": {
                "tags": [
                    "Müşteriler"
                ],
                "operationId": "customersStatus",
                "summary": "Müşteriyi açma / kapama",
                "description": "Yetki: `customers:write`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "customers:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "boolean",
                                        "description": "true: açık."
                                    }
                                },
                                "required": [
                                    "status"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/webhooks": {
            "get": {
                "tags": [
                    "Webhook adresleri"
                ],
                "operationId": "webhooksIndex",
                "summary": "Webhook adresleri",
                "description": "Yetki: `webhooks:manage`",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "webhooks:manage"
            },
            "post": {
                "tags": [
                    "Webhook adresleri"
                ],
                "operationId": "webhooksStore",
                "summary": "Adres ekleme",
                "description": "Cevaptaki secret (whsec_…) yalnız bir kez gösterilir.\n\nYetki: `webhooks:manage`",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "webhooks:manage",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "description": "https adresi."
                                    },
                                    "events": {
                                        "type": "array",
                                        "description": "Olay listesi; \"*\" bütün olaylar.",
                                        "items": {
                                            "type": [
                                                "object",
                                                "integer",
                                                "string"
                                            ]
                                        }
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Görünen ad."
                                    },
                                    "max_attempts": {
                                        "type": "integer",
                                        "description": "1–10, varsayılan 6."
                                    }
                                },
                                "required": [
                                    "url",
                                    "events"
                                ]
                            },
                            "example": {
                                "url": "https://entegrasyonum.com/hemen/webhook",
                                "events": [
                                    "order.created",
                                    "order.paid",
                                    "order.cancelled"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/webhooks/{id}": {
            "get": {
                "tags": [
                    "Webhook adresleri"
                ],
                "operationId": "webhooksShow",
                "summary": "Adres detayı",
                "description": "Yetki: `webhooks:manage`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "webhooks:manage"
            },
            "patch": {
                "tags": [
                    "Webhook adresleri"
                ],
                "operationId": "webhooksUpdate",
                "summary": "Adresi güncelleme",
                "description": "Yetki: `webhooks:manage`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "webhooks:manage",
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "description": "https adresi."
                                    },
                                    "events": {
                                        "type": "array",
                                        "description": "Olay listesi.",
                                        "items": {
                                            "type": [
                                                "object",
                                                "integer",
                                                "string"
                                            ]
                                        }
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "active ya da inactive."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Webhook adresleri"
                ],
                "operationId": "webhooksDestroy",
                "summary": "Adresi silme",
                "description": "Yetki: `webhooks:manage`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "webhooks:manage"
            }
        },
        "/webhooks/{id}/rotate-secret": {
            "post": {
                "tags": [
                    "Webhook adresleri"
                ],
                "operationId": "webhooksRotate",
                "summary": "İmza anahtarını yenileme",
                "description": "Yetki: `webhooks:manage`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "webhooks:manage"
            }
        },
        "/webhooks/{id}/test": {
            "post": {
                "tags": [
                    "Webhook adresleri"
                ],
                "operationId": "webhooksTest",
                "summary": "Deneme bildirimi gönderme",
                "description": "webhook.test olayını yalnız bu adrese gönderir.\n\nYetki: `webhooks:manage`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "webhooks:manage"
            }
        },
        "/webhooks/{id}/deliveries": {
            "get": {
                "tags": [
                    "Webhook adresleri"
                ],
                "operationId": "webhooksDeliveries",
                "summary": "Teslim kayıtları",
                "description": "Yetki: `webhooks:manage`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Sayfa numarası (en yeniden eskiye sıralı liste).",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Sayfa başına kayıt, en fazla 100. Varsayılan 20.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "webhooks:manage"
            }
        },
        "/storefront-scripts": {
            "get": {
                "tags": [
                    "Vitrin scriptleri"
                ],
                "operationId": "storefrontScriptsIndex",
                "summary": "Script listesi",
                "description": "Yetki: `scripts:manage`",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "scripts:manage"
            },
            "post": {
                "tags": [
                    "Vitrin scriptleri"
                ],
                "operationId": "storefrontScriptsStore",
                "summary": "Script ekleme",
                "description": "Yetki: `scripts:manage`",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "scripts:manage",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Görünen ad, 3–120 karakter."
                                    },
                                    "url": {
                                        "type": "string",
                                        "description": "Scriptin https adresi."
                                    },
                                    "handle": {
                                        "type": "string",
                                        "description": "Kısa ad (küçük harf, rakam, _ ve -); boşsa addan üretilir. Kanalda benzersiz."
                                    },
                                    "channel": {
                                        "type": "string",
                                        "description": "Kanal kodu; boş: bütün kanallar."
                                    },
                                    "placement": {
                                        "type": "string",
                                        "description": "head, body_start ya da body_end (varsayılan)."
                                    },
                                    "priority": {
                                        "type": "integer",
                                        "description": "0–1000, küçük olan önce yüklenir; varsayılan 100."
                                    },
                                    "consent_required": {
                                        "type": "boolean",
                                        "description": "Varsayılan true: ziyaretçi çerez izni verince yüklenir."
                                    },
                                    "events": {
                                        "type": "array",
                                        "description": "Scriptin dinleyeceği vitrin olayları: PAGE_VIEW, PRODUCT_VIEW, ADD_TO_CART, REMOVE_FROM_CART, VIEW_CART, BEGIN_CHECKOUT, COMPLETE_CHECKOUT, CUSTOMER_LOGIN, CUSTOMER_REGISTER.",
                                        "items": {
                                            "type": [
                                                "object",
                                                "integer",
                                                "string"
                                            ]
                                        }
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "active ya da inactive."
                                    }
                                },
                                "required": [
                                    "name",
                                    "url"
                                ]
                            },
                            "example": {
                                "name": "Yorum rozeti",
                                "url": "https://cdn.entegrasyonum.com/rozet.js",
                                "placement": "body_end",
                                "events": [
                                    "PRODUCT_VIEW"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/storefront-scripts/{id}": {
            "get": {
                "tags": [
                    "Vitrin scriptleri"
                ],
                "operationId": "storefrontScriptsShow",
                "summary": "Script detayı",
                "description": "Yetki: `scripts:manage`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "scripts:manage"
            },
            "patch": {
                "tags": [
                    "Vitrin scriptleri"
                ],
                "operationId": "storefrontScriptsUpdate",
                "summary": "Scripti güncelleme",
                "description": "Yetki: `scripts:manage`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "scripts:manage",
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Görünen ad, 3–120 karakter."
                                    },
                                    "url": {
                                        "type": "string",
                                        "description": "Scriptin https adresi."
                                    },
                                    "handle": {
                                        "type": "string",
                                        "description": "Kısa ad (küçük harf, rakam, _ ve -); boşsa addan üretilir. Kanalda benzersiz."
                                    },
                                    "channel": {
                                        "type": "string",
                                        "description": "Kanal kodu; boş: bütün kanallar."
                                    },
                                    "placement": {
                                        "type": "string",
                                        "description": "head, body_start ya da body_end (varsayılan)."
                                    },
                                    "priority": {
                                        "type": "integer",
                                        "description": "0–1000, küçük olan önce yüklenir; varsayılan 100."
                                    },
                                    "consent_required": {
                                        "type": "boolean",
                                        "description": "Varsayılan true: ziyaretçi çerez izni verince yüklenir."
                                    },
                                    "events": {
                                        "type": "array",
                                        "description": "Scriptin dinleyeceği vitrin olayları: PAGE_VIEW, PRODUCT_VIEW, ADD_TO_CART, REMOVE_FROM_CART, VIEW_CART, BEGIN_CHECKOUT, COMPLETE_CHECKOUT, CUSTOMER_LOGIN, CUSTOMER_REGISTER.",
                                        "items": {
                                            "type": [
                                                "object",
                                                "integer",
                                                "string"
                                            ]
                                        }
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "active ya da inactive."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Vitrin scriptleri"
                ],
                "operationId": "storefrontScriptsDestroy",
                "summary": "Scripti silme",
                "description": "Yetki: `scripts:manage`",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Başarılı",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ok"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "x-scope": "scripts:manage"
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "description": "Gizli yönetim anahtarı: hm_sk_…"
            }
        },
        "schemas": {
            "Error": {
                "type": "object",
                "properties": {
                    "error": {
                        "type": "object",
                        "properties": {
                            "code": {
                                "type": "string",
                                "enum": [
                                    "invalid_key",
                                    "key_disabled",
                                    "store_not_found",
                                    "plan_required",
                                    "scope_missing",
                                    "not_found",
                                    "validation_failed",
                                    "invalid_transition",
                                    "order_not_shippable",
                                    "order_not_invoiceable",
                                    "insufficient_stock",
                                    "rate_limited",
                                    "server_error"
                                ]
                            },
                            "message": {
                                "type": "string"
                            },
                            "fields": {
                                "type": "object",
                                "additionalProperties": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "Ok": {
                "type": "object",
                "properties": {
                    "data": {},
                    "meta": {
                        "type": "object"
                    },
                    "message": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                }
            }
        },
        "responses": {
            "Error": {
                "description": "Hata",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        }
                    }
                }
            }
        }
    }
}