flexport-hello-world

Featured

Create a minimal working Flexport example — list shipments and track containers. Use when starting a new Flexport integration, testing your setup, or learning the Flexport REST API v2 patterns. Trigger: "flexport hello world", "flexport example", "flexport quick start".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Flexport Hello World ## Overview List shipments and retrieve tracking milestones using the Flexport REST API v2. Flexport has no npm SDK -- you call `https://api.flexport.com` directly with bearer token auth and a `Flexport-Version: 2` header. ## Prerequisites - `FLEXPORT_API_KEY` environment variable set - Completed `flexport-install-auth` setup - Node.js 18+ (uses native `fetch`) ## Instructions ### Step 1: List Your Shipments ```typescript // src/flexport/hello.ts const BASE = 'https://api.flexport.com'; const headers = { 'Authorization': `Bearer ${process.env.FLEXPORT_API_KEY}`, 'Flexport-Version': '2', 'Content-Type': 'application/json', }; // List shipments with pagination const res = await fetch(`${BASE}/shipments?per=5&page=1`, { headers }); const { data } = await res.json(); data.records.forEach((shipment: any) => { console.log(`${shipment.id} | ${shipment.status} | ${shipment.freight_type}`); console.log(` Origin: ${shipment.origin_port?.name ?? 'N/A'}`); console.log(` Dest: ${shipment.destination_port?.name ?? 'N/A'}`); }); ``` ### Step 2: Get Shipment Details with Milestones ```typescript // Retrieve a single shipment with tracking milestones const shipmentId = data.records[0].id; const detail = await fetch(`${BASE}/shipments/${shipmentId}`, { headers }).then(r => r.json()); console.log(`\nShipment ${detail.data.id}:`); console.log(` Status: ${detail.data.status}`); console.log(` Cargo ready: ${detail.data.cargo_ready_date}`); conso...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category