Skip to main content
The data import pipeline lets you seed or replace a business’s catalog in two steps:
  1. Upload & preview — POST a file to receive a preview_id and a summary of what will be imported.
  2. Confirm — POST to the confirm endpoint to write everything to the database in a single transaction.
Previews expire after 1 hour. The confirm endpoint is single-use; the preview row is deleted on success.

Upload & preview

Parses the uploaded file, validates it against the selected format’s rules, stores a preview row, and returns a summary. No data is written to the business profile or catalog at this stage.

Authentication

API-key callers are not supported on this endpoint. If the authenticated user does not own the business, the endpoint returns 404 (same as if the business did not exist).

Path parameters


Request body

Content-Type: multipart/form-data

Response 200


Error codes


Confirm import

Writes the previewed data to the database in a single atomic transaction:
  • Updates businesses.name, description, website, and industry (ezForge JSON imports only, when the file includes a business.name).
  • Upserts the business profile (phone, city, state, zip, custom fields) — ezForge JSON imports only.
  • Resolves catalog categories: existing categories are matched by name; missing ones are created in the order they appear in the import, with sortOrder appended after any existing categories.
  • Inserts catalog items with sortOrder appended after existing items. currency is always USD; isAvailable defaults to true.
  • Appends a row to the import audit log.
  • Deletes the preview row (single-use; a second call returns 404).

Authentication


Path parameters


Request body

No request body required.

Response 200


Error codes


Preview TTL contract

Previews expire exactly 1 hour after the upload request completes. The expires_at field in the upload response is the authoritative expiry timestamp.
  • Clients should call confirm promptly. If the TTL elapses, upload the file again — no data was written during the preview phase.
  • A background cleanup cron sweeps expired preview rows hourly. Expired previews that are not confirmed are silently discarded.

Supported formats

ezForge JSON v1.0

The native import format. Supports business profile updates in addition to catalog items. Schema
business object catalog_items array Limits Fatal validation errors (upload returns 422 validation_error)
  • File is not valid JSON
  • Root is not an object
  • version is not "1.0"
  • business key is missing or not an object
  • business.name is empty or missing
  • business.description is empty or missing

Vertical CSV

A simpler tabular format for catalog-only imports. Business profile fields are not updated for CSV imports. Use ezForge JSON v1.0 if you need to update the business name, description, or contact details. The CSV parser accepts any subset of the columns below; unknown columns are silently ignored. Missing optional columns use the default values shown in the table. Rows with an empty name column are skipped. If all rows are skipped after parsing, the upload returns 422 validation_error.

CSV templates

Four pre-built templates are available to download directly from the web app. Each template includes sample rows demonstrating valid column values.

Generic catalog

Download: /hub/templates/generic_catalog.csv Columns: name, description, price, price_type, item_type, category Covers all four item_type and price_type values. Use this as a starting point if no vertical-specific template fits your business.

Restaurant menu

Download: /hub/templates/restaurant_menu.csv Columns: name, description, price, category, item_type All sample rows use item_type: menu_item. Sample categories: Appetizers, Salads, Pizzas, Pasta, Desserts. Note: this template omits the price_type column — the parser defaults to fixed for all rows. Add the column manually if you need starting_at, hourly, or free_estimate pricing.

Retail inventory

Download: /hub/templates/retail_inventory.csv Columns: name, description, price, category, item_type All sample rows use item_type: product. Sample categories: Electronics, Apparel, Kitchenware, Accessories, Fitness. Note: this template omits the price_type column — the parser defaults to fixed.

Services catalog

Download: /hub/templates/services_catalog.csv Columns: name, description, price, price_type, category, item_type Mix of service and consultation item types. Demonstrates all four price_type values. Use for professional services, home services, or consulting businesses.

Warning types

Non-fatal issues are returned in the warnings array of the upload response. They do not block the import. Each warning object has the following fields: