Analyze Regulatory Documents
Create a draft document request by analyzing a shipment or commercial invoice.
/regulatory-documents/analyze
POST https://api.terminal.africa/v1/regulatory-documents/analyze
Matches line items to required regulatory documents by HS code and destination country. Returns a draft request with available_documents priced in the user's wallet currency.
Provide either shipment_id or file_url — not both.
Headers
Authorization*
String
Set value to Bearer SECRET_KEY
Content-Type*
String
Set value to application/json
Request Body
shipment_id
String
Terminal shipment id. e.g. SH-ABC123. Use for shipment-sourced requests.
file_url
String
Public URL of a commercial invoice PDF. Use for invoice-sourced requests.
currency
String
Optional 3-letter currency override for document pricing. Defaults to the user's wallet currency.
Analyze from shipment
{
"shipment_id": "SH-ABC1234567"
}Analyze from invoice
{
"file_url": "https://cdn.example.com/invoices/commercial-invoice-001.pdf"
}Draft with missing HS codes
Analyze does not fail when items are missing HS codes. The request is still returned as draft with validation.ok: false:
Fix items via Update Document Request Items, then purchase.
Common errors
400
Shipment delivery address country is required
400
Failed to parse commercial invoice
403
You are not authorized to analyze this shipment
404
Shipment not found for id - {shipment_id}
Last updated
Was this helpful?