What you can do today
Create a workspace token in Settings → API access. Read quotes, customers and the product catalog, create quotes, export CSV, and subscribe to quote.accepted webhooks in Settings → Webhooks.
Quickstart
Create a token in the app: Settings → API access → Create token. The plaintext token starts with ta_live_ and is shown once. Store it on your server, never in a public page.
export TA_TOKEN="ta_live_..."
export WORKSPACE_ID="00000000-0000-0000-0000-000000000000"
curl -s "https://tradeabacus.com/api/v1/workspaces/$WORKSPACE_ID/quotes?page=1&page_size=20" \
-H "Authorization: Bearer $TA_TOKEN"
Create a quote with the same engine the web app uses:
curl -s -X POST "https://tradeabacus.com/api/v1/workspaces/$WORKSPACE_ID/quotes" \
-H "Authorization: Bearer $TA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"customer_name": "Acme Trading LLC",
"product_name": "Bluetooth Speaker SP-100",
"items": [{
"product_name": "Bluetooth Speaker SP-100",
"model": "SP-100",
"hs_code": "851822",
"unit": "pcs",
"quantity": 500,
"unit_cost_cny": 68,
"packaging_cost_cny_per_unit": 4
}],
"input": {
"quantity": 500,
"unit_cost_cny": 68,
"fx_rate": 7.2,
"currency": "USD",
"packaging_cost_cny_per_unit": 4,
"ocean_freight_cny": 2600,
"insurance_rate": 0.003,
"target_margin_rate": 0.18,
"incoterm": "CIF"
}
}'
Export the full workspace as CSV for a spreadsheet or warehouse job:
curl -s -OJ "https://tradeabacus.com/api/v1/workspaces/$WORKSPACE_ID/export/quotes.csv" \
-H "Authorization: Bearer $TA_TOKEN"
Main endpoints
| Method & path | Purpose |
|---|---|
GET /workspaces/{id}/quotes | List quotes with filters and pagination |
POST /workspaces/{id}/quotes | Create a quote from cost inputs |
GET /workspaces/{id}/quotes/{quote_id} | Read one quote with terms and items |
POST /workspaces/{id}/quotes/{quote_id}/share | Create the buyer's read-only link |
GET /workspaces/{id}/customers | List or search the customer book |
GET /workspaces/{id}/catalog | List products and HS codes |
GET /workspaces/{id}/export/quotes.csv | Export every quote as CSV |
POST /workspaces/{id}/webhooks | Subscribe an endpoint to events |
Full schema: /api/openapi.json. All workspace endpoints require Authorization: Bearer ta_live_... or a normal signed-in session.
Webhooks
Add an endpoint in Settings → Webhooks. Only https endpoints on public addresses are accepted; private and loopback addresses are rejected to prevent SSRF. Every delivery is signed and logged.
Event: quote.accepted
Fires once, the first time a buyer accepts a shared quote. Repeated accepts do not send duplicates.
{
"event": "quote.accepted",
"created_at": "2026-11-16T09:30:00+00:00",
"data": {
"quote_id": "6a0c...",
"quote_no": "Q-202611-0001",
"customer_name": "Acme Trading LLC",
"product_name": "Bluetooth Speaker SP-100",
"quantity": 500,
"currency": "USD",
"incoterm": "CIF",
"unit_price": 12.34,
"total_price": 6170.0,
"valid_until": "2026-12-01",
"accepted_at": "2026-11-16T09:30:00+00:00",
"accepted_by": "John Smith",
"customer_note": "Please ship in December."
}
}
Headers
X-TradeAbacus-Event: quote.acceptedX-TradeAbacus-Timestamp: 1763285400X-TradeAbacus-Signature: t=1763285400,v1=<hex>X-TradeAbacus-Delivery: <endpoint id>
Deliveries retry up to three times (immediately, after 2 seconds, after 5 seconds) with a 6-second timeout. Any 2xx response counts as success. The last status and the last 20 deliveries are visible in Settings.
Verify the signature (Python)
import hashlib, hmac, time
def verify(secret: str, header: str, body: bytes, tolerance: int = 300) -> bool:
parts = dict(part.split("=", 1) for part in header.split(","))
timestamp = int(parts["t"])
if abs(time.time() - timestamp) > tolerance:
return False
expected = hmac.new(
secret.encode(),
f"{timestamp}.".encode() + body,
hashlib.sha256,
).hexdigest()
return hmac.compare_digest(expected, parts["v1"])
Verify the signature (Node.js)
const crypto = require("crypto");
function verify(secret, header, body) {
const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
const expected = crypto
.createHmac("sha256", secret)
.update(`${parts.t}.`)
.update(body)
.digest("hex");
return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1));
}
Where TradeAbacus fits in an agent workflow
The useful split is: the agent handles language and orchestration; TradeAbacus handles arithmetic, documents and the audit trail.
| Stage | Who does it | TradeAbacus role |
|---|---|---|
| Inquiry intake | Email / WhatsApp / agent extracts product, quantity, destination | Stores the customer and quote record |
| Cost and Incoterm pricing | Agent collects costs; human confirms FX, freight and rebate | Calculates FOB / CFR / CIF / DDP, margin and profit deterministically |
| Approval | Sales manager reviews | Approval workflow, version history, audit log |
| Documents | Anyone | PI / CI / packing list from the same dataset |
| Buyer acceptance | Buyer clicks the link | Records acceptance and sends quote.accepted |
| Downstream | CRM, ERP, fulfillment | Webhook or CSV export triggers the next system |
Example: inquiry to accepted quote
- An email-parsing agent extracts the buyer, product, quantity and destination.
- It calls
POST /quoteswith the cost inputs and a target margin. - A human approves the DDP price in the workspace.
- The agent or the salesperson sends the share link.
- The buyer accepts; your endpoint receives
quote.acceptedand creates an order in the ERP.
What TradeAbacus is not
- It is not a language model and does not guess costs, duty rates or HS codes.
- It does not track shipments, book freight or process payments.
- API tokens are workspace-scoped and cannot change passwords or email addresses.
- An MCP server is not available yet; agents should call the REST API today.
Build against a real workspace
14-day Pro trial, no card. Create a token and run the quickstart in a few minutes.