canonical: https://jentic.com/apis/just-trade.co.uk/just-trade

# Just Trade

The Just Trade API creates export shipment transactions and generates the trade documents that go with them. A transaction can be a standard export, a CMR road consignment, a dangerous goods note (DGN), or an IATA dangerous goods declaration, each carrying a document_type and its data, and invoice items can be allocated into pallets as packings. From a transaction it generates documents such as proforma and commercial invoices, packing lists, CMR notes, EUR1 certificates, cargo labels, delivery notes, and certificates of shipment. Reusable dangerous goods templates hold UN numbers, hazard class, subsidiary risk, and packing group, and custom transaction statuses track each shipment's progress.

## For AI agents

Create export, CMR, DGN, and IATA dangerous goods transactions, allocate items to pallets, and generate trade documents such as commercial invoices, packing lists, CMR notes, and EUR1 certificates. Includes dangerous goods templates and custom statuses.

## Scope

Does not handle carrier booking, label purchase, or customs duty calculation. Use for creating export transactions and generating their trade documents only.

## Capabilities

- Create a standard export, CMR, DGN, or IATA DGN transaction with a transaction_ref, document_type, and data block
- Allocate a transaction's invoice items into pallets with the packings operation
- Generate a transaction's trade documents, such as a commercial_invoice, packing list, cmr, eur1, cargo_label, or certificate_of_shipment
- Save dangerous goods templates with un_no, class, subsidiary_risk, and packing_group for reuse across DGN declarations
- Define custom transaction statuses and move a transaction to a status_id with an assignee_id on update
- List transactions with keyword and date range and read one transaction by id

## Use cases

### Agent-Prepared Export Paperwork via Jentic

An AI agent at a freight forwarder creates a standard export transaction from an order's details, allocates the items into pallets, and generates the commercial invoice, packing list, and certificate of shipment in one call. Through Jentic the agent discovers each operation by intent and calls it with the session token your own instance holds, so a coordinator reviews finished documents instead of typing them.

Example prompt: Create a standard export transaction with transaction_ref 'EXP-2026-118' and document_type 'invoice', allocate its items into two pallets, then generate the commercial_invoice and packing documents

### Dangerous Goods Declarations

Shippers of hazardous cargo keep a dangerous goods template per product with its un_no, class, subsidiary_risk, packing_group, and IATA description, then create a DGN or IATA DGN transaction that uses it. Reusing the template keeps the hazard details identical on every declaration.

Example prompt: Create a dangerous goods template with un_no '1263', class '3', and packing_group 'III', then create an IATA DGN transaction for the shipment and generate its documents

### Road Freight CMR Notes

Hauliers and exporters moving goods by road create a CMR transaction with the consignment data and generate the CMR document alongside the invoice and delivery note. Custom statuses such as loaded, in transit, and delivered track each consignment.

Example prompt: Create a CMR transaction for a road shipment, generate its cmr and delivery_note documents, and update it to the 'In transit' custom status

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/api/login` | Log in and get a JWT |
| POST | `/api/transaction/standard` | Create a standard export transaction |
| POST | `/api/transaction/cmr` | Create a CMR transaction |
| POST | `/api/transaction/dgn` | Create a DGN transaction |
| POST | `/api/transaction/{transactionId}/packings` | Allocate items into pallets |
| POST | `/api/documents/generate` | Generate transaction documents |
| GET | `/api/transaction/{transactionId}` | Get a transaction by id |
| POST | `/api/templates/dg` | Create a dangerous goods template |

## Key resources

- **Transactions** — Standard export, CMR, DGN, and IATA DGN shipments with their data and packings.
- **Documents** — Trade documents generated from a transaction, such as invoices, packing lists, CMR notes, and certificates.
- **Dangerous goods templates** — Reusable hazard details for DGN declarations.
- **Transaction statuses** — Custom statuses for tracking shipment progress.

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 63 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 81 / 100
  - Developer Experience & Jentic Compatibility: 68 / 100
  - AI-Readiness & Agent Experience: 41 / 100
  - Agent Usability: 94 / 100
  - Security: 75 / 100
  - AI Discoverability: 60 / 100
- **View full report:** https://jentic.com/apis/just-trade.co.uk/just-trade/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring Just Trade by hand means logging in with email and password to obtain a JWT, sending it as a bearer token, and learning a separate request shape for each transaction type and document flag. Through Jentic you install once, import Just Trade from the API Directory, store the credential once, and your agent calls it.
- **Permission scoping:** Just Trade puts the transaction id and template id in the URL path (`/api/transaction/{transactionId}`, `/api/templates/dg/{templateId}`), so a rule can pin your agent to one shipment or template and the operations you pick. You choose the operations it may call, so destructive ones like deleting a transaction or a dangerous goods template are not included unless you add them.
- **Credential handling:** Your Just Trade credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'generate a commercial invoice' or 'create a CMR consignment', and Jentic returns the matching Just Trade operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **ShipEngine API** — ShipEngine buys carrier labels and tracks parcels; Just Trade produces the export and customs paperwork.
- **Easyship API** — Easyship handles cross-border parcel shipping with rates and duties; Just Trade focuses on freight trade documents.
- **AvaTax API** — Avalara calculates tax that may appear on trade invoices.
- **UN Comtrade** — UN Comtrade reports international trade statistics by commodity and country.

## FAQ

### What authentication does the Just Trade API use?

The Just Trade API authenticates with a JWT bearer token in the Authorization header, per its OpenAPI spec. You obtain the token from POST `/api/login` with your email and password; registration, email verification, and password reset are separate operations under /api. Through Jentic the token is stored encrypted by your own Jentic One instance and injected at call time.

### Is there a Just Trade MCP server?

You don't need an MCP server to give your agent Just Trade. Jentic connects it directly from the API Directory: import it, store your credential once, and your agent creates transactions and generates documents as it needs to. Operations are discovered on demand, so no extra server's tool definitions sit in your agent's context.

### Can I limit what my agent is allowed to do with the Just Trade API?

Yes. For example, write a rule that allows only the transaction read, document list, and document generate operations, so a paperwork agent can produce invoices and packing lists for existing shipments but cannot create, change, or delete transactions. Because the transaction id sits in the path, a rule on `/api/transaction/{transactionId}` can also hold an agent to one shipment, and every call is logged.

### Which documents can the Just Trade API generate?

Per its OpenAPI spec, the document generation operation takes a transaction id and flags for each document wanted, including proforma_invoice, commercial_invoice, packing, cmr, eur1, cargo_label, delivery_note, certificate_of_shipment, quotation, and purchase_order, among others.

### What are the rate limits for the Just Trade API?

The Just Trade OpenAPI spec does not specify rate limits. Check with Just Trade at https://just-trade.co.uk for current limits.

### How do I generate export documents with the Just Trade API through Jentic?

Search Jentic for an intent like 'generate a commercial invoice for an export', import Just Trade from the API Directory, and store your login once. Your agent then creates the shipment with POST `/api/transaction/standard` and calls POST `/api/documents/generate` with the transaction id and the documents it needs. To run it on your own infrastructure, install Jentic One from its GitHub repo.
