{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aidelly-ai/json-schema/aidelly-ai-connect-ecommerce-store-request-schema.json",
  "title": "ConnectEcommerceStoreRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aidelly-ai-ecommerce-api-openapi.yml#/components/schemas/ConnectEcommerceStoreRequest",
  "type": "object",
  "required": [
    "provider",
    "shopDomain",
    "credentials"
  ],
  "properties": {
    "provider": {
      "$ref": "#/$defs/EcommerceProvider"
    },
    "shopDomain": {
      "type": "string"
    },
    "credentials": {
      "oneOf": [
        {
          "type": "object",
          "required": [
            "clientId",
            "clientSecret"
          ],
          "properties": {
            "clientId": {
              "type": "string"
            },
            "clientSecret": {
              "type": "string",
              "format": "password"
            }
          },
          "description": "Current Shopify Dev Dashboard app credentials."
        },
        {
          "type": "object",
          "required": [
            "accessToken"
          ],
          "properties": {
            "accessToken": {
              "type": "string"
            }
          },
          "description": "Legacy Shopify, Etsy, or Wix credentials."
        },
        {
          "type": "object",
          "required": [
            "consumerKey",
            "consumerSecret"
          ],
          "properties": {
            "consumerKey": {
              "type": "string"
            },
            "consumerSecret": {
              "type": "string"
            }
          },
          "description": "WooCommerce REST API credentials."
        }
      ]
    }
  },
  "$defs": {
    "EcommerceProvider": {
      "type": "string",
      "enum": [
        "shopify",
        "woocommerce",
        "etsy",
        "wix"
      ]
    }
  }
}