4.1 KiB
Descrybe v20 — credit reference value and import languages
Admin — value of one credit
Open Admin → Billing → Reference value of one credit (EUR).
GET /api/admin/credit-value-eur(platform administrator only) returnseur_per_credit,currency, and an explanatory note.PUT /api/admin/credit-value-eurwith{ "eur_per_credit": 0.5 }sets a reference valuation in EUR, with up to six decimal places.- Unconfigured returns
null, rather than inventing a platform-wide credit price. - This is not a Stripe product price or an invoice charge. Credit value depends on the monthly subscription and optional purchased credit packs. Actual invoices remain Stripe's authority. The admin setting must not be used to multiply past credit charges into legally issued invoices.
Current hardcoded one-time top-up pack prices in apps/api/internal/billing/credit_packs.go vary from roughly €1.16/credit (25-credit pack) to €0.375/credit (8,000-credit pack). These are reference prices from code, not verified current Stripe prices. Updating the EUR reference rate does not update them. Plan-specific processing debits continue to be configured in the plan popup.
Language-selectable imports
Supported: en fr de es it nl pt pl cs sk hu ro bg hr sl sv da fi el et lv lt mt ga ja.
Dashboard
- Feeds → Create/Edit: choose Feed content language for XML, CSV, or JSON source data.
- Categories → Import CSV / JSON URL: choose Upload language / Import language.
- Attributes → Import CSV / JSON URL: same.
- Product feeds sync through Feeds, not a separate Product Management JSON importer.
API catalog uploads
POST /api/categories/import?language=slPOST /api/attributes/import?language=hrPOST /api/products/import?language=de
For multipart/form-data, use file plus language=sl (query parameter or multipart field).
For JSON URL import:
{
"url": "https://supplier.example/products?format=json",
"format": "json",
"language": "sl",
"request_headers": {}
}
Import language may be omitted to use the company's primary language. Invalid language codes return HTTP 400. Only import routes accessible to an authorized company admin/API actor can be called.
Feed create/edit API: set content_language when posting to /api/feeds or updating /api/feeds/{id}. The public POST /api/v1/feeds API-key endpoint also accepts content_language for URL and multipart sources. Existing feeds without this field retain company-primary behavior. Changing feed language causes a fresh sync instead of treating old mapping hashes as unchanged.
Data integrity
- Category labels/descriptions are saved in
categories.localized_fields[language]. - Attribute names are saved in
attributes.localized_fields[language]. - Raw and catalog product source translations are saved in
source_localizations[language]. - Primary-language columns remain compatible with older consumers. When a new item first arrives only in a non-primary language, that language's title serves as the initial fallback until primary-language data is supplied.
- For categories and attributes, GET list or category detail with
?language=slto display that language when present, with fallback otherwise. Fulllocalized_fieldsmaps are also returned. - Product detail APIs expose
source_localizations. This is supplier source data, separate fromlocalized_contentcontaining AI-generated output. - No translation is performed automatically by this import feature: selecting a language labels the supplied text accurately.
Deployment
- Commit to the canonical Git repo, do not extract ZIP files over the production checkout.
- Apply migration
054_catalog_import_languages.sqlusingnpm run migrate(or your existingrbdeploy). - Deploy API, worker, and frontend together.
- Test one SKU and one category in two languages before enabling scheduled imports on production catalogs.
The new migration adds JSONB fields without rewriting existing supplier content. Existing imported product records are not automatically translated or relabeled.