Data and media
Import and export CSV data and upload images for your catalog.
CSV
Use an admin session for the documented import/export workflow. Download the current template before preparing an import; its column definitions are tied to the deployed kernel.
| Method | Path | Purpose |
|---|---|---|
GET | /api/admin/products/template.csv | Product template |
GET | /api/admin/customers/template.csv | Customer template |
GET | /api/admin/products/export.csv | Product export |
GET | /api/admin/customers/export.csv | Customer export |
GET | /api/admin/orders/export.csv | Order export |
POST | /api/admin/products/import | Queue a product import |
POST | /api/admin/customers/import | Queue a customer import |
Send an import as multipart form data with a file field:
curl "$SELLFORGE_ADMIN_URL/api/admin/products/import" \
-H "Authorization: Bearer $SELLFORGE_SESSION" \
-F '[email protected];type=text/csv'
The response contains job_id and status. Poll GET /api/admin/imports/:jobId/status to read progress, summary, last_error, and attempt information. Accepting the upload does not mean every row has been imported successfully.
For customer imports, ?invite=1 enables the default invitation behavior for that import.
Media uploads
POST /api/uploads/image accepts a multipart image for an admin or partner session. Supported MIME types are JPEG, PNG, WebP, and GIF.
curl "$SELLFORGE_ADMIN_URL/api/uploads/image" \
-H "Authorization: Bearer $SELLFORGE_SESSION" \
-F '[email protected];type=image/jpeg'
The response includes url, variants, width, height, and size_bytes. The pipeline produces WebP variants and stores them using configured media storage, with a local-disk fallback.
POST /api/products/:id/images uses the same upload pipeline with a product-specific storage path. Preserve the returned URLs when associating images with product data.
Content types
Let your HTTP client set the multipart boundary. Do not combine a multipart upload with a manually forced Content-Type: application/json header. CSV exports are downloadable CSV responses rather than JSON resource envelopes.
Found something unclear? Let us know