{
  "openapi": "3.0.1",
  "info": {
    "title": "GA4 Ecommerce Purchase & Order Reconciliation",
    "description": "Reconcile supplied GA4 purchase exports with store orders by transaction ID. Flag duplicate IDs, missing counterparts and comparable revenue differences. Export JSON, CSV and HTML. Prepared CSV/JSON only; no Google login or automatic tracking repair. $0.25 per completed report.",
    "version": "0.1",
    "x-build-id": "RW5jgYV2i3d6ZW57N"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/h_murdock~ga4-order-reconciliation/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-h_murdock-ga4-order-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/h_murdock~ga4-order-reconciliation/runs": {
      "post": {
        "operationId": "runs-sync-h_murdock-ga4-order-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/h_murdock~ga4-order-reconciliation/run-sync": {
      "post": {
        "operationId": "run-sync-h_murdock-ga4-order-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",
        "required": [
          "propertyScope",
          "exportScope",
          "purchaseValueBasis",
          "orderValueBasis",
          "tolerance",
          "window",
          "purchaseCoverage",
          "orderCoverage",
          "purchases",
          "orders"
        ],
        "properties": {
          "propertyScope": {
            "title": "Single property scope",
            "type": "string",
            "description": "Opaque label identifying the single GA4 property represented by these rows. Do not include credentials. Mixing properties under one transaction namespace is unsupported."
          },
          "exportScope": {
            "title": "Export scope",
            "type": "string",
            "description": "Explicit source/workflow scope, e.g. daily purchase events and paid backend orders. IDs are compared only as exact supplied strings within this declared scope."
          },
          "purchaseValueBasis": {
            "title": "Purchase value basis",
            "type": "string",
            "description": "Caller-declared exact basis for purchase values, e.g. merchandise net of discounts, excluding tax/shipping. Must exactly equal orderValueBasis for monetary comparison; no normalization is inferred."
          },
          "orderValueBasis": {
            "title": "Order value basis",
            "type": "string",
            "description": "Caller-declared exact basis for backend values. Use a normalized comparable value column; different labels remain unresolved."
          },
          "tolerance": {
            "title": "Absolute amount tolerance",
            "type": "string",
            "description": "Nonnegative decimal STRING in each same-currency pair; 18 integer and at most6 fractional digits. Inclusive boundary. No percentages or currency conversion."
          },
          "window": {
            "title": "Audit window and timezone",
            "type": "object",
            "description": "Required start/end RFC3339 timestamps, start inclusive and end exclusive, plus timezone as Z or fixed offset such as +05:30. Every known source timestamp must use that exact offset. Normalize DST windows before upload. Unknown timestamp is null. Real dates with seconds required."
          },
          "purchaseCoverage": {
            "title": "Purchase export coverage",
            "enum": [
              "complete",
              "partial",
              "unknown"
            ],
            "type": "string",
            "description": "Mark complete only if this source includes every relevant record for the declared scope/window. Partial or unknown coverage prevents missing-counterpart conclusions and complete-outcome claims."
          },
          "orderCoverage": {
            "title": "Backend order export coverage",
            "enum": [
              "complete",
              "partial",
              "unknown"
            ],
            "type": "string",
            "description": "Mark complete only if this source includes every relevant record for the declared scope/window. Partial or unknown coverage prevents missing-counterpart conclusions and complete-outcome claims."
          },
          "purchases": {
            "title": "Normalized purchase source",
            "type": "object",
            "description": "Supply exactly {rows:[...]} or {csv:\"...\",mapping:{transactionId:\"column\",timestamp:\"column\",currency:\"column\",value:\"column\",rowId:\"optional column\"}}. Each normalized row requires transactionId (string/null), timestamp (RFC3339/null), currency (uppercase3-letter string/null), value (decimal STRING/null); optional rowId string. Empty rows arrays allowed. Missing fields must explicitly be null; unknown keys rejected. CSV blank cells become null; quoted fields/BOM supported, duplicate headers and irregular rows rejected. Combined sources<=5000 rows, total JSON<=4 MB."
          },
          "orders": {
            "title": "Normalized backend order source",
            "type": "object",
            "description": "Supply exactly {rows:[...]} or {csv:\"...\",mapping:{transactionId:\"column\",timestamp:\"column\",currency:\"column\",value:\"column\",rowId:\"optional column\"}}. Each normalized row requires transactionId (string/null), timestamp (RFC3339/null), currency (uppercase3-letter string/null), value (decimal STRING/null); optional rowId string. Empty rows arrays allowed. Missing fields must explicitly be null; unknown keys rejected. CSV blank cells become null; quoted fields/BOM supported, duplicate headers and irregular rows rejected. Combined sources<=5000 rows, total JSON<=4 MB."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}