Skip to content
DocsAPI reference

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.

MethodPathPurpose
GET/api/admin/products/template.csvProduct template
GET/api/admin/customers/template.csvCustomer template
GET/api/admin/products/export.csvProduct export
GET/api/admin/customers/export.csvCustomer export
GET/api/admin/orders/export.csvOrder export
POST/api/admin/products/importQueue a product import
POST/api/admin/customers/importQueue a customer import

Send an import as multipart form data with a file field:

bash
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.

bash
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.

Source reviewed Checked against kernel fe5c475.

Found something unclear? Let us know

Start exploring

NavigateOpenEscClose