Documentation

Everything you need to integrate Triangle into your application.

API Quickstart

Make your first API call in under a minute.

1

Get your API key

Create a key in the Developer Portal. Start with a test key for development.

2

Make a request

All requests require the Authorization header with your API key.

curl -X POST https://triangle-trade-intel.site/api/v1/classify \ -H "Authorization: Bearer tri_live_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"description": "steel automotive brake rotors"}'
3

Handle the response

Successful responses return JSON with the result. Errors include a message and error code.

Widget Setup

Embed tariff intelligence directly in your website. No backend required.

Basic Integration

Add the container div and script tag. The widget initializes automatically.

<!-- 1. Add the container --> <div data-triangle-tariff data-api-key="tri_live_YOUR_KEY" data-theme="light" ></div> <!-- 2. Load the script --> <script src="https://triangle-trade-intel.site/widgets/tariff-calculator.js"></script>

Available Widgets

WidgetScriptCredits
Tariff Lookuptariff-calculator.js0.1
Component Lookupcomponent-lookup.js2.5
USMCA Checkqualification-check.js2.5
Mexico ROImexico-roi.js3.5
Semantic Searchsemantic-search.js0.5
Audit Exportaudit-export.js0

Configuration Options

AttributeDescription
data-api-keyYour API key (required)
data-theme"light" or "dark" (default: light)
data-powered-byShow Triangle branding (default: true)

Authentication

Understanding API keys and rate limits.

Key Types

Test Key TEST

For development. Limited to 500 credits/month, 100 calls/day.

tri_test_...

Live Key LIVE

For production. Real data, credits consumed per request.

tri_live_...

Rate Limits

100 requests/minute per API key. Exceeding this returns a 429 status code. Contact us for higher limits.

Error Handling

All errors return a JSON object with error and message fields.

StatusMeaning
401Invalid or missing API key
403Key doesn't have access to this endpoint
429Rate limit exceeded
500Server error - retry with backoff