For the complete documentation index, see llms.txt. This page is also available as Markdown.

Regulatory Documents

Regulatory documents are customs and compliance forms required for international shipments (FDA Prior Notice, Fish & Wildlife, Textile declarations, etc.). The API supports two flows:

Base URL: https://api.terminal.africa/v1/regulatory-documents

  1. Shipment flow: analyze from an existing Terminal shipment (source: shipment).

  2. Invoice flow: analyze from an uploaded commercial invoice URL (source: invoice).

Typical workflow

  1. Analyze: POST /analyze with shipment_id or file_url. Returns a draft request_id, matched available_documents, and line items.

  2. Edit draft: update items, addresses, shipping (invoice only), and per-form regulatory profiles.

  3. Purchase: POST /purchase with request_id and document_types. Charges the user's wallet and starts document generation.

  4. Poll: GET /request/:request_id until status is completed or failed. Retry failed automated docs if needed.

Authentication

All endpoints require authentication except Generate Regulatory Document PDF.

Header
Type
Description

Authorization*

String

Set value to Bearer SECRET_KEY

Content-Type*

String

Set value to application/json (for POST/PUT bodies)

Document request statuses

Status
Description

draft

Analyzed, not yet purchased. Editable.

purchasing

Purchase in progress (transient).

processing

Purchased; generation in progress.

completed

All purchased documents generated.

failed

Analyze or generation failed.

Supported document types (slug)

AMS, CUSTOMS, FDA, DROP-BALL, FISH-WILDLIFE, FOOTWEAR, FUMIGATION, LITHIUM-BATTERY, MSDS, MUSEUM, OTHER, QUARANTINE, STEEL, TEXTILE, WATCH

Pricing

  • Amounts are converted into the user's wallet currency at analyze time.

  • Purchase charges the amounts already stored on the draft (available_documents).

Last updated

Was this helpful?