{
  "openapi": "3.1.0",
  "info": {
    "title": "Atlas Customer API",
    "version": "1.0.0",
    "description": "Ortam anahtara bağlıdır; URL, başlık veya sorgu parametresi ortamı değiştirmez.\nHer isteği firmanızın aynı alan adına gönderin. Başka firmanın alan adı erişim vermez.\nAnahtar yalnızca oluşturma ve yenilemede bir kez gösterilir. İptal, yenileme ve izin değişikliği mevcut tokenları geçersiz kılar.\nListeler limit/cursor kullanır. inventory ve prices için kind=product veya kind=variant seçin.\nVaryasyon options alanı üç sabit eksen sırasını korur; seçilmeyen eksen null değeridir.\nUygulama başına en fazla 20 geçerli token saklanır; yeni token isteği en eski tokenı geçersiz kılabilir.\nFiyatlar indirim uygulanmamış liste fiyatıdır, bayi satış teklifi değildir. Varyasyonlu ürünün fiyatı için kind=variant kullanın.\nPara tutarları ondalık metindir (fiyat 4, bakiye 2 hane). Cari bakiye TRY'dir; eski kayan nokta değerleri bu hassasiyette yuvarlanır.\nSipariş API'si operasyonel durum ve miktarları verir; finansal toplam, ödeme URL'si, teslimat adresi ve kişisel iletişim bilgisi içermez.\nV1 iş verilerini değiştirmez. Sandbox gerçek iş veritabanı tablolarına erişmez.\nAnahtarları yalnızca sunucu tarafında ve gizli kasa içinde saklayın; URL veya kaynak koda koymayın.\nInspect HTTP status and Content-Type before parsing errors. V1 handler errors use error.code; tenant, subscription, IP and other upstream guards can use the documented alternate envelopes. Proxies may also return non-JSON failures."
  },
  "servers": [
    {
      "url": "/api/v1",
      "description": "Use your registered HTTPS tenant hostname. Environment is fixed on the application, not selected by the caller."
    }
  ],
  "paths": {
    "/products": {
      "get": {
        "operationId": "read_products",
        "summary": "Ürünleri listele",
        "description": "Required scope: products:read. No browser session or cookie grants machine access.",
        "x-required-scopes": [
          "products:read"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,18}$"
            },
            "description": "Opaque-to-client continuation: copy next_cursor from the previous response. Omit on the first page."
          }
        ],
        "responses": {
          "200": {
            "description": "Allowlisted read-only data. Monetary values are decimal strings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductPage"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credentials, or rejection of unsupported browser-preview authentication. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm challenge from the V1 handler; an upstream rejection may omit it."
              }
            }
          },
          "402": {
            "description": "Workspace subscription does not permit access; grace mode may reject token POST while allowing GET. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, module, IP policy or unsupported browser-preview mode denied access. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource or tenant hostname is not available. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Request body exceeds 8192 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported content type; token exchange requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input; request values are never reflected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; wait for Retry-After before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds to wait (currently 60)."
              }
            }
          },
          "503": {
            "description": "Service, business data or tenant/control-layer readiness is unavailable. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unresolved request host. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "An unhandled upstream platform failure occurred. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformError"
                }
              }
            }
          }
        }
      }
    },
    "/products/{id}": {
      "get": {
        "operationId": "read_product",
        "summary": "Ürün bilgisi",
        "description": "Required scope: products:read. No browser session or cookie grants machine access.",
        "x-required-scopes": [
          "products:read"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]{0,17}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Allowlisted read-only data. Monetary values are decimal strings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credentials, or rejection of unsupported browser-preview authentication. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm challenge from the V1 handler; an upstream rejection may omit it."
              }
            }
          },
          "402": {
            "description": "Workspace subscription does not permit access; grace mode may reject token POST while allowing GET. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, module, IP policy or unsupported browser-preview mode denied access. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource or tenant hostname is not available. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Request body exceeds 8192 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported content type; token exchange requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input; request values are never reflected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; wait for Retry-After before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds to wait (currently 60)."
              }
            }
          },
          "503": {
            "description": "Service, business data or tenant/control-layer readiness is unavailable. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unresolved request host. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "An unhandled upstream platform failure occurred. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformError"
                }
              }
            }
          }
        }
      }
    },
    "/products/{id}/variants": {
      "get": {
        "operationId": "read_variants",
        "summary": "Ürün varyasyonları",
        "description": "Required scope: products:read. No browser session or cookie grants machine access.",
        "x-required-scopes": [
          "products:read"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]{0,17}$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,18}$"
            },
            "description": "Opaque-to-client continuation: copy next_cursor from the previous response. Omit on the first page."
          }
        ],
        "responses": {
          "200": {
            "description": "Allowlisted read-only data. Monetary values are decimal strings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VariantPage"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credentials, or rejection of unsupported browser-preview authentication. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm challenge from the V1 handler; an upstream rejection may omit it."
              }
            }
          },
          "402": {
            "description": "Workspace subscription does not permit access; grace mode may reject token POST while allowing GET. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, module, IP policy or unsupported browser-preview mode denied access. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource or tenant hostname is not available. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Request body exceeds 8192 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported content type; token exchange requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input; request values are never reflected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; wait for Retry-After before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds to wait (currently 60)."
              }
            }
          },
          "503": {
            "description": "Service, business data or tenant/control-layer readiness is unavailable. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unresolved request host. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "An unhandled upstream platform failure occurred. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformError"
                }
              }
            }
          }
        }
      }
    },
    "/inventory": {
      "get": {
        "operationId": "read_inventory",
        "summary": "Stok miktarları",
        "description": "Required scope: inventory:read. No browser session or cookie grants machine access.",
        "x-required-scopes": [
          "inventory:read"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,18}$"
            },
            "description": "Opaque-to-client continuation: copy next_cursor from the previous response. Omit on the first page."
          },
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "product",
                "variant"
              ],
              "default": "product"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Allowlisted read-only data. Monetary values are decimal strings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventoryPage"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credentials, or rejection of unsupported browser-preview authentication. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm challenge from the V1 handler; an upstream rejection may omit it."
              }
            }
          },
          "402": {
            "description": "Workspace subscription does not permit access; grace mode may reject token POST while allowing GET. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, module, IP policy or unsupported browser-preview mode denied access. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource or tenant hostname is not available. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Request body exceeds 8192 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported content type; token exchange requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input; request values are never reflected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; wait for Retry-After before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds to wait (currently 60)."
              }
            }
          },
          "503": {
            "description": "Service, business data or tenant/control-layer readiness is unavailable. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unresolved request host. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "An unhandled upstream platform failure occurred. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformError"
                }
              }
            }
          }
        }
      }
    },
    "/prices": {
      "get": {
        "operationId": "read_prices",
        "summary": "Liste fiyatları",
        "description": "Required scope: prices:read. No browser session or cookie grants machine access.",
        "x-required-scopes": [
          "prices:read"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,18}$"
            },
            "description": "Opaque-to-client continuation: copy next_cursor from the previous response. Omit on the first page."
          },
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "product",
                "variant"
              ],
              "default": "product"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Allowlisted read-only data. Monetary values are decimal strings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PricePage"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credentials, or rejection of unsupported browser-preview authentication. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm challenge from the V1 handler; an upstream rejection may omit it."
              }
            }
          },
          "402": {
            "description": "Workspace subscription does not permit access; grace mode may reject token POST while allowing GET. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, module, IP policy or unsupported browser-preview mode denied access. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource or tenant hostname is not available. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Request body exceeds 8192 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported content type; token exchange requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input; request values are never reflected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; wait for Retry-After before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds to wait (currently 60)."
              }
            }
          },
          "503": {
            "description": "Service, business data or tenant/control-layer readiness is unavailable. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unresolved request host. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "An unhandled upstream platform failure occurred. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformError"
                }
              }
            }
          }
        }
      }
    },
    "/orders": {
      "get": {
        "operationId": "read_orders",
        "summary": "Siparişler",
        "description": "Required scope: orders:read. No browser session or cookie grants machine access.",
        "x-required-scopes": [
          "orders:read"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,18}$"
            },
            "description": "Opaque-to-client continuation: copy next_cursor from the previous response. Omit on the first page."
          }
        ],
        "responses": {
          "200": {
            "description": "Allowlisted read-only data. Monetary values are decimal strings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderPage"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credentials, or rejection of unsupported browser-preview authentication. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm challenge from the V1 handler; an upstream rejection may omit it."
              }
            }
          },
          "402": {
            "description": "Workspace subscription does not permit access; grace mode may reject token POST while allowing GET. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, module, IP policy or unsupported browser-preview mode denied access. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource or tenant hostname is not available. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Request body exceeds 8192 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported content type; token exchange requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input; request values are never reflected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; wait for Retry-After before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds to wait (currently 60)."
              }
            }
          },
          "503": {
            "description": "Service, business data or tenant/control-layer readiness is unavailable. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unresolved request host. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "An unhandled upstream platform failure occurred. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformError"
                }
              }
            }
          }
        }
      }
    },
    "/orders/{id}": {
      "get": {
        "operationId": "read_order",
        "summary": "Sipariş bilgisi",
        "description": "Required scope: orders:read. No browser session or cookie grants machine access.",
        "x-required-scopes": [
          "orders:read"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]{0,17}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Allowlisted read-only data. Monetary values are decimal strings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credentials, or rejection of unsupported browser-preview authentication. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm challenge from the V1 handler; an upstream rejection may omit it."
              }
            }
          },
          "402": {
            "description": "Workspace subscription does not permit access; grace mode may reject token POST while allowing GET. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, module, IP policy or unsupported browser-preview mode denied access. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource or tenant hostname is not available. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Request body exceeds 8192 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported content type; token exchange requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input; request values are never reflected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; wait for Retry-After before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds to wait (currently 60)."
              }
            }
          },
          "503": {
            "description": "Service, business data or tenant/control-layer readiness is unavailable. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unresolved request host. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "An unhandled upstream platform failure occurred. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformError"
                }
              }
            }
          }
        }
      }
    },
    "/orders/{id}/items": {
      "get": {
        "operationId": "read_order_items",
        "summary": "Sipariş kalemleri",
        "description": "Required scope: orders:read. No browser session or cookie grants machine access.",
        "x-required-scopes": [
          "orders:read"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]{0,17}$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,18}$"
            },
            "description": "Opaque-to-client continuation: copy next_cursor from the previous response. Omit on the first page."
          }
        ],
        "responses": {
          "200": {
            "description": "Allowlisted read-only data. Monetary values are decimal strings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderItemPage"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credentials, or rejection of unsupported browser-preview authentication. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm challenge from the V1 handler; an upstream rejection may omit it."
              }
            }
          },
          "402": {
            "description": "Workspace subscription does not permit access; grace mode may reject token POST while allowing GET. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, module, IP policy or unsupported browser-preview mode denied access. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource or tenant hostname is not available. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Request body exceeds 8192 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported content type; token exchange requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input; request values are never reflected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; wait for Retry-After before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds to wait (currently 60)."
              }
            }
          },
          "503": {
            "description": "Service, business data or tenant/control-layer readiness is unavailable. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unresolved request host. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "An unhandled upstream platform failure occurred. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformError"
                }
              }
            }
          }
        }
      }
    },
    "/dealers": {
      "get": {
        "operationId": "read_dealers",
        "summary": "Bayiler",
        "description": "Required scope: dealers:read. No browser session or cookie grants machine access.",
        "x-required-scopes": [
          "dealers:read"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,18}$"
            },
            "description": "Opaque-to-client continuation: copy next_cursor from the previous response. Omit on the first page."
          }
        ],
        "responses": {
          "200": {
            "description": "Allowlisted read-only data. Monetary values are decimal strings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DealerPage"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credentials, or rejection of unsupported browser-preview authentication. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm challenge from the V1 handler; an upstream rejection may omit it."
              }
            }
          },
          "402": {
            "description": "Workspace subscription does not permit access; grace mode may reject token POST while allowing GET. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, module, IP policy or unsupported browser-preview mode denied access. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource or tenant hostname is not available. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Request body exceeds 8192 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported content type; token exchange requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input; request values are never reflected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; wait for Retry-After before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds to wait (currently 60)."
              }
            }
          },
          "503": {
            "description": "Service, business data or tenant/control-layer readiness is unavailable. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unresolved request host. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "An unhandled upstream platform failure occurred. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformError"
                }
              }
            }
          }
        }
      }
    },
    "/dealers/{id}/balance": {
      "get": {
        "operationId": "read_balance",
        "summary": "TRY cari bakiye",
        "description": "Required scope: balances:read. No browser session or cookie grants machine access.",
        "x-required-scopes": [
          "balances:read"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]{0,17}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Allowlisted read-only data. Monetary values are decimal strings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Balance"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credentials, or rejection of unsupported browser-preview authentication. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm challenge from the V1 handler; an upstream rejection may omit it."
              }
            }
          },
          "402": {
            "description": "Workspace subscription does not permit access; grace mode may reject token POST while allowing GET. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, module, IP policy or unsupported browser-preview mode denied access. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource or tenant hostname is not available. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Request body exceeds 8192 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported content type; token exchange requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input; request values are never reflected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; wait for Retry-After before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds to wait (currently 60)."
              }
            }
          },
          "503": {
            "description": "Service, business data or tenant/control-layer readiness is unavailable. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unresolved request host. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "An unhandled upstream platform failure occurred. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/token": {
      "post": {
        "operationId": "exchange_client_credentials",
        "summary": "Exchange Atlas JSON client credentials for an opaque bearer token (not OAuth)",
        "description": "Server-to-server only. A maximum of 20 active tokens is retained per application; issuing more invalidates the oldest. Key expiry, revocation, rotation or permission change can end access earlier than expires_in.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenRequest"
              },
              "example": {
                "client_id": "<CLIENT_ID>",
                "client_secret": "<CLIENT_SECRET>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Store securely in server memory/cache; never in a URL or browser bundle.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Token"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credentials, or rejection of unsupported browser-preview authentication. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "Bearer realm challenge from the V1 handler; an upstream rejection may omit it."
              }
            }
          },
          "402": {
            "description": "Workspace subscription does not permit access; grace mode may reject token POST while allowing GET. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, module, IP policy or unsupported browser-preview mode denied access. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource or tenant hostname is not available. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Request body exceeds 8192 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported content type; token exchange requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input; request values are never reflected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached; wait for Retry-After before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds to wait (currently 60)."
              }
            }
          },
          "503": {
            "description": "Service, business data or tenant/control-layer readiness is unavailable. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unresolved request host. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PlatformError"
                    },
                    {
                      "$ref": "#/components/schemas/UpstreamDetailError"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "An unhandled upstream platform failure occurred. Inspect HTTP status first; the JSON envelope depends on the rejecting layer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Product": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "sku",
          "barcode",
          "name",
          "category",
          "manufacturer",
          "has_variants",
          "active"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[1-9][0-9]{0,17}$"
          },
          "sku": {
            "type": [
              "string",
              "null"
            ]
          },
          "barcode": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "category": {
            "type": [
              "string",
              "null"
            ]
          },
          "manufacturer": {
            "type": [
              "string",
              "null"
            ]
          },
          "has_variants": {
            "type": "boolean"
          },
          "active": {
            "type": "boolean"
          }
        }
      },
      "Variant": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "product_id",
          "options",
          "active"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[1-9][0-9]{0,17}$"
          },
          "product_id": {
            "type": "string",
            "pattern": "^[1-9][0-9]{0,17}$"
          },
          "options": {
            "type": "array",
            "minItems": 3,
            "maxItems": 3,
            "items": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Fixed positions: axis 1, axis 2, axis 3. An absent optional axis is null; positions never shift."
          },
          "active": {
            "type": "boolean"
          }
        }
      },
      "Inventory": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "product_id",
          "variant_id",
          "quantity",
          "kind"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[1-9][0-9]{0,17}$"
          },
          "product_id": {
            "type": "string",
            "pattern": "^[1-9][0-9]{0,17}$"
          },
          "variant_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,17}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "quantity": {
            "type": "integer"
          },
          "kind": {
            "type": "string",
            "enum": [
              "product",
              "variant"
            ]
          }
        }
      },
      "Price": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "product_id",
          "variant_id",
          "amount",
          "currency",
          "vat_rate",
          "vat_included",
          "kind",
          "price_type",
          "indicative"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[1-9][0-9]{0,17}$"
          },
          "product_id": {
            "type": "string",
            "pattern": "^[1-9][0-9]{0,17}$"
          },
          "variant_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,17}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "amount": {
            "type": "string",
            "pattern": "^-?[0-9]+\\.[0-9]{4}$"
          },
          "currency": {
            "type": "string",
            "enum": [
              "TRY",
              "USD",
              "EUR",
              "GBP"
            ]
          },
          "vat_rate": {
            "type": "string",
            "pattern": "^-?[0-9]+\\.[0-9]{4}$"
          },
          "vat_included": {
            "type": "boolean"
          },
          "kind": {
            "type": "string",
            "enum": [
              "product",
              "variant"
            ]
          },
          "price_type": {
            "type": "string",
            "const": "list"
          },
          "indicative": {
            "type": "boolean",
            "description": "True for a variant-bearing parent product. Request kind=variant for the actual option price."
          }
        }
      },
      "Order": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "dealer_id",
          "status",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[1-9][0-9]{0,17}$"
          },
          "dealer_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,17}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "OrderItem": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "product_id",
          "variant_id",
          "quantity"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[1-9][0-9]{0,17}$"
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,17}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "variant_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,17}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "quantity": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Null means an unknown quantity in a historical record; it is never silently replaced with zero."
          }
        }
      },
      "Dealer": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "account_code",
          "company_name",
          "active"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[1-9][0-9]{0,17}$"
          },
          "account_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "active": {
            "type": "boolean"
          }
        }
      },
      "Balance": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "dealer_id",
          "currency",
          "balance",
          "pending_orders",
          "as_of"
        ],
        "properties": {
          "dealer_id": {
            "type": "string",
            "pattern": "^[1-9][0-9]{0,17}$"
          },
          "currency": {
            "type": "string",
            "const": "TRY"
          },
          "balance": {
            "type": "string",
            "pattern": "^-?[0-9]+\\.[0-9]{2}$"
          },
          "pending_orders": {
            "type": "string",
            "pattern": "^-?[0-9]+\\.[0-9]{2}$"
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TokenRequest": {
        "additionalProperties": false,
        "properties": {
          "client_id": {
            "maxLength": 64,
            "pattern": "^atlas_(sandbox|live)_[A-Za-z0-9_-]{32}$",
            "title": "Client Id",
            "type": "string"
          },
          "client_secret": {
            "maxLength": 64,
            "pattern": "^atlas_sk_[A-Za-z0-9_-]{48}$",
            "title": "Client Secret",
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "client_id",
          "client_secret"
        ],
        "title": "TokenRequest",
        "type": "object"
      },
      "Token": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "access_token",
          "token_type",
          "expires_in",
          "scope",
          "environment"
        ],
        "properties": {
          "access_token": {
            "type": "string",
            "readOnly": true
          },
          "token_type": {
            "type": "string",
            "const": "Bearer"
          },
          "expires_in": {
            "type": "integer",
            "minimum": 0,
            "maximum": 900
          },
          "scope": {
            "type": "string",
            "description": "Space-separated granted read scopes."
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "live"
            ]
          }
        }
      },
      "Error": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "code"
            ],
            "properties": {
              "code": {
                "type": "string"
              }
            }
          }
        }
      },
      "PlatformError": {
        "type": "object",
        "required": [
          "durum",
          "mesaj"
        ],
        "additionalProperties": true,
        "description": "An existing tenant, subscription, IP or platform layer rejected the request before the V1 handler. Extra policy metadata may be present; inspect HTTP status first.",
        "properties": {
          "durum": {
            "type": "string",
            "const": "hata"
          },
          "mesaj": {
            "type": "string"
          },
          "kod": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional platform-specific code; not a V1 error.code."
          },
          "hata_kodu": {
            "type": "string",
            "description": "Optional opaque diagnostic identifier."
          }
        }
      },
      "UpstreamDetailError": {
        "type": "object",
        "required": [
          "detail"
        ],
        "additionalProperties": true,
        "description": "A host guard or unsupported browser-preview request may use the existing detail envelope. Do not send browser-preview headers or cookies with machine requests.",
        "properties": {
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "additionalProperties": true
              }
            ]
          }
        }
      },
      "DealerPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "has_more",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/Dealer"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,17}$"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "InventoryPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "has_more",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/Inventory"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,17}$"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "OrderPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "has_more",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/Order"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,17}$"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "OrderItemPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "has_more",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/OrderItem"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,17}$"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "PricePage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "has_more",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/Price"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,17}$"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ProductPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "has_more",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/Product"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,17}$"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "VariantPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "has_more",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/Variant"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,17}$"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "opaque"
      }
    }
  }
}
