While Camtom's built-in reporting covers most standard use cases, organizations with complex supply chains often need custom analytics that combine trade data with internal business metrics. The Camtom REST API provides programmatic access to all your import and export data, enabling you to build custom dashboards, automated reports, and data pipelines that integrate with your existing business intelligence tools.
All API requests require authentication using an API key. Generate your API key from the Camtom dashboard under Settings > API Keys. Each key can be scoped to specific permissions: read-only for reporting, or read-write for operations that modify data.
API keys should be treated as secrets. Store them in environment variables or a secrets manager, never in your source code. Rotate keys periodically and revoke any compromised keys immediately from the dashboard.
The Camtom API organizes trade data around three core entities: entries (the customs entry or pedimento), line items (individual products within an entry), and documents (supporting files like invoices and certificates). Each entity has relationships to others and can be queried independently or joined in a single request.
The entries endpoint supports filtering by date range, port of entry, importer, HTS code, and entry status. For large datasets, use pagination with cursor-based navigation. The API returns JSON responses with consistent field naming and ISO 8601 date formats.
The API includes an aggregation endpoint that performs server-side calculations, reducing the amount of data you need to transfer and process. You can group by any field and apply sum, average, count, min, and max functions to numeric fields.
With the aggregated data in hand, format the output for your stakeholders. Common output formats include JSON for dashboards, CSV for spreadsheet analysis, and PDF for formal reports. The API can generate CSV and PDF directly using the Accept header, or you can process the JSON response in your own application.
For reports that run on a schedule, use the aggregation endpoint instead of fetching all entries and computing locally. Server-side aggregation is 10 to 50 times faster for large datasets and significantly reduces network bandwidth usage.
Set up a scheduled job (cron, cloud function, or workflow automation tool) to call the API, generate the report, and distribute it to stakeholders. Camtom also supports webhooks that can trigger your report pipeline whenever new entries are filed, enabling near-real-time reporting.
A common custom report aggregates duties paid by HTS chapter, compares them month-over-month, and identifies the top 10 products by duty amount. This report helps trade compliance teams spot unusual duty spikes that might indicate classification errors or tariff changes, and helps finance teams forecast future duty obligations.
If you need assistance designing your custom report architecture, the Camtom technical team offers implementation consulting. Contact api-support@camtom.com for guidance.
Camtom Team
Editorial Team
Mas de 100 agencias ya usan Camtom para optimizar sus procesos.