{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/coppica-com/json-schema/coppica-com-outcome-request-schema.json",
  "title": "OutcomeRequest",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coppica-com-openapi.yml#/components/schemas/OutcomeRequest",
  "type": "object",
  "properties": {
    "output_id": {
      "type": "string",
      "format": "uuid"
    },
    "type": {
      "type": "string",
      "enum": [
        "conversion_purchase",
        "conversion_lead",
        "conversion_signup",
        "conversion_custom",
        "engagement_positive",
        "engagement_negative",
        "thumbs_up",
        "thumbs_down"
      ]
    },
    "value": {
      "type": "number",
      "description": "Dollar value for conversions."
    },
    "external_id": {
      "type": "string",
      "description": "Your stable event id. Refiring with the same (output_id, external_id) from the same key returns the original (200, deduplicated). For conversion_purchase, conversion_lead and conversion_signup, an id the client already has from any source (compared lowercased + trimmed) is refused with 409; conversion_custom gets no such check."
    },
    "occurred_at": {
      "type": "string",
      "format": "date-time",
      "description": "When it happened; defaults to now. More than 5 minutes ahead or more than a year old is refused with a 400. Dated before the output was created: recorded as rejected. More than 90 days old: recorded as flagged. Neither moves technique weights."
    },
    "metadata": {
      "type": "object",
      "additionalProperties": true
    }
  },
  "required": [
    "output_id",
    "type"
  ]
}