{
  "openapi": "3.0.1",
  "info": {
    "title": "Pricing & Cash Flow Calculator (Precificação e Fluxo de Caixa)",
    "description": "Builds an XLSX with live formulas: suggested prices by divisor markup, contribution margin, break-even and a 12-month cash flow. Estimate only. No network, nothing stored outside your run.",
    "version": "0.1",
    "x-build-id": "W26pDMvxA0KAb5jCC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kman-br~pricing-cash-flow-calculator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kman-br-pricing-cash-flow-calculator",
        "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/kman-br~pricing-cash-flow-calculator/runs": {
      "post": {
        "operationId": "runs-sync-kman-br-pricing-cash-flow-calculator",
        "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/kman-br~pricing-cash-flow-calculator/run-sync": {
      "post": {
        "operationId": "run-sync-kman-br-pricing-cash-flow-calculator",
        "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": [
          "products",
          "effectiveTaxRatePct",
          "desiredMarginPct",
          "monthlyRevenue",
          "monthlyExpenses"
        ],
        "properties": {
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "pt-BR"
            ],
            "type": "string",
            "description": "Language of the workbook labels and sheet names.",
            "default": "en"
          },
          "currency": {
            "title": "Currency label",
            "pattern": "^[A-Z]{3}$",
            "type": "string",
            "description": "Three-letter code used only as a label and number format (for example BRL or USD). No conversion is done.",
            "default": "USD"
          },
          "products": {
            "title": "Products and services",
            "minItems": 1,
            "maxItems": 200,
            "type": "array",
            "description": "Items to price. Each item has a name, a unit cost, optionally extra variable cost per unit and an estimated monthly volume.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "name",
                "unitCost"
              ],
              "properties": {
                "name": {
                  "title": "Name",
                  "type": "string",
                  "description": "Item name (1 to 80 characters).",
                  "minLength": 1,
                  "maxLength": 80
                },
                "unitCost": {
                  "title": "Unit cost",
                  "type": "number",
                  "description": "Cost of one unit, from 0 to 1,000,000,000.",
                  "minimum": 0,
                  "maximum": 1000000000
                },
                "extraVariableCost": {
                  "title": "Extra variable cost per unit",
                  "type": "number",
                  "description": "Optional extra cost per unit (packaging, freight). Added to the unit cost.",
                  "minimum": 0,
                  "maximum": 1000000000
                },
                "monthlyVolume": {
                  "title": "Estimated monthly volume",
                  "type": "number",
                  "description": "Optional units sold per month. Used to weight the break-even mix.",
                  "minimum": 0,
                  "maximum": 10000000
                }
              }
            }
          },
          "fixedExpenses": {
            "title": "Fixed monthly expenses",
            "maxItems": 100,
            "type": "array",
            "description": "Fixed expenses per month (rent, salaries, software). They enter the break-even point, not the price.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "name",
                "amount"
              ],
              "properties": {
                "name": {
                  "title": "Name",
                  "type": "string",
                  "description": "Expense name (1 to 80 characters).",
                  "minLength": 1,
                  "maxLength": 80
                },
                "amount": {
                  "title": "Monthly amount",
                  "type": "number",
                  "description": "Amount per month, from 0 to 1,000,000,000.",
                  "minimum": 0,
                  "maximum": 1000000000
                }
              }
            }
          },
          "taxRegime": {
            "title": "Tax regime (label)",
            "maxLength": 40,
            "type": "string",
            "description": "Free text label, for example Simples Nacional, Lucro Presumido, MEI or Other. It is only printed in the workbook.",
            "default": "Other"
          },
          "effectiveTaxRatePct": {
            "title": "Effective tax rate (%)",
            "minimum": 0,
            "maximum": 60,
            "type": "number",
            "description": "Effective tax rate on revenue, in percent, that you provide (0 to 60). The Actor has no tax tables."
          },
          "cardFeePct": {
            "title": "Card or marketplace fee (%)",
            "minimum": 0,
            "maximum": 30,
            "type": "number",
            "description": "Fee charged on each sale, in percent (0 to 30).",
            "default": 0
          },
          "variableExpensesPct": {
            "title": "Variable expenses (% of revenue)",
            "minimum": 0,
            "maximum": 60,
            "type": "number",
            "description": "Variable expenses as a percent of revenue (0 to 60), for example commissions.",
            "default": 0
          },
          "desiredMarginPct": {
            "title": "Desired contribution margin (%)",
            "minimum": 0,
            "maximum": 90,
            "type": "number",
            "description": "Margin you want left on the price after costs, taxes, fees and variable expenses (0 to 90). The four percentages together may not exceed 95."
          },
          "openingCashBalance": {
            "title": "Opening cash balance",
            "minimum": -1000000000000,
            "maximum": 1000000000000,
            "type": "number",
            "description": "Cash balance before month 1. May be negative.",
            "default": 0
          },
          "monthlyRevenue": {
            "title": "Revenue forecast (12 months)",
            "minItems": 12,
            "maxItems": 12,
            "type": "array",
            "description": "Expected cash inflow for each of the next 12 months, exactly 12 numbers.",
            "items": {
              "type": "number",
              "minimum": 0,
              "maximum": 1000000000000
            }
          },
          "monthlyExpenses": {
            "title": "Expense forecast (12 months)",
            "minItems": 12,
            "maxItems": 12,
            "type": "array",
            "description": "Expected cash outflow for each of the next 12 months, exactly 12 numbers.",
            "items": {
              "type": "number",
              "minimum": 0,
              "maximum": 1000000000000
            }
          },
          "startMonth": {
            "title": "First month",
            "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
            "type": "string",
            "description": "Optional first forecast month as YYYY-MM. Without it the months are labeled Month 1 to Month 12."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}