Skip to content
arch-lab
Live
Demo
Syntax
Validate
MCP
Parcel delivery
One shipment, exactly one label, at most one signature, and the parcels that make it up.
Open in the playground
carries
is printed as
is signed for by
travels in
Carrier
id
PK
uuid
name
UK
string
tracking_url_template
string
Parcel — A physical box. A shipment too heavy for one box becomes several, all travelling together.
Parcel
id
PK
uuid
shipment_id
FK
uuid
weight_g
integer
Shipment — One dispatch to one address. Created when the picking is finished, never before.
Shipment
PostgreSQL
id
PK
uuid
order_id
FK
uuid
carrier_id
FK
uuid
dispatched_at
timestamp
Shipping label — Printed once per shipment and never reprinted — a second label is a second shipment, because the carrier has already scanned the first.
Shipping label
shipment_id
PK FK
uuid
tracking_code
UK
string
printed_at
timestamp
Signature — Captured on delivery, when the service level asks for one. Most parcels are left in a safe place and have none.
Signature
shipment_id
PK FK
uuid
signed_by
string
captured_at
timestamp
Fit