{
  "openapi": "3.0.1",
  "info": {
    "title": "BAI2 & OFX/QFX Bank Statement to JSON & camt.053 Bridge",
    "description": "Convert US corporate BAI2 cash-management files and OFX/QFX bank statements into structured JSON, CSV, Excel, and ISO 20022 camt.053 XML for QuickBooks, Xero, NetSuite, n8n, and AI agents. Verifies 03/16/49/99 control totals with optional account masking and zero disk retention.",
    "version": "1.0",
    "x-build-id": "pm9EQfvPl90BxaIxb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bifrost-data~bai2-ofx-bank-statement-bridge/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bifrost-data-bai2-ofx-bank-statement-bridge",
        "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/bifrost-data~bai2-ofx-bank-statement-bridge/runs": {
      "post": {
        "operationId": "runs-sync-bifrost-data-bai2-ofx-bank-statement-bridge",
        "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/bifrost-data~bai2-ofx-bank-statement-bridge/run-sync": {
      "post": {
        "operationId": "run-sync-bifrost-data-bai2-ofx-bank-statement-bridge",
        "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",
        "properties": {
          "format_mode": {
            "title": "Statement Format Detection Mode",
            "enum": [
              "auto_detect",
              "bai2_only",
              "ofx_qfx_only"
            ],
            "type": "string",
            "description": "Choose 'auto_detect' to automatically route mixed BAI2 (01/02/03/16/49/88/98/99) and OFX/QFX (SGML v1.x or XML v2.x) payloads, or lock to 'bai2_only' / 'ofx_qfx_only'.",
            "default": "auto_detect"
          },
          "statements": {
            "title": "Raw BAI2 or OFX / QFX Statement Payloads",
            "type": "array",
            "description": "Array of raw UTF-8 BAI2 transmission files or OFX/QFX bank/credit-card statement strings. Processed 100% in volatile RAM with 0-byte disk retention and 0 external network calls.",
            "default": [
              "01,021000021,ACMETREASURY,261123,2359,0001,80,1,2/\n02,ACMETREASURY,021000021,1,261123,2359,USD,2/\n03,8800194300,USD,010,25000000,,,015,26425050,,,100,1850050,2,,400,425000,2,/\n16,195,1500000,0,FED20261123001,INV-2026-8801,INCOMING FEDWIRE FROM GLOBAL RETAIL CORP/\n88,ORIG: GLOBAL RETAIL CORP OBI: ENTERPRISE LICENSE Q4/\n16,115,350050,0,LBX2026112309,LOCKBOX-4412,LOCKBOX BATCH DEPOSIT CHICAGO/\n16,455,175000,0,ACH2026112377,AWS-NOV-2026,PREAUTHORIZED ACH DEBIT CLOUD INFRA/\n16,475,250000,0,CHK00009841,9841,CHECK PAID VENDOR SETTLEMENT/\n49,55975150,7/\n98,55975150,1,9/\n99,55975150,1,11/"
            ],
            "items": {
              "type": "string"
            }
          },
          "strict_control_totals": {
            "title": "Audit BAI2 Trailer Control Totals (49/98/99) & Duplicate OFX FITIDs",
            "type": "boolean",
            "description": "Verify exact Decimal equality on BAI2 Account (49), Group (98), and File (99) control totals and record counts, plus opening + net movement == closing ledger checks and OFX FITID uniqueness.",
            "default": true
          },
          "include_camt053_xml": {
            "title": "Generate Canonical ISO 20022 camt.053.001.08 XML",
            "type": "boolean",
            "description": "Emit canonical urn:iso:std:iso:20022:tech:xsd:camt.053.001.08 BankToCustomerStatement XML for direct ERP / SAP / NetSuite / Treasury import alongside normalized JSON.",
            "default": true
          },
          "mask_account_numbers": {
            "title": "Mask Account Numbers Except Last 4 Digits (Optional Privacy Mode)",
            "type": "boolean",
            "description": "When enabled, masks account identifiers in JSON and generated camt.053 XML (e.g., '******4300') for zero-PII AI agent and analytics pipelines.",
            "default": false
          },
          "max_items": {
            "title": "Maximum Verified Account Statements per Run",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound on verified account statement records emitted in a single run (1-1000).",
            "default": 100
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}