{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-ads/json-schema/google-ads-ingest-events-request-schema.json",
  "title": "IngestEventsRequest",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-ads-datamanager-events-api-openapi.yml#/components/schemas/IngestEventsRequest",
  "properties": {
    "encoding": {
      "type": "string",
      "enum": [
        "ENCODING_UNSPECIFIED",
        "HEX",
        "BASE64"
      ]
    },
    "events": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Event"
      }
    },
    "encryptionInfo": {
      "$ref": "#/$defs/EncryptionInfo"
    },
    "consent": {
      "$ref": "#/$defs/Consent"
    },
    "destinations": {
      "items": {
        "$ref": "#/$defs/Destination"
      },
      "type": "array"
    },
    "validateOnly": {
      "type": "boolean"
    }
  },
  "type": "object",
  "$defs": {
    "AdIdentifiers": {
      "properties": {
        "landingPageDeviceInfo": {
          "$ref": "#/$defs/DeviceInfo"
        },
        "impressionId": {
          "type": "string"
        },
        "ppid": {
          "type": "string"
        },
        "gbraid": {
          "type": "string"
        },
        "matchId": {
          "type": "string"
        },
        "mobileDeviceId": {
          "type": "string"
        },
        "leadId": {
          "type": "string"
        },
        "wbraid": {
          "type": "string"
        },
        "sessionAttributes": {
          "type": "string"
        },
        "dclid": {
          "type": "string"
        },
        "gclid": {
          "type": "string"
        },
        "encryptedUserIds": {
          "items": {
            "$ref": "#/$defs/EncryptedUserId"
          },
          "type": "array"
        },
        "visitorPpid": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "AddressInfo": {
      "properties": {
        "addressLine": {
          "type": "string"
        },
        "familyName": {
          "type": "string"
        },
        "postalCode": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "administrativeArea": {
          "type": "string"
        },
        "regionCode": {
          "type": "string"
        },
        "givenName": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "AwsWrappedKeyInfo": {
      "properties": {
        "encryptedDek": {
          "type": "string"
        },
        "kekUri": {
          "type": "string"
        },
        "roleArn": {
          "type": "string"
        },
        "keyType": {
          "type": "string",
          "enum": [
            "KEY_TYPE_UNSPECIFIED",
            "XCHACHA20_POLY1305"
          ]
        }
      },
      "type": "object"
    },
    "CallInfo": {
      "properties": {
        "startTimestamp": {
          "type": "string",
          "format": "google-datetime"
        }
      },
      "type": "object"
    },
    "CartData": {
      "type": "object",
      "properties": {
        "merchantFeedLanguageCode": {
          "type": "string"
        },
        "transactionDiscount": {
          "type": "number",
          "format": "double"
        },
        "couponCodes": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "merchantFeedLabel": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Item"
          }
        },
        "merchantId": {
          "type": "string"
        }
      }
    },
    "Consent": {
      "type": "object",
      "properties": {
        "adUserData": {
          "type": "string",
          "enum": [
            "CONSENT_STATUS_UNSPECIFIED",
            "CONSENT_GRANTED",
            "CONSENT_DENIED"
          ]
        },
        "adPersonalization": {
          "type": "string",
          "enum": [
            "CONSENT_STATUS_UNSPECIFIED",
            "CONSENT_GRANTED",
            "CONSENT_DENIED"
          ]
        }
      }
    },
    "CoordinatorKeyInfo": {
      "properties": {
        "keyId": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "CustomVariable": {
      "properties": {
        "variable": {
          "type": "string"
        },
        "destinationReferences": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "value": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "Destination": {
      "properties": {
        "reference": {
          "type": "string"
        },
        "productDestinationId": {
          "type": "string"
        },
        "loginAccount": {
          "$ref": "#/$defs/ProductAccount"
        },
        "linkedAccount": {
          "$ref": "#/$defs/ProductAccount"
        },
        "operatingAccount": {
          "$ref": "#/$defs/ProductAccount"
        }
      },
      "type": "object"
    },
    "DeviceInfo": {
      "type": "object",
      "properties": {
        "brand": {
          "type": "string"
        },
        "languageCode": {
          "type": "string"
        },
        "browserVersion": {
          "type": "string"
        },
        "ipAddress": {
          "type": "string"
        },
        "model": {
          "type": "string"
        },
        "screenHeight": {
          "format": "int32",
          "type": "integer"
        },
        "operatingSystem": {
          "type": "string"
        },
        "screenWidth": {
          "type": "integer",
          "format": "int32"
        },
        "userAgent": {
          "type": "string"
        },
        "category": {
          "type": "string"
        },
        "operatingSystemVersion": {
          "type": "string"
        },
        "browser": {
          "type": "string"
        }
      }
    },
    "EncryptedUserId": {
      "type": "object",
      "properties": {
        "entityType": {
          "type": "string",
          "enum": [
            "ENCRYPTION_ENTITY_TYPE_UNSPECIFIED",
            "CAMPAIGN_MANAGER_ACCOUNT",
            "CAMPAIGN_MANAGER_ADVERTISER",
            "DISPLAY_VIDEO_PARTNER",
            "DISPLAY_VIDEO_ADVERTISER",
            "GOOGLE_ADS_CUSTOMER",
            "GOOGLE_AD_MANAGER_NETWORK_CODE"
          ]
        },
        "encryptedId": {
          "type": "string"
        },
        "entityId": {
          "format": "int64",
          "type": "string"
        },
        "source": {
          "type": "string",
          "enum": [
            "ENCRYPTION_SOURCE_UNSPECIFIED",
            "AD_SERVING",
            "DATA_TRANSFER"
          ]
        }
      }
    },
    "EncryptionInfo": {
      "properties": {
        "coordinatorKeyInfo": {
          "$ref": "#/$defs/CoordinatorKeyInfo"
        },
        "gcpWrappedKeyInfo": {
          "$ref": "#/$defs/GcpWrappedKeyInfo"
        },
        "awsWrappedKeyInfo": {
          "$ref": "#/$defs/AwsWrappedKeyInfo"
        }
      },
      "type": "object"
    },
    "Event": {
      "type": "object",
      "properties": {
        "thirdPartyUserData": {
          "$ref": "#/$defs/UserData"
        },
        "userId": {
          "type": "string"
        },
        "eventDeviceInfo": {
          "$ref": "#/$defs/DeviceInfo"
        },
        "experimentalFields": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ExperimentalField"
          }
        },
        "consent": {
          "$ref": "#/$defs/Consent"
        },
        "cartData": {
          "$ref": "#/$defs/CartData"
        },
        "additionalEventParameters": {
          "items": {
            "$ref": "#/$defs/EventParameter"
          },
          "type": "array"
        },
        "eventName": {
          "type": "string"
        },
        "eventTimestamp": {
          "type": "string",
          "format": "google-datetime"
        },
        "userData": {
          "$ref": "#/$defs/UserData"
        },
        "adIdentifiers": {
          "$ref": "#/$defs/AdIdentifiers"
        },
        "appInstanceId": {
          "type": "string"
        },
        "eventSource": {
          "type": "string",
          "enum": [
            "EVENT_SOURCE_UNSPECIFIED",
            "WEB",
            "APP",
            "IN_STORE",
            "PHONE",
            "MESSAGE",
            "OTHER"
          ]
        },
        "eventLocation": {
          "$ref": "#/$defs/EventLocation"
        },
        "customVariables": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CustomVariable"
          }
        },
        "userProperties": {
          "$ref": "#/$defs/UserProperties"
        },
        "destinationReferences": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "currency": {
          "type": "string"
        },
        "conversionValue": {
          "type": "number",
          "format": "double"
        },
        "callInfo": {
          "$ref": "#/$defs/CallInfo"
        },
        "conversionCount": {
          "format": "double",
          "type": "number"
        },
        "lastUpdatedTimestamp": {
          "type": "string",
          "format": "google-datetime"
        },
        "transactionId": {
          "type": "string"
        },
        "clientId": {
          "type": "string"
        }
      }
    },
    "EventLocation": {
      "properties": {
        "regionCode": {
          "type": "string"
        },
        "subcontinentCode": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "storeId": {
          "type": "string"
        },
        "continentCode": {
          "type": "string"
        },
        "subdivisionCode": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "EventParameter": {
      "properties": {
        "value": {
          "type": "string"
        },
        "parameterName": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "ExperimentalField": {
      "type": "object",
      "properties": {
        "field": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "GcpWrappedKeyInfo": {
      "properties": {
        "keyType": {
          "type": "string",
          "enum": [
            "KEY_TYPE_UNSPECIFIED",
            "XCHACHA20_POLY1305"
          ]
        },
        "kekUri": {
          "type": "string"
        },
        "wipProvider": {
          "type": "string"
        },
        "encryptedDek": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "Item": {
      "properties": {
        "merchantFeedLanguageCode": {
          "type": "string"
        },
        "itemId": {
          "type": "string"
        },
        "additionalItemParameters": {
          "items": {
            "$ref": "#/$defs/ItemParameter"
          },
          "type": "array"
        },
        "customVariables": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ItemCustomVariable"
          }
        },
        "conversionValue": {
          "type": "number",
          "format": "double"
        },
        "quantity": {
          "format": "int64",
          "type": "string"
        },
        "merchantId": {
          "type": "string"
        },
        "merchantFeedLabel": {
          "type": "string"
        },
        "merchantProductId": {
          "type": "string"
        },
        "unitPrice": {
          "format": "double",
          "type": "number"
        }
      },
      "type": "object"
    },
    "ItemCustomVariable": {
      "type": "object",
      "properties": {
        "value": {
          "type": "string"
        },
        "variable": {
          "type": "string"
        },
        "destinationReferences": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "ItemParameter": {
      "type": "object",
      "properties": {
        "parameterName": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "ProductAccount": {
      "type": "object",
      "properties": {
        "product": {
          "type": "string",
          "enum": [
            "PRODUCT_UNSPECIFIED",
            "GOOGLE_ADS",
            "DISPLAY_VIDEO_PARTNER",
            "DISPLAY_VIDEO_ADVERTISER",
            "DATA_PARTNER"
          ],
          "deprecated": true
        },
        "accountId": {
          "type": "string"
        },
        "accountType": {
          "type": "string",
          "enum": [
            "ACCOUNT_TYPE_UNSPECIFIED",
            "GOOGLE_ADS",
            "DISPLAY_VIDEO_PARTNER",
            "DISPLAY_VIDEO_ADVERTISER",
            "DATA_PARTNER",
            "GOOGLE_ANALYTICS_PROPERTY",
            "GOOGLE_AD_MANAGER_AUDIENCE_LINK",
            "FLOODLIGHT_CONFIG",
            "GOOGLE_AD_MANAGER"
          ]
        }
      }
    },
    "UserData": {
      "properties": {
        "userIdentifiers": {
          "items": {
            "$ref": "#/$defs/UserIdentifier"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "UserIdentifier": {
      "type": "object",
      "properties": {
        "phoneNumber": {
          "type": "string"
        },
        "emailAddress": {
          "type": "string"
        },
        "address": {
          "$ref": "#/$defs/AddressInfo"
        }
      }
    },
    "UserProperties": {
      "properties": {
        "additionalUserProperties": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UserProperty"
          }
        },
        "customerValueBucket": {
          "type": "string",
          "enum": [
            "CUSTOMER_VALUE_BUCKET_UNSPECIFIED",
            "LOW",
            "MEDIUM",
            "HIGH"
          ]
        },
        "customerType": {
          "type": "string",
          "enum": [
            "CUSTOMER_TYPE_UNSPECIFIED",
            "NEW",
            "RETURNING",
            "REENGAGED"
          ]
        }
      },
      "type": "object"
    },
    "UserProperty": {
      "properties": {
        "propertyName": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}