{
  "openapi": "3.0.1",
  "info": {
    "title": "HubSpot and Salesforce Field Mapping Tool",
    "description": "Turn buyer-supplied signal rows into one deterministic CRM mapping template for review. Compare versioned HubSpot or Salesforce field proposals, conflicts, omissions, and evidence without logging in to or writing to either CRM.",
    "version": "0.2",
    "x-build-id": "lcFsxHDG0kzMdh3AT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zinin~us-brand-signal-crm-field-mapper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zinin-us-brand-signal-crm-field-mapper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/zinin~us-brand-signal-crm-field-mapper/runs": {
      "post": {
        "operationId": "runs-sync-zinin-us-brand-signal-crm-field-mapper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/zinin~us-brand-signal-crm-field-mapper/run-sync": {
      "post": {
        "operationId": "run-sync-zinin-us-brand-signal-crm-field-mapper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "schemaVersion",
          "target",
          "mapping",
          "rows"
        ],
        "properties": {
          "schemaVersion": {
            "title": "Report contract version",
            "enum": [
              "1.1",
              "1.0"
            ],
            "type": "string",
            "description": "Use 1.1 for the additive decision layer. Legacy 1.0 preserves the exact closed report and digest contract without decision. Apify's UI schema cannot express the target dependency; runtime rejects every v1.1-only target or field when this value is 1.0.",
            "default": "1.1"
          },
          "target": {
            "title": "Unverified target template",
            "enum": [
              "hubspot_v1_1",
              "salesforce_v1_1",
              "generic",
              "hubspot",
              "salesforce"
            ],
            "type": "string",
            "description": "Use a v1.1 template for new work. The Actor never queries your CRM account schema; every proposal requires review. Legacy hubspot/salesforce values remain accepted for backward compatibility, while runtime rejects hubspot_v1_1/salesforce_v1_1 with schemaVersion 1.0.",
            "default": "hubspot_v1_1"
          },
          "mapping": {
            "title": "Explicit closed field mapping",
            "minItems": 1,
            "maxItems": 9,
            "type": "array",
            "description": "Each source field may appear once and must map to the exact target field allowed for the selected CRM.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "sourceField",
                "targetField",
                "transform"
              ],
              "properties": {
                "sourceField": {
                  "title": "Source field",
                  "description": "One closed normalized source field.",
                  "type": "string",
                  "enum": [
                    "entity_id",
                    "brand_name",
                    "signal_type",
                    "signal_status",
                    "score",
                    "observed_at",
                    "source_evidence_id",
                    "source_url",
                    "note"
                  ]
                },
                "targetField": {
                  "title": "Target field",
                  "description": "An unverified template field. Standard company name is name for HubSpot v1.1 and Name for Salesforce v1.1; custom fields require account-side configuration. Runtime version-binds every field and rejects name/Name under schemaVersion 1.0.",
                  "type": "string",
                  "enum": [
                    "external_id",
                    "name",
                    "Name",
                    "company_name",
                    "signal_type",
                    "signal_status",
                    "signal_score",
                    "last_observed_at",
                    "source_evidence_id",
                    "source_url",
                    "notes",
                    "Account.Name",
                    "External_Id__c",
                    "Signal_Type__c",
                    "Signal_Status__c",
                    "Signal_Score__c",
                    "Last_Observed_At__c",
                    "Source_Evidence_Id__c",
                    "Source_URL__c",
                    "Notes__c",
                    "entity_name",
                    "observed_at",
                    "note"
                  ]
                },
                "transform": {
                  "title": "Allowlisted transform",
                  "description": "One exact transform; no expressions are accepted.",
                  "type": "string",
                  "enum": [
                    "as_is",
                    "trim",
                    "lowercase",
                    "uppercase",
                    "number_integer",
                    "number_decimal_2",
                    "date_yyyy_mm_dd"
                  ]
                }
              }
            }
          },
          "rows": {
            "title": "Normalized US brand signal rows",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "One to one hundred rows with explicit opaque entity IDs and source evidence.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "signalId",
                "entityId",
                "sourceEvidenceId",
                "sourceUrl",
                "observedAt",
                "values"
              ],
              "properties": {
                "signalId": {
                  "title": "Signal ID",
                  "description": "Unique printable ASCII ID supplied by the buyer.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$"
                },
                "entityId": {
                  "title": "Opaque entity ID",
                  "description": "Explicit buyer-owned grouping key; no identity is inferred.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$"
                },
                "sourceEvidenceId": {
                  "title": "Source evidence ID",
                  "description": "Unique buyer-owned evidence reference preserved in every result section.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$"
                },
                "sourceUrl": {
                  "title": "Source evidence URL",
                  "description": "HTTPS evidence URL. It is recorded but never fetched.",
                  "type": "string",
                  "minLength": 12,
                  "maxLength": 2048,
                  "pattern": "^https://[^\\s#]+$"
                },
                "observedAt": {
                  "title": "Observed UTC timestamp",
                  "description": "Strict Gregorian UTC timestamp with seconds and Z offset.",
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"
                },
                "values": {
                  "title": "Optional normalized values",
                  "description": "Only these normalized signal values are accepted; absent and null values become omissions.",
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "brand_name": {
                      "title": "Brand name",
                      "description": "Buyer-supplied brand label; never resolved or inferred.",
                      "type": "string",
                      "nullable": true,
                      "minLength": 1,
                      "maxLength": 256,
                      "pattern": "^(?!.*[\\uD800-\\uDFFF])[^\\u0000-\\u001F\\u007F-\\u009F\\u2028\\u2029]*$"
                    },
                    "signal_type": {
                      "title": "Signal type",
                      "description": "Buyer-supplied signal category.",
                      "type": "string",
                      "nullable": true,
                      "minLength": 1,
                      "maxLength": 256,
                      "pattern": "^(?!.*[\\uD800-\\uDFFF])[^\\u0000-\\u001F\\u007F-\\u009F\\u2028\\u2029]*$"
                    },
                    "signal_status": {
                      "title": "Signal status",
                      "description": "Buyer-supplied signal status.",
                      "type": "string",
                      "nullable": true,
                      "minLength": 1,
                      "maxLength": 256,
                      "pattern": "^(?!.*[\\uD800-\\uDFFF])[^\\u0000-\\u001F\\u007F-\\u009F\\u2028\\u2029]*$"
                    },
                    "score": {
                      "title": "Signal score",
                      "description": "Optional finite score from 0 through 100.",
                      "type": "number",
                      "nullable": true,
                      "minimum": 0,
                      "maximum": 100
                    },
                    "note": {
                      "title": "Signal note",
                      "description": "Optional buyer-supplied note preserved as a fact.",
                      "type": "string",
                      "nullable": true,
                      "minLength": 1,
                      "maxLength": 512,
                      "pattern": "^(?!.*[\\uD800-\\uDFFF])[^\\u0000-\\u001F\\u007F-\\u009F\\u2028\\u2029]*$"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}