Trade Documents API
Manage Quotes, PIs, Commercial Invoices, Packing Lists, and Sales Contracts.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | `/api/v1/trade-documents` | List |
| POST | `/api/v1/trade-documents` | Create |
| GET | `/api/v1/trade-documents/:id` | Get |
| PATCH | `/api/v1/trade-documents/:id` | Update (only DRAFT) |
| DELETE | `/api/v1/trade-documents/:id` | Delete (only DRAFT) |
| GET | `/api/v1/trade-documents/:id/pdf` | Download rendered PDF |
| POST | `/api/v1/trade-documents/:id/send` | Email + lock revision |
| POST | `/api/v1/trade-documents/:id/promote` | Promote to next lifecycle stage |
| POST | `/api/v1/trade-documents/bulk` | Bulk generate (up to 200) |
| GET | `/api/v1/trade-documents/bulk/:jobId` | Poll bulk job |
AI Draft
| Method | Path | Description |
|---|---|---|
| POST | `/api/v1/trade-documents/ai-draft-quote` | Stateless AI draft |
Lifecycle
DRAFT → SENT → VIEWED → ACCEPTED → PROMOTED → .... Each transition emits a webhook.
Every response uses the standard envelope:
{
"success": true,
"data": { /* resource or array */ },
"meta": { "total": 100, "cursor": "...", "hasMore": true },
"error": { "code": "ERROR_CODE", "message": "Human readable" }
}error is omitted on success; meta is omitted when not paginating.
Rate Limits
Subject to the standard 200 req/min/tenant authenticated limit. See [Rate Limits](/docs/api-reference/rate-limits) for full details and the per-endpoint overrides.