Once a buyer accepts a quote, Anvil promotes it through the trade lifecycle: PI → Commercial Invoice → Packing List → Bill of Lading. Each step inherits the parent document's data so you never re-key SKUs, descriptions, or HS codes.

What It Does
Generates a Commercial Invoice (and matching Packing List) from a parent PI/Quote.Adds the carton-level data your forwarder needs: gross/net weight, dimensions, packing units.Tags every line with HS codes so customs brokers can clear without follow-up.Outputs a PDF that matches the WTO/ICC Commercial Invoice template.When to Use
Generate the Commercial Invoice when payment terms are confirmed (deposit received, LC issued). The Packing List goes out alongside the cargo so the receiving warehouse can match cartons to the manifest.
Setup
Open the parent quote at **Documents > Quotations > [id]**.Click **Promote > Commercial Invoice**.Confirm or override the carton breakdown (Anvil reuses the product's default packaging spec).Click **Generate** — Anvil produces both the CI and the Packing List as a single ZIP.Bulk Generation
For shipments containing 50+ SKUs, use the bulk generator at **Documents > Bulk > Commercial Invoices**:
curl -X POST https://api.anvilhk.com/api/v1/trade-documents/bulk \
-H "Authorization: Bearer $ANVIL_KEY" \
-H "X-Tenant-ID: $TENANT" \
-H "Content-Type: application/json" \
-d '{ "type": "COMMERCIAL_INVOICE", "parentIds": ["pi_01...","pi_02..."] }'
You get back a job ID. Poll GET /api/v1/trade-documents/bulk/:jobId or subscribe to the trade.bulk.completed webhook.
API Endpoints
`POST /api/v1/trade-documents` — type can be `COMMERCIAL_INVOICE` or `PACKING_LIST`.`POST /api/v1/trade-documents/:id/promote` — promote a parent doc to the next lifecycle step.`GET /api/v1/trade-documents/:id/pdf` — download the rendered PDF.`POST /api/v1/trade-documents/bulk` — bulk generate up to 200 docs per call.Pricing & Limits
| Plan | CI/PL pairs / month | Bulk size |
|---|
| Starter | 50 | 10 per call |
| Pro | 500 | 200 per call |
| Enterprise | unlimited | 1,000 per call |
Gotchas
HS codes are inherited from the parent quote. If you change one on the CI, Anvil does NOT propagate the change back to the quote — explicit by design (the quote is locked at acceptance).Packing List weights default to "to be measured at packing" if your product spec is missing weights. Customs may reject the CI in that case — make sure your catalog is complete.The bulk endpoint is rate-limited to 30 calls/hour/tenant under `crawler-trigger` semantics, not the generic 200/min API limit.