Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Triplicate Ports API
version: 1.4.0
description: 'Create matching export documents (proforma invoice, commercial invoice, packing list, shipping instruction; also purchase order, sales contract and certificate of origin) from order data. Also: search HS codes and UN/LOCODE port codes, check container numbers, calculate CBM and export prices, check a B/L or AWB draft and read a letter of credit. Free, no key; nothing is stored. The documents endpoint returns a link that opens Triplicate''s generator filled in, where the user reviews and saves the PDF. MCP server with the same tools: https://api.triplicatedocs.com/mcp'
contact:
url: https://triplicatedocs.com/developers/
servers:
- url: https://api.triplicatedocs.com
tags:
- name: Ports
paths:
/api/v1/ports:
post:
operationId: lookupPortCode
summary: UN/LOCODE codes of seaports, airports and inland depots by place name or code
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
query:
type: string
description: Port, city or airport name in English (e.g. 'Haiphong', 'Jebel Ali', 'Busan'), or a 5-character UN/LOCODE (e.g. 'NLRTM')
country:
type: string
description: Optional 2-letter ISO country code to search in, e.g. 'VN'
type:
type: string
enum:
- port
- airport
- inland_depot
description: 'Optional: only seaports, airports or inland container depots'
limit:
type: number
default: 8
required:
- query
responses:
'200':
description: Matching locations
content:
application/json:
schema:
type: object
'400':
description: Error
content:
application/json:
schema:
type: object
properties:
error:
type: string
detail:
type: string
description: Finds UN/LOCODE codes of seaports, airports and inland depots by place name or code, optionally for one country and type.
tags:
- Ports