{
  "openapi": "3.0.1",
  "info": {
    "title": "Shopify → QuickBooks Online Reconciliation — CSV Report",
    "description": "Upload Shopify orders (and optional payouts) CSV plus a QuickBooks Online export CSV. Get a pay-per-report discrepancy list: missing in QBO, duplicates, amount/tax/shipping/refund mismatches, fee timing — plus a Markdown/HTML summary. No Shopify or QBO login.",
    "version": "0.0",
    "x-build-id": "fnvvqPENOR99Rn9sl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/goldenrod_serrano~shopify-qbo-reconciliation/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-goldenrod_serrano-shopify-qbo-reconciliation",
        "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/goldenrod_serrano~shopify-qbo-reconciliation/runs": {
      "post": {
        "operationId": "runs-sync-goldenrod_serrano-shopify-qbo-reconciliation",
        "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/goldenrod_serrano~shopify-qbo-reconciliation/run-sync": {
      "post": {
        "operationId": "run-sync-goldenrod_serrano-shopify-qbo-reconciliation",
        "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": {
          "sampleMode": {
            "title": "Free synthetic sample (not charged)",
            "type": "boolean",
            "description": "Run the built-in synthetic Shopify + QBO fixtures and return a demo discrepancy report without charging. An empty input does the same. Fixtures are invented test data, not a real store.",
            "default": false
          },
          "shopifyOrdersCsv": {
            "title": "Shopify orders CSV (paste or file upload)",
            "type": "string",
            "description": "Shopify Admin → Orders → Export CSV (or paste the file contents). Official columns include Name, Financial Status, Currency, Subtotal, Shipping, Taxes, Total, Created at, Lineitem *. Multi-line-item orders are aggregated by Name. See https://help.shopify.com/en/manual/fulfillment/managing-orders/exporting-orders"
          },
          "shopifyOrdersUrl": {
            "title": "Shopify orders CSV URL (optional alternative)",
            "type": "string",
            "description": "Public HTTPS URL to a Shopify orders export CSV if you prefer not to upload. Ignored when shopifyOrdersCsv is set."
          },
          "shopifyPayoutsCsv": {
            "title": "Shopify payouts / transactions CSV (optional)",
            "type": "string",
            "description": "Optional. Finance → Payouts → Export transactions CSV (Transaction Date, Type, Order, Amount, Fee, Net, Payout Date/Status). Enables fee_timing findings. See https://help.shopify.com/en/manual/payments/shopify-payments/payouts/view-details"
          },
          "shopifyPayoutsUrl": {
            "title": "Shopify payouts CSV URL (optional)",
            "type": "string",
            "description": "Public HTTPS URL to a Shopify payouts/transactions CSV. Ignored when shopifyPayoutsCsv is set."
          },
          "qboCsv": {
            "title": "QuickBooks Online export CSV (paste or file upload)",
            "type": "string",
            "description": "QBO Reports → Transaction List by Date (or Transaction Detail) → Export CSV. Preamble rows (company name, report title, date range) are auto-skipped. Prefer columns Date, Transaction Type, Num, Name, Memo/Description, Account, Amount. Put the Shopify order id in Num (e.g. #1001) or in the memo."
          },
          "qboUrl": {
            "title": "QBO CSV URL (optional alternative)",
            "type": "string",
            "description": "Public HTTPS URL to a QBO export CSV. Ignored when qboCsv is set."
          },
          "amountToleranceUsd": {
            "title": "Amount tolerance (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Differences at or below this absolute amount are treated as matched. Default 0.01 (one cent).",
            "default": 0.01
          },
          "includeMatched": {
            "title": "Also list matched orders",
            "type": "boolean",
            "description": "When on, dataset includes type=matched rows for orders whose amounts agree within tolerance (useful for a full audit trail). Still one charged report event.",
            "default": false
          },
          "periodLabel": {
            "title": "Period label (optional)",
            "type": "string",
            "description": "Free-text label stored on the summary (e.g. 2026-09). Does not filter rows — filter in Shopify/QBO before export."
          },
          "shopifyOrdersColumnMap": {
            "title": "Shopify orders column map (optional override)",
            "type": "object",
            "description": "Optional map of canonical field → your CSV header when aliases fail. Canonical keys: name, total, taxes, shipping, subtotal, financial_status, created_at, paid_at, currency, email, discount_amount, lineitem_sku, lineitem_name, lineitem_quantity. Example: {\"total\": \"Order Total\"}."
          },
          "shopifyPayoutsColumnMap": {
            "title": "Shopify payouts column map (optional override)",
            "type": "object",
            "description": "Optional map for payouts CSV. Canonical keys: transaction_date, type, order, amount, fee, net, payout_date, payout_status, currency, payout_id."
          },
          "qboColumnMap": {
            "title": "QBO column map (optional override)",
            "type": "object",
            "description": "Optional map for QBO CSV. Canonical keys: date, transaction_type, num, name, memo, account, amount, balance, class, split. Example: {\"num\": \"Doc Number\", \"memo\": \"Description\"}."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}