{
  "openapi": "3.0.1",
  "info": {
    "title": "Invoice Generator Input",
    "description": "A flexible and developer-friendly tool to generate professional invoices from structured input data. Supports line items, tax, discounts, and optional HTML output.",
    "version": "0.0",
    "x-build-id": "zmltPTzotgmgwUHMK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/moving_beacon-owner1~invoice-generator-input/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-moving_beacon-owner1-invoice-generator-input",
        "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/moving_beacon-owner1~invoice-generator-input/runs": {
      "post": {
        "operationId": "runs-sync-moving_beacon-owner1-invoice-generator-input",
        "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/moving_beacon-owner1~invoice-generator-input/run-sync": {
      "post": {
        "operationId": "run-sync-moving_beacon-owner1-invoice-generator-input",
        "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": [
          "fromName",
          "toName",
          "items"
        ],
        "properties": {
          "invoiceNumber": {
            "title": "Invoice Number",
            "type": "string",
            "description": "Unique identifier for the invoice.",
            "default": "INV-001"
          },
          "issueDate": {
            "title": "Issue Date",
            "type": "string",
            "description": "Invoice issue date in YYYY-MM-DD format. Defaults to today if empty.",
            "default": ""
          },
          "dueDate": {
            "title": "Due Date",
            "type": "string",
            "description": "Payment due date in YYYY-MM-DD format. Defaults to 30 days from issue date if empty.",
            "default": ""
          },
          "fromName": {
            "title": "From (Name/Company)",
            "type": "string",
            "description": "Sender name or company issuing the invoice.",
            "default": "Your Company Name"
          },
          "fromAddress": {
            "title": "From Address",
            "type": "string",
            "description": "Sender address details.",
            "default": "Your Address"
          },
          "fromEmail": {
            "title": "From Email",
            "type": "string",
            "description": "Sender contact email address.",
            "default": "you@example.com"
          },
          "toName": {
            "title": "Bill To (Name/Company)",
            "type": "string",
            "description": "Recipient name or company being billed.",
            "default": "Client Name"
          },
          "toAddress": {
            "title": "Bill To Address",
            "type": "string",
            "description": "Recipient address details.",
            "default": "Client Address"
          },
          "toEmail": {
            "title": "Bill To Email",
            "type": "string",
            "description": "Recipient contact email address.",
            "default": "client@example.com"
          },
          "items": {
            "title": "Line Items",
            "type": "array",
            "description": "List of invoice items with description, quantity, and unit price.",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "title": "Item Description",
                  "type": "string",
                  "description": "Brief description of the line item.",
                  "default": "Service",
                  "prefill": "Service"
                },
                "quantity": {
                  "title": "Quantity",
                  "type": "number",
                  "description": "Number of units for this item.",
                  "minimum": 1,
                  "default": 1,
                  "prefill": 1
                },
                "unitPrice": {
                  "title": "Unit Price",
                  "type": "number",
                  "description": "Price per unit of this item.",
                  "minimum": 0,
                  "default": 0,
                  "prefill": 0
                }
              },
              "required": [
                "description",
                "quantity",
                "unitPrice"
              ],
              "additionalProperties": false
            },
            "default": [
              {
                "description": "Web Development Service",
                "quantity": 1,
                "unitPrice": 500
              },
              {
                "description": "Hosting (1 year)",
                "quantity": 2,
                "unitPrice": 50
              }
            ]
          },
          "taxRate": {
            "title": "Tax Rate (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Tax percentage applied to subtotal.",
            "default": 0
          },
          "discountPercent": {
            "title": "Discount (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Discount percentage applied before tax.",
            "default": 0
          },
          "currency": {
            "title": "Currency Symbol",
            "type": "string",
            "description": "Currency symbol used in the invoice (e.g., $, €, ₹).",
            "default": "$"
          },
          "notes": {
            "title": "Notes / Terms",
            "type": "string",
            "description": "Additional notes or payment terms.",
            "default": "Payment due within 30 days."
          },
          "generateHTML": {
            "title": "Generate HTML",
            "type": "boolean",
            "description": "If enabled, generates an HTML version of the invoice.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}