AreaCacaoDocs
FormulationIngredients

Import and export

Load your custom ingredient catalog from CSV/JSON (with a template, 3 modes, and a preview) or download it for backup and migration.

What it is

The Import / Export ingredients dialog lets you load your own catalog of custom ingredients from a file (in bulk, without creating them one by one) or download it to keep a copy outside the app.

Import and export operate only on your account's custom catalog, not on the global public catalog. The dialog itself makes this clear: "Your account's custom catalog (does not affect the public catalog)." The global catalog of more than 10,000 ingredients is read-only and is not affected.

How to get there

From the ingredient catalog, click the Import / Export button in the header. The dialog has two tabs: Import and Export.

Import

Start with the template

If you don't have a file yet, click Download CSV template (in the prompt "Not sure where to start? Download the template with examples and edit it."). It downloads areacacao-ingredients-template.csv (the file name and the example text follow the interface language), already with the correct header and two example rows (Hazelnut praline and Dark couverture 70%) that you can edit or delete. The column names are always the same, in English.

The template includes these 24 columns (all optional except name):

name, category, subcategory, brand, supplier, customCode, pricePerKg, baseUnit, densityGPerMl, weightPerUnitG, water, fat, saturatedFat, carbs, sugars, protein, fiber, salt, kcalPer100g, cocoaButterFat, totalCocoa, alcohol, allergens, notes

The template does not include the id column: when you import, you don't set the identifier, the system generates it. (The CSV you export does include id, see Export, but that column is ignored when you re-import it.)

How to prepare the CSV

The dialog includes a collapsible How to prepare the CSV? section with the rules. In detail:

  • Only name is required. Leave blank any columns you don't have.
  • Nutrition values are per 100 g (same as on the sheet).
  • Decimal separator: both a period and a comma are accepted (18.50 or 18,50). If you use a comma as the decimal separator, a period is read as a thousands separator (1.234,56 is read as 1,234.56).
  • allergens: a list of codes separated by ;. The valid codes are the 14 official EU ones: gluten, crustaceans, eggs, fish, peanuts, soy, milk, nuts, celery, mustard, sesame, sulphites, lupin, molluscs. Any code outside this list is ignored. See EU-14 Allergens.
  • Empty allergens = no allergens. If you don't know them yet, write undeclared (sin declarar is also accepted): the sheet keeps its allergens undeclared, which is not the same as "no allergens".
  • alcohol: grams of ethanol per 100 g (wines and liqueurs). Empty = no data.
  • Micronutrients (vitamins, minerals, cholesterol, caffeine) are not loaded via CSV: they're filled in on the ingredient sheet. (If you need them in a file, use the JSON format, which does preserve them.)

Load the data

You have three ways to provide the content:

  • Drag and drop a file onto the zone "Drag a CSV or JSON file here".
  • Click Choose file and pick a .csv or .json from your computer.
  • Expand Or paste text manually and paste the content directly.

The app detects the format automatically (if the text starts with { or [ it treats it as JSON; otherwise as CSV) and shows it in the Detected format selector, which you can correct by hand if needed. The Detected format and Mode selectors and the buttons appear as soon as there's content loaded.

Choose the mode

The Mode selector decides how the import is applied. Matching against your existing ingredients is done by name (case-insensitive):

ModeWhat it does
Create new only (recommended, default)Adds the ingredients whose name doesn't exist and skips the ones you already have (leaves them untouched). It also skips names of sheets you deleted: they stay deleted.
Create or update (by name)Adds the new ones and overwrites the existing ones that match by name with the file's data. If the name matches a sheet you deleted, it brings it back with the file's data.
Replace all (deletes existing)Removes all your custom ingredients and then imports the ones in the file (reactivating by name any that reappear).

The Replace all mode is destructive: it removes all your custom ingredients before importing. The dialog warns you ("Caution: this option will delete ALL your existing custom ingredients before importing. This action is irreversible.") and, when you click Import, asks for an extra confirmation ("replace_all will DELETE all your existing custom ingredients before importing. Continue?"). The deletion is a soft delete, so the recipes that already used those ingredients still show their sheet and don't break; but any not in the file will stop appearing in My ingredients.

Preview and confirm

Preview (simulation)

Click Preview to run a simulation without saving anything. You'll see the counters Total, New, Updated, Skipped, and Errors, plus the detail of the first five rows with an error if there are any ("Row N: …"). Once a preview has been run, the button is renamed Recalculate preview, in case you change the content or the mode.

Import (for real)

If the preview looks right, click Import to apply the changes. When it finishes you'll see the Import complete block with the real result: Added, Updated, Skipped, and Errors. The My ingredients list reloads when you open that tab: if you were already on it, switch to Catalog and back, or reload the page, to see the changes.

What gets imported from each row

These fields are recognized: name (required), category, subcategory, brand, supplier, customCode, pricePerKg, baseUnit (default g), densityGPerMl, weightPerUnitG, the 12 nutrition values (water, fat, saturatedFat, carbs, sugars, protein, fiber, salt, kcalPer100g, cocoaButterFat, totalCocoa, alcohol), allergens, and notes. Headers are case-insensitive and some aliases are accepted (customCode/custom_code, baseUnit/base_unit/unit). Any column not in the list is ignored without an error.

Errors you'll see:

  • A row with no name is skipped and reported as "Row N: Name is missing".
  • A malformed file is rejected in full: "The CSV file is empty or has no data rows", "Invalid JSON: …", or "JSON: no 'ingredients' array found".

The server sends these messages in the interface language. In "Invalid JSON: …", the technical detail after the colon comes straight from the JSON parser, usually in English.

Export

In the Export tab ("Download your custom catalog. The JSON format preserves complex structures (macros, allergens); CSV is ideal for editing in Excel/Sheets.") you have two direct-download options. Only your active ingredients are exported (deleted ones are not included).

Export as JSON

"Complete format for backup or migration to another instance." Downloads the full sheet of each ingredient as stored, including what the CSV can't represent: micronutrients (which live inside macros), alternate names, and custom fields. It's the recommended format for backups. The structure is:

{
  "version": 1,
  "exportedAt": "2026-06-01T…Z",
  "count": 12,
  "ingredients": [
    { "id": "ci_…", "name": "…", "macros": { "fat": 42, "vitaminE": 5 }, "allergens": ["nuts"], "altNames": [], "customFields": {} }
  ]
}

Each object in ingredients is the full ingredient sheet (abbreviated here).

When you re-import a JSON (for example, to migrate to another account in Create or update mode), the base data, the macros and micronutrients, and the allergens are restored ("allergens": null comes back as undeclared; if the allergens key is missing, the sheet ends up with no allergens) — but not the alternate names, the custom fields, or the preservative declaration, which you would have to re-enter. For a complete backup, keep the original JSON file.

Export as CSV

"Flat table to open in Excel/Sheets/Numbers." Downloads a flat table (file custom-ingredients-YYYY-MM-DD.csv) ideal for reviewing or editing in a spreadsheet. The CSV includes the macros but not the micronutrients (for those, use JSON).

CSV columns

The dialog's collapsible CSV columns section lists the 25 columns of the exported file, in this order:

id, name, category, subcategory, brand, supplier, customCode, pricePerKg, baseUnit, densityGPerMl, weightPerUnitG, water, fat, saturatedFat, carbs, sugars, protein, fiber, salt, kcalPer100g, cocoaButterFat, totalCocoa, alcohol, allergens, notes

The allergens column is a semicolon-separated list (for example gluten;milk); it's empty if the sheet has no allergens and contains undeclared if they're undeclared. The only difference from the import template is the id column (present when exporting, ignored when importing).

Notes and limits

  • Round-trip by name. Exporting and re-importing works: matching is by name, so the id column in the exported CSV isn't needed when you re-import.
  • CSV vs JSON. Use CSV for quick spreadsheet editing (macros, no micros); use JSON for backups: it's the only format that includes the micronutrients. On re-import, JSON keeps macros and micros, but not the alternate names or the custom fields.
  • Size. There's no row cap, but the request is limited to ~5 MB. For very large catalogs, split the file into several imports.
  • Privacy. Everything operates on your account catalog; neither import nor export touches the public catalog.

Next steps

On this page