Build on the record
A REST API and signed webhooks over the same voyages, vessels and invoices your team works on.

REST API
- Tokens are self-service under Administration, API Tokens, and carry your own permissions
- Locations, parties, vessels and products: create, read, update, delete
- Voyages: list, create, read, update
- Financial items and invoices: list and read
- Lists take
q,limit,offset,sortandfields
curl https://api.directport.be/v1/voyages?limit=20&sort=-updated_at \
-H "Authorization: Bearer $DIRECTPORT_TOKEN"
Webhooks
- Voyage activated, cancelled, completed
- Stop arrived, departed, ETA changed, ETD changed
- Signed with HMAC-SHA256 over the timestamp and body
- Answer with a 2xx within 10 seconds. One retry follows after 2 seconds with the same
event_id
import { createHmac, timingSafeEqual } from 'node:crypto'
// X-DirectPort-Signature: sha256=<hex>
export function verify(secret, timestamp, body, header) {
const digest = createHmac('sha256', secret)
.update(`${timestamp}.${body}`)
.digest('hex')
const expected = Buffer.from(`sha256=${digest}`)
const given = Buffer.from(header)
return expected.length === given.length && timingSafeEqual(expected, given)
}
See it on your own voyages
