Sales email to ShipStation · 2026
Parse a sales email, hold it or build a label
Laboratory
- Role
- Independent engineer
- Stack
- Python, FastAPI, Pydantic
- Status
- Laboratory
- Live
- scrocle.cloud/demo/shipstation
Problem
Orders arrive as email. Someone copies the ship-to, the SKU, and the qty into ShipStation. A missing ZIP still prints a label. The job is to extract, check, and stop before a bad address ships.
Constraint
This demo does not watch Gmail and does not call a live ShipStation store. Extraction is patterns plus Pydantic, not a model. Production would attach the inbox and POST the same JSON.
Architecture
- Sales email
- Parse
- Validate
- ShipStation JSON
- Label preview
- Hold / review
Decisions
Check before you print
A bad city, state, or ZIP goes to hold. The demo will not invent a label for an incomplete address.
Payloads you can read
The create-order and create-label JSON are the same shapes ShipStation expects. You can see them. They are not sent.
Open an inbox message and run it. A complete PO builds order JSON and a fake thermal label. A missing ZIP sits in hold.
If you already have a store in ShipStation and mail that looks like orders, that is the production slice. This page is the extract-and-check part, with the POST turned off.
Outcome
Demo. Live at scrocle.cloud/demo/shipstation. Nine parser tests pass. Not a client job.
What was handed over
- How to run the FastAPI demo locally
- That ShipStation writes are simulated
- What a production inbox watch would add