{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/apiacre-com/json-schema/apiacre-com-service-response-schema.json",
  "title": "ServiceResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/apiacre-com-advertising-api-openapi.yml#/components/schemas/ServiceResponse",
  "properties": {
    "request_id": {
      "type": "string",
      "title": "Request Id"
    },
    "service": {
      "type": "string",
      "title": "Service"
    },
    "version": {
      "type": "string",
      "title": "Version",
      "default": "1"
    },
    "data": {
      "additionalProperties": true,
      "type": "object",
      "title": "Data"
    },
    "meta": {
      "$ref": "#/$defs/ServiceMeta"
    }
  },
  "type": "object",
  "required": [
    "request_id",
    "service",
    "data",
    "meta"
  ],
  "$defs": {
    "ServiceMeta": {
      "properties": {
        "duration_ms": {
          "type": "integer",
          "title": "Duration Ms"
        },
        "cached": {
          "type": "boolean",
          "title": "Cached",
          "default": false
        },
        "sources": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Sources"
        },
        "warnings": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Warnings"
        },
        "next_actions": {
          "items": {
            "$ref": "#/$defs/ServiceNextAction"
          },
          "type": "array",
          "title": "Next Actions"
        }
      },
      "type": "object",
      "required": [
        "duration_ms"
      ],
      "title": "ServiceMeta"
    },
    "ServiceNextAction": {
      "properties": {
        "service": {
          "type": "string",
          "title": "Service"
        },
        "title": {
          "type": "string",
          "title": "Title"
        },
        "reason": {
          "type": "string",
          "title": "Reason"
        },
        "method": {
          "type": "string",
          "const": "POST",
          "title": "Method",
          "default": "POST"
        },
        "path": {
          "type": "string",
          "title": "Path"
        },
        "price": {
          "type": "string",
          "title": "Price"
        },
        "input_template": {
          "additionalProperties": true,
          "type": "object",
          "title": "Input Template"
        },
        "use_output": {
          "type": "string",
          "title": "Use Output"
        },
        "handoff_path": {
          "type": "string",
          "title": "Handoff Path"
        },
        "checkout_path": {
          "type": "string",
          "title": "Checkout Path"
        },
        "sample_path": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sample Path"
        },
        "maximum_atomic_usdc": {
          "type": "string",
          "title": "Maximum Atomic Usdc"
        },
        "handoff_payment_required": {
          "type": "boolean",
          "const": false,
          "title": "Handoff Payment Required",
          "default": false
        },
        "executes_automatically": {
          "type": "boolean",
          "const": false,
          "title": "Executes Automatically",
          "default": false
        },
        "authorization_required": {
          "type": "boolean",
          "title": "Authorization Required",
          "default": true
        }
      },
      "type": "object",
      "required": [
        "service",
        "title",
        "reason",
        "path",
        "price",
        "input_template",
        "use_output",
        "handoff_path",
        "checkout_path",
        "sample_path",
        "maximum_atomic_usdc"
      ],
      "title": "ServiceNextAction"
    }
  }
}