{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adobe/json-schema/adobe-sync-companies-request-schema.json",
  "title": "SyncCompaniesRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adobe-marketo-data-ingestion-openapi.yml#/components/schemas/SyncCompaniesRequest",
  "required": [
    "input"
  ],
  "type": "object",
  "properties": {
    "action": {
      "type": "string",
      "description": "Sync action. For createOnly and createOrUpdate, only dedupeFields is allowed for dedupeBy. For updateOnly, both dedupeFields and idField are allowed.",
      "enum": [
        "createOnly",
        "updateOnly",
        "createOrUpdate"
      ],
      "default": "createOrUpdate"
    },
    "dedupeBy": {
      "type": "string",
      "description": "Field to deduplicate on (case-insensitive).",
      "enum": [
        "dedupeFields",
        "idField"
      ],
      "default": "dedupeFields"
    },
    "input": {
      "type": "array",
      "description": "List of company attribute name-value pairs.",
      "items": {
        "$ref": "#/$defs/Company"
      }
    }
  },
  "$defs": {
    "Company": {
      "type": "object",
      "description": "Company record. When dedupeBy=dedupeFields, externalCompanyId is required. When dedupeBy=idField, id is required. Additional standard or custom company fields are supported.",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64",
          "description": "Marketo internal company ID. Required when dedupeBy is idField and action is updateOnly."
        },
        "externalCompanyId": {
          "type": "string",
          "description": "External company identifier. Required when dedupeBy is dedupeFields."
        },
        "company": {
          "type": "string",
          "description": "Company name."
        }
      },
      "additionalProperties": true
    }
  }
}