{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cayra-io/json-schema/cayra-io-agreement-acceptance-request-schema.json",
  "title": "AgreementAcceptanceRequest",
  "description": "Record acceptance from customer/company",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cayra-io-agreements-api-openapi.yml#/components/schemas/AgreementAcceptanceRequest",
  "properties": {
    "customer_id": {
      "type": "string",
      "format": "uuid",
      "title": "Customer Id",
      "description": "Customer who accepted"
    },
    "company_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Company Id",
      "description": "Optional company context"
    },
    "license_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "License Id",
      "description": "Optional license context"
    },
    "agreement_version_id": {
      "type": "string",
      "format": "uuid",
      "title": "Agreement Version Id",
      "description": "Version being accepted"
    },
    "accepted_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Accepted At"
    },
    "accepted_ip": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ],
      "title": "Accepted Ip"
    },
    "accepted_user_agent": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Accepted User Agent"
    },
    "accepted_locale": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 16
        },
        {
          "type": "null"
        }
      ],
      "title": "Accepted Locale"
    },
    "accepted_via": {
      "type": "string",
      "maxLength": 64,
      "title": "Accepted Via",
      "default": "web"
    },
    "evidence": {
      "type": "object",
      "title": "Evidence"
    }
  },
  "type": "object",
  "required": [
    "customer_id",
    "agreement_version_id"
  ]
}