Import into Your REST API — CSV, Excel & PDF
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Goal: your users bring the file they have — CSV, Excel, even a PDF or a scan — and clean records land in your own REST API without leaving your product, and without you writing a mapping/validation UI. The pattern is the same every time: embed → validate → deliver. Mildport handles the first two; your webhook handler owns the write into your own REST API.
1. Embed the importer
Section titled “1. Embed the importer”<mildport-import api-base-url="https://imports.your-infra.example" license-key="SIGNED_TENANT_KEY" catalog-key="contacts"></mildport-import>2. Publish a catalog that mirrors your own REST API
Section titled “2. Publish a catalog that mirrors your own REST API”The schema lives in a target catalog, not in host code.
Create it in the catalog editor (/admin/catalogs on your engine, or embed
<mildport-catalog-editor>), draft it from your OpenAPI spec or a sample JSON record,
and publish. The widget loads that published catalog by catalog-key.
Whatever your API accepts — contacts, products, transactions — becomes the catalog. Required fields on the catalog are the ones your API would 400; the review step then guarantees the webhook payload is insertable.
Users then upload anything — renamed headers, six languages, XLSX/ODS, even PDF tables — and Mildport’s deterministic matcher plus the review step produce typed, validated rows.
Need the schema computed per user at runtime, or versioned with your app? That’s the
schema-as-code path — pass targets
from host code instead of catalog-key.
3. Deliver from your webhook
Section titled “3. Deliver from your webhook”Clean rows arrive on your signed apply webhook; your handler writes to your own REST API:
POST /api/v1/contacts/batch on YOUR backend — the webhook handler is ~20 lines: verify signature, map rows, call your service layerYour own REST API-specific gotchas
Section titled “Your own REST API-specific gotchas”- make the handler idempotent (the apply webhook retries): an import id + upsert semantics beats hoping for exactly-once.
- return per-row failures to a dead-letter list instead of failing the batch — users fixed 9,990 rows; don’t lose them over 10.
- version the payload you accept; the import contract will outlive your current schema.
Why not hand-rolled import?
Section titled “Why not hand-rolled import?”You could build the upload → parse → map → validate pipeline yourself — teams do, and then spend quarters on encodings, dialects and mapping UX. Embedding buys the whole front half; your API keeps owning the write.
Try the flow first: the playground (no signup), then the Quickstart and target catalogs. Prices are published — hosted and flat-annual self-host — at mildport.com/#pricing.