{
  "openapi": "3.0.1",
  "info": {
    "title": "CPA 005 File Generator: Excel or CSV to Canadian EFT File",
    "description": "Create the CPA 005 file (AFT, often called EFT file) for payroll and supplier payments by direct deposit, or for pre-authorized debits, from an Excel, CSV or JSON list, ready to upload to your Canadian online banking. Every row is checked first.",
    "version": "0.1",
    "x-build-id": "cPPPyf24Mpd7qy8e2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hardreset83~cpa-005-file-generator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hardreset83-cpa-005-file-generator",
        "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/hardreset83~cpa-005-file-generator/runs": {
      "post": {
        "operationId": "runs-sync-hardreset83-cpa-005-file-generator",
        "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/hardreset83~cpa-005-file-generator/run-sync": {
      "post": {
        "operationId": "run-sync-hardreset83-cpa-005-file-generator",
        "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": {
          "paymentsFile": {
            "title": "Upload the list of payments",
            "type": "string",
            "description": "Excel (.xlsx), CSV or TXT with any separator, or JSON. One row per payment, with a row of titles. The columns are found by their titles: name (or first name and last name), institution number, transit number (or one routing number like 000112345), account number, amount. Optional: reference, date, transaction code, type (credit or debit), currency, message."
          },
          "paymentsUrls": {
            "title": "Links to lists",
            "type": "array",
            "description": "Direct links (https) to Excel, CSV or JSON lists, for example from Make, Zapier, n8n or a cloud folder. All the lists together make one file.",
            "items": {
              "type": "string"
            }
          },
          "paymentsContent": {
            "title": "Or paste the list",
            "type": "string",
            "description": "Paste the rows of a CSV or of an Excel sheet (copied cells are separated by tabs), with the row of titles. It is prefilled with an example list, so you can try the tool with one click: the example is free, and it is not used when you upload a list or add a link."
          },
          "payments": {
            "title": "Or the payments as JSON",
            "type": "array",
            "description": "For APIs and AI agents: [{\"name\": \"Example Supplies Inc\", \"institution\": \"001\", \"transit\": \"00011\", \"accountNumber\": \"1234567\", \"amount\": 1250.00, \"reference\": \"INV 1001\"}]. Other keys: routing, date, transactionCode, type (credit or debit), currency, message."
          },
          "originatorId": {
            "title": "Originator ID",
            "type": "string",
            "description": "Up to 10 letters and digits: the ID your bank gave you for CPA 005 (AFT, EFT) files, sometimes called client number or customer number. Write it exactly as in your bank's guide (some banks add 0000 after the number). Prefilled with an example: write yours."
          },
          "shortName": {
            "title": "Your short name",
            "type": "string",
            "description": "The name the people you pay see on their statement, 15 characters. Prefilled with an example: write yours."
          },
          "longName": {
            "title": "Your long name",
            "type": "string",
            "description": "The legal name of your company, 30 characters. Empty: your short name."
          },
          "dataCentre": {
            "title": "Destination data centre",
            "type": "string",
            "description": "The 5 digits of the processing centre of your bank that receives the file: your bank gives them with your originator ID, in its guide to CPA 005 files. Needed for your own lists (the example list works without it)."
          },
          "institutionNumber": {
            "title": "Institution number of your account",
            "type": "string",
            "description": "3 digits. Your account: credits are taken from it, debits are paid into it, and returned payments come back to it. Prefilled with an example: write yours."
          },
          "transitNumber": {
            "title": "Transit number of your account",
            "type": "string",
            "description": "5 digits, your branch. Prefilled with an example: write yours."
          },
          "accountNumber": {
            "title": "Your account number",
            "type": "string",
            "description": "5 to 12 digits. Prefilled with an example: write yours."
          },
          "entryType": {
            "title": "Pay or collect",
            "enum": [
              "credit",
              "debit"
            ],
            "type": "string",
            "description": "Credits pay the accounts in the list (wages, suppliers, refunds). Debits collect money from them, with a pre-authorized debit (PAD) agreement signed by each of them. A file is all credits or all debits.",
            "default": "credit"
          },
          "transactionCode": {
            "title": "Transaction code",
            "enum": [
              "200",
              "201",
              "202",
              "203",
              "204",
              "205",
              "206",
              "207",
              "230",
              "240",
              "250",
              "260",
              "280",
              "330",
              "350",
              "370",
              "380",
              "400",
              "420",
              "430",
              "450",
              "451",
              "452",
              "460",
              "470",
              "480",
              "700",
              "707",
              "714",
              "718",
              "729",
              "730"
            ],
            "type": "string",
            "description": "The type of payment of Standard 007, shown on the statements: 200 for wages, 450 or 460 for suppliers, 470 for fees, 700 for business pre-authorized debits. A row can have its own in a Transaction code column (any code of the standard).",
            "default": "450"
          },
          "paymentDate": {
            "title": "Payment date",
            "type": "string",
            "description": "The day the money reaches the accounts. Empty: the next day the Canadian payments system is open after today. On a weekend or a holiday of the payments system the banks process it on the next open day. Rows can have their own date in a Date column."
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "CAD",
              "USD"
            ],
            "type": "string",
            "description": "Canadian dollars, or US dollars for USD accounts at Canadian institutions (in a file of its own).",
            "default": "CAD"
          },
          "fileCreationNumber": {
            "title": "File creation number (optional)",
            "type": "string",
            "description": "1 to 9999, a new one for every file you send to your bank. Empty: the next one after the last file this Actor made with your originator ID (the first one is 0001). Write it if your bank already received files from you, or if it asks for another number."
          },
          "defaultReference": {
            "title": "Reference (optional)",
            "type": "string",
            "description": "19 characters for the rows without a reference (the originator's cross reference number). It comes back with a returned payment, so you know which one it was."
          },
          "sundryInformation": {
            "title": "Message (optional)",
            "type": "string",
            "description": "15 characters of sundry information for the rows without a Message column. Some institutions show it on the statement."
          },
          "paymentsPerRecord": {
            "title": "Payments per record",
            "enum": [
              "6",
              "1"
            ],
            "type": "string",
            "description": "6 (the standard): up to six payments in every record of 1464 characters. 1: one payment per record, only if your bank asks for it.",
            "default": "6"
          },
          "uppercase": {
            "title": "Names and references in capitals",
            "type": "boolean",
            "description": "On (recommended): names, references and messages in capital letters, as most banks ask. Accents are always taken out (Hélène becomes HELENE).",
            "default": true
          },
          "uploadDate": {
            "title": "Day you upload the file",
            "type": "string",
            "description": "Empty: today (Toronto time). It is the creation date in the file, and the payment dates are checked from this day."
          },
          "lineEnding": {
            "title": "Line endings",
            "enum": [
              "crlf",
              "lf"
            ],
            "type": "string",
            "description": "CR LF (Windows) is what most banks take. LF only if your bank asks for it.",
            "default": "crlf"
          },
          "skipInvalidRows": {
            "title": "Leave out rows with errors",
            "type": "boolean",
            "description": "Off (recommended): if a row has an error no file is made, and the dataset and REPORT.xlsx say what to fix, for free. On: the file is made with the rows without errors, and the others are listed as errors.",
            "default": false
          },
          "columns": {
            "title": "Column titles (optional)",
            "type": "object",
            "description": "Only if a column is not found by its title: {\"amount\": \"Net Pay $\", \"transit\": \"Branch No\"}. Keys: name, firstName, lastName, institution, transit, routing, account, amount, reference, date, direction, transactionCode, currency, sundry."
          },
          "failIfNoFile": {
            "title": "Fail the run if no file is made",
            "type": "boolean",
            "description": "For automations: the run ends as failed when no file is made, so that Make, Zapier or n8n stop. Off: the run succeeds and SUMMARY says fileCreated: false.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}