{
  "openapi": "3.0.1",
  "info": {
    "title": "Swiss QR-bill Generator (QR-facture / QR-Rechnung)",
    "description": "Generate compliant Swiss QR-bills as PDF, SVG or PNG from JSON or a CSV file: payment part and receipt with QR code, IBAN or QR-IBAN, QRR or SCOR reference, in French, German, Italian or English. One bill or thousands per run.",
    "version": "0.1",
    "x-build-id": "u6guYlfut6w5396u3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/najx~swiss-qr-bill-generator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-najx-swiss-qr-bill-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/najx~swiss-qr-bill-generator/runs": {
      "post": {
        "operationId": "runs-sync-najx-swiss-qr-bill-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/najx~swiss-qr-bill-generator/run-sync": {
      "post": {
        "operationId": "run-sync-najx-swiss-qr-bill-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": {
          "bills": {
            "title": "Bills (JSON)",
            "type": "array",
            "description": "One object per bill. Fields: id, account (IBAN or QR-IBAN), creditor {name, street, houseNumber, postalCode, city, country}, debtor (same shape, optional), amount (number, optional), currency (CHF/EUR), reference (27-digit QR reference for a QR-IBAN, or RF... creditor reference), additionalInformation (max 140 chars), billingInformation (Swico, starts with //), language (fr/de/it/en)."
          },
          "csvUrl": {
            "title": "CSV file URL",
            "type": "string",
            "description": "Public URL (or Apify key-value store record URL) of a CSV with one bill per row. Columns: id, account, amount, currency, reference, additional_information, billing_information, language, creditor_name, creditor_street, creditor_house_number, creditor_postal_code, creditor_city, creditor_country, debtor_name, debtor_street, debtor_house_number, debtor_postal_code, debtor_city, debtor_country. Comma or semicolon separated, UTF-8."
          },
          "account": {
            "title": "Default account (IBAN or QR-IBAN)",
            "type": "string",
            "description": "Used for every bill that has no account of its own. QR-IBANs (IID 30000-31999) require a 27-digit QR reference; regular IBANs accept an RF creditor reference or no reference."
          },
          "creditor": {
            "title": "Default creditor",
            "type": "object",
            "description": "Used for every bill that has no creditor of its own. {name, street, houseNumber, postalCode, city, country}."
          },
          "language": {
            "title": "Default language",
            "enum": [
              "fr",
              "de",
              "it",
              "en"
            ],
            "type": "string",
            "description": "Language of the printed labels.",
            "default": "fr"
          },
          "currency": {
            "title": "Default currency",
            "enum": [
              "CHF",
              "EUR"
            ],
            "type": "string",
            "description": "Used for every bill that has no currency of its own. Swiss QR-bills accept CHF or EUR only.",
            "default": "CHF"
          },
          "format": {
            "title": "Output format",
            "enum": [
              "pdf",
              "svg",
              "png"
            ],
            "type": "string",
            "description": "File format of every generated bill. PDF is the usual choice for printing and e-mailing; SVG for embedding in web pages or further processing; PNG for images.",
            "default": "pdf"
          },
          "fullPage": {
            "title": "Full A4 page",
            "type": "boolean",
            "description": "true = A4 page with the QR-bill at the bottom (ready to print or to append to an invoice); false = payment part and receipt only (210 x 105 mm).",
            "default": true
          },
          "pngDpi": {
            "title": "PNG resolution (dpi)",
            "minimum": 72,
            "maximum": 600,
            "type": "integer",
            "description": "Only for PNG output. 150 dpi is enough for screens, 300 dpi for print.",
            "default": 150
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}