{
  "openapi": "3.0.1",
  "info": {
    "title": "Supplier Price List vs Catalog: CSV Comparison",
    "description": "Compare supplier prices with your catalog by SKU before a bulk update. Export proposed price changes and exceptions for conflicting prices, invalid values and unknown SKUs. Preserves leading-zero SKUs and Hebrew text. Includes a synthetic demo; does not update Shopify.",
    "version": "0.2",
    "x-build-id": "qQkiujufzsTJUu2qb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/royal_paddle~catalog-reconcile-csv/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-royal_paddle-catalog-reconcile-csv",
        "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/royal_paddle~catalog-reconcile-csv/runs": {
      "post": {
        "operationId": "runs-sync-royal_paddle-catalog-reconcile-csv",
        "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/royal_paddle~catalog-reconcile-csv/run-sync": {
      "post": {
        "operationId": "run-sync-royal_paddle-catalog-reconcile-csv",
        "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": {
          "currentCatalogCsv": {
            "title": "Current catalog CSV (text)",
            "type": "string",
            "description": "Full current catalog as CSV text. Default columns: sku, title, price (or price_ils). SKU/title/price aliases (Variant SKU, id, Variant Price, etc.) are auto-tried when overrides are blank. Leading zeros preserved; UTF-8 / Hebrew titles supported. Leave empty to run the bundled synthetic demo.",
            "default": "sku,title,price_ils\n001,כוס כחולה,89.00\n002,כוס אדומה,99.00\n003,מגבת פשתן,129.00"
          },
          "supplierUpdateCsv": {
            "title": "Supplier update CSV (text)",
            "type": "string",
            "description": "Supplier price update as CSV text. Default columns: sku, price (or price_ils). Currency symbols and codes (₪, $, USD, ILS) are stripped when parsing — no FX conversion. Duplicate SKUs with conflicting prices are withheld. Leave empty to run the bundled synthetic demo.",
            "default": "sku,price_ils\n001,₪99.00\n002,99.00\n003,119.00\n003,125.00\n004,79.00\n005,-5.00\n,49.00"
          },
          "currentCatalogFile": {
            "title": "Current catalog CSV (file upload)",
            "type": "string",
            "description": "Optional file upload alternative to currentCatalogCsv text. If both are set, the file wins."
          },
          "supplierUpdateFile": {
            "title": "Supplier update CSV (file upload)",
            "type": "string",
            "description": "Optional file upload alternative to supplierUpdateCsv text. If both are set, the file wins."
          },
          "currencyNote": {
            "title": "Currency note",
            "type": "string",
            "description": "Free-text note recorded in SUMMARY (e.g. ILS, tax-included, Google Shopping feed currency). Does not convert currencies — agree rules with your buyer before production use.",
            "default": "ILS (period decimals; currency symbols stripped from supplier prices)"
          },
          "skuColumn": {
            "title": "SKU column name",
            "type": "string",
            "description": "Preferred SKU column (case-insensitive). Fallbacks include sku, Variant SKU, id, item_id, handle.",
            "default": "sku"
          },
          "titleColumn": {
            "title": "Title column name (catalog)",
            "type": "string",
            "description": "Preferred title column in the catalog CSV. Fallbacks include title, name, product_title.",
            "default": "title"
          },
          "priceColumn": {
            "title": "Price column name",
            "type": "string",
            "description": "Preferred price column. Fallbacks include price_ils, price, Variant Price. Accepts values like 99.00, ₪99.00, or 99.00 USD.",
            "default": "price_ils"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}