{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sitesplaced-com/json-schema/sitesplaced-com-me-schema.json",
  "title": "Me",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sitesplaced-com-openapi.json#/components/schemas/Me",
  "type": "object",
  "required": [
    "api_version",
    "store",
    "key",
    "limits"
  ],
  "properties": {
    "api_version": {
      "type": "string",
      "const": "v1"
    },
    "store": {
      "type": "object",
      "required": [
        "id",
        "name",
        "slug",
        "url",
        "tracking_url",
        "currency",
        "mode"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "tracking_url": {
          "type": "string",
          "format": "uri"
        },
        "currency": {
          "type": "string"
        },
        "mode": {
          "type": "string",
          "enum": [
            "full",
            "tracking_only"
          ]
        }
      }
    },
    "key": {
      "type": "object",
      "required": [
        "kind",
        "scopes",
        "connection_id"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "secret",
            "publishable"
          ]
        },
        "scopes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Scope"
          }
        },
        "connection_id": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "description": "Set when the key is a plugin's connection key."
        }
      }
    },
    "limits": {
      "type": "object",
      "required": [
        "requests_per_minute"
      ],
      "properties": {
        "requests_per_minute": {
          "type": "integer"
        }
      }
    }
  },
  "$defs": {
    "Scope": {
      "type": "string",
      "enum": [
        "orders:read",
        "orders:write",
        "products:read",
        "products:write",
        "checkout:write",
        "tracking:read",
        "webhooks:write",
        "connection:manage"
      ]
    }
  }
}