{
  "openapi": "3.0.1",
  "info": {
    "title": "Supplier Catalog Reconciliation & CSV/Excel Dedupe",
    "description": "Match supplier catalogs to inventory by SKU, barcode and product fields. Review uncertain pairs and export merged CSV/Excel files. Start with the tested supplier-catalog demo, then map your own files.",
    "version": "0.0",
    "x-build-id": "rhZteGkyEOy48h8Wk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jyinnovation~record-linker-dedupe-for-csv-excel-and-catalogs/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jyinnovation-record-linker-dedupe-for-csv-excel-and-catalogs",
        "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/jyinnovation~record-linker-dedupe-for-csv-excel-and-catalogs/runs": {
      "post": {
        "operationId": "runs-sync-jyinnovation-record-linker-dedupe-for-csv-excel-and-catalogs",
        "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/jyinnovation~record-linker-dedupe-for-csv-excel-and-catalogs/run-sync": {
      "post": {
        "operationId": "run-sync-jyinnovation-record-linker-dedupe-for-csv-excel-and-catalogs",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "dedupe",
              "link"
            ],
            "type": "string",
            "description": "<b>dedupe</b>: find duplicates inside table A. <b>link</b>: match every record of table A with its counterpart in table B (merge two catalogs, reconcile two systems).",
            "default": "dedupe"
          },
          "fileUploadA": {
            "title": "Table A - upload a file",
            "type": "string",
            "description": "CSV, TSV or XLSX. Alternatively use a URL or an Apify dataset ID below."
          },
          "urlA": {
            "title": "Table A - URL",
            "type": "string",
            "description": "Direct link to a CSV, TSV or XLSX file (public link, e.g. a published Google Sheet export, S3 or Dropbox direct link)."
          },
          "datasetIdA": {
            "title": "Table A - Apify dataset ID",
            "type": "string",
            "description": "ID of a dataset (for example the output of another Actor). Items become rows; nested values are stored as JSON text."
          },
          "sheetA": {
            "title": "Table A - sheet (XLSX)",
            "type": "string",
            "description": "Sheet name or number (1 = first). Empty = first visible sheet."
          },
          "fileUploadB": {
            "title": "Table B - upload a file",
            "type": "string",
            "description": "Only used in link mode. CSV, TSV or XLSX."
          },
          "urlB": {
            "title": "Table B - URL",
            "type": "string",
            "description": "Direct link to a CSV, TSV or XLSX file."
          },
          "datasetIdB": {
            "title": "Table B - Apify dataset ID",
            "type": "string",
            "description": "ID of a dataset to use as table B."
          },
          "sheetB": {
            "title": "Table B - sheet (XLSX)",
            "type": "string",
            "description": "Sheet name or number (1 = first). Empty = first visible sheet."
          },
          "autoConfigure": {
            "title": "Auto-configure fields from column names",
            "type": "boolean",
            "description": "When no fields are configured, guess them from the headers: EAN/UPC/GTIN and SKU/part number columns become id codes, product/company/title columns become fuzzy text, brand, website, address, city, postal code, country and lat/lon are recognised too. Personal-contact columns (email, phone, person names) are never used.",
            "default": true
          },
          "fields": {
            "title": "Match fields (optional)",
            "type": "array",
            "description": "JSON list of fields. Each: <code>{\"columnA\": \"Product Name\", \"columnB\": \"Description\", \"type\": \"text\", \"weight\": 3}</code>. <b>type</b>: <code>exact</code>, <code>id_code</code> (EAN/UPC/GTIN with check digit, SKU and part-number normalization), <code>text</code> (fuzzy, unit and company-suffix aware), <code>number</code> (<code>tolerance</code> or <code>tolerancePct</code>), <code>geo</code> (<code>\"columnA\": [\"lat\",\"lon\"]</code>, <code>meters</code>). Optional per field: <code>name</code>, <code>decisive</code> (id_code), <code>minScore</code>, <code>stopwords</code>, <code>unitNormalization</code>, <code>legalSuffixes</code>, <code>numberPenalty</code>. In dedupe mode <code>columnB</code> is not needed. Empty = autoConfigure."
          },
          "matchThreshold": {
            "title": "Match threshold (0-100)",
            "minimum": 50,
            "maximum": 100,
            "type": "integer",
            "description": "Pairs scoring at or above this are accepted matches.",
            "default": 90
          },
          "reviewThreshold": {
            "title": "Review threshold (0-100)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Pairs between this value and the match threshold go to REVIEW.csv for a human decision. Must not exceed the match threshold.",
            "default": 75
          },
          "cardinality": {
            "title": "Link mode: how many matches per record",
            "enum": [
              "one_to_one",
              "many_to_many"
            ],
            "type": "string",
            "description": "<b>one_to_one</b>: each record of A is matched to at most one record of B (best score first; competing pairs go to review). <b>many_to_many</b>: every pair above the threshold is kept (e.g. one supplier item matching several of your SKUs).",
            "default": "one_to_one"
          },
          "survivorship": {
            "title": "Golden record rule",
            "enum": [
              "most_complete",
              "most_recent",
              "prefer_a",
              "prefer_b"
            ],
            "type": "string",
            "description": "Which record of a cluster supplies the golden record in merged.xlsx. Empty cells are filled from the other records (see 'Fill gaps').",
            "default": "most_complete"
          },
          "survivorshipDateColumn": {
            "title": "Date column for 'most recent'",
            "type": "string",
            "description": "Column holding the last-updated date (looked up by name in both tables). ISO dates (2024-05-31) are safest."
          },
          "dayFirst": {
            "title": "Ambiguous dates are day-first",
            "type": "boolean",
            "description": "For dates like 03/04/2024: tick for 3 April, untick for March 4.",
            "default": false
          },
          "fillGaps": {
            "title": "Fill gaps from the other records",
            "type": "boolean",
            "description": "Empty cells in the golden record are taken from the next best record of the cluster. The filled columns are listed per record.",
            "default": true
          },
          "mergedIncludeUnique": {
            "title": "Keep records without a match in merged.xlsx",
            "type": "boolean",
            "description": "On: merged.xlsx is the full de-duplicated / combined list. Off: only clusters of two or more records.",
            "default": true
          },
          "outputColumns": {
            "title": "Columns in matches.csv / REVIEW.csv",
            "enum": [
              "keys",
              "all"
            ],
            "type": "string",
            "description": "<b>keys</b>: only the columns used for matching. <b>all</b>: every column of both tables.",
            "default": "keys"
          },
          "maxRows": {
            "title": "Maximum rows per table",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Safety cap. Rows beyond it are ignored (and not charged). Tested up to 200,000 x 200,000 rows with 4 GB memory.",
            "default": 250000
          },
          "maxBlockSize": {
            "title": "Maximum block size (advanced)",
            "minimum": 10,
            "maximum": 5000,
            "type": "integer",
            "description": "Records sharing a blocking key (a word, an id prefix, ...) are all compared when the group has at most this many records; bigger groups are compared inside a sorted-neighbourhood window. Raise it to trade speed for recall.",
            "default": 250
          },
          "datasetItems": {
            "title": "Maximum dataset items",
            "minimum": 0,
            "maximum": 200000,
            "type": "integer",
            "description": "Match pairs and clusters pushed to the dataset (best first). The CSV files always contain everything.",
            "default": 20000
          },
          "encoding": {
            "title": "Text encoding (CSV/TSV)",
            "type": "string",
            "description": "Empty = automatic (UTF-8 with or without BOM, UTF-16, Windows-1252). Set e.g. <code>latin-1</code> to force one."
          },
          "delimiter": {
            "title": "Delimiter (CSV/TSV)",
            "type": "string",
            "description": "Empty = automatic (comma, semicolon, tab, pipe)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}