flexport-upgrade-migration
Migrate between Flexport API versions (v1 to v2, Logistics API versions). Use when upgrading API version headers, handling deprecated endpoints, or migrating from legacy Flexport API patterns. Trigger: "upgrade flexport", "flexport API version", "flexport migration".
- License 许可
- MIT
- 最近更新
- 2026-07-13
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- flexport-upgrade-migration
- tags
- [ "saas", "logistics", "flexport" ]
- author
- Jeremy Longshore <jeremy@intentsolutions.io>
- license
- MIT
- version
- 1.0.0
- description
- Migrate between Flexport API versions (v1 to v2, Logistics API versions). Use when upgrading API version headers, handling deprecated endpoints, or migrating from legacy Flexport API patterns. Trigger: "upgrade flexport", "flexport API version", "flexport migration".
- allowed-tools
- Read, Write, Edit, Bash(npm:*), Grep
- compatible-with
- claude-code
03 SKILL.md 正文
Flexport Upgrade & Migration
Overview
Guide for migrating between Flexport API versions. The main API uses Flexport-Version header (currently 2). The Logistics API has dated versions (2023-10, 2024-04). Breaking changes are versioned -- old versions remain available during deprecation windows.
Instructions
Step 1: Identify Current API Usage
# Find all Flexport API calls in your codebase
grep -rn "Flexport-Version\|api.flexport.com\|logistics-api.flexport.com" src/ --include="*.ts" --include="*.py"
# Check which version header you're sending
grep -rn "Flexport-Version" src/ --include="*.ts"
Step 2: API v1 to v2 Migration
| Change | v1 | v2 |
|---|---|---|
| Header | Flexport-Version: 1 |
Flexport-Version: 2 |
| Response wrapper | { "_object": "Shipment", ... } |
{ "data": { ... } } |
| Pagination | { "next": "/shipments?page=2" } |
{ "data": { "records": [], "total_count": N } } |
| Error format | { "errors": [...] } |
{ "error": { "code": "...", "message": "..." } } |
| Date format | Mixed | ISO 8601 consistently |
// v1 pattern (deprecated)
const res = await fetch(`${BASE}/shipments`, { headers: { 'Flexport-Version': '1' } });
const { _object, id, status } = await res.json();
// v2 pattern (current)
const res = await fetch(`${BASE}/shipments`, { headers: { 'Flexport-Version': '2' } });
const { data } = await res.json();
data.records.forEach(s => console.log(s.id, s.status));
Step 3: Logistics API Version Migration
// The Logistics API has separate versioned URLs
// Old: https://docs.logistics-api.flexport.com/2023-10/
// New: https://docs.logistics-api.flexport.com/2024-04/
// Check OpenAPI spec for changes
// https://logistics-api.flexport.com/logistics/api/2024-04/documentation/raw
Step 4: Dual-Version Testing
// Run both versions in parallel during migration
async function migrateEndpoint(path: string) {
const [v1Res, v2Res] = await Promise.all([
fetch(`${BASE}${path}`, { headers: { ...auth, 'Flexport-Version': '1' } }),
fetch(`${BASE}${path}`, { headers: { ...auth, 'Flexport-Version': '2' } }),
]);
const v1 = await v1Res.json();
const v2 = await v2Res.json();
// Compare key fields to verify migration correctness
console.log('v1 count:', v1.total || 'N/A');
console.log('v2 count:', v2.data?.total_count || 'N/A');
}
Migration Checklist
- [ ] Update
Flexport-Versionheader to2 - [ ] Update response parsing from
_objecttodata.records - [ ] Update pagination logic for v2 format
- [ ] Update error handling for v2 error format
- [ ] Run test suite against v2 endpoints
- [ ] Deploy to staging and verify
- [ ] Monitor error rates after production deployment
Resources
Next Steps
For CI integration during upgrades, see flexport-ci-integration.
04 同仓库更多 Skills
zustand-store-creator
Create zustand store creator operations. Auto-activating skill for Frontend Development. Triggers on: zustand store creator, zustand store creator Part of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like "zustand store creator", "zustand creator", "zustand".
zero-trust-config-helper
Configure with zero trust config helper operations. Auto-activating skill for Security Advanced. Triggers on: zero trust config helper, zero trust config helper Part of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like "zero trust config helper", "zero helper", "zero".
zapier-integration-helper
Assist with zapier integration helper operations. Auto-activating skill for Business Automation. Triggers on: zapier integration helper, zapier integration helper Part of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like "zapier integration helper", "zapier helper", "zapier".
yaml-config-validator
Validate yaml config validator operations. Auto-activating skill for DevOps Basics. Triggers on: yaml config validator, yaml config validator Part of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like "yaml config validator", "yaml validator", "yaml".
xvary-stock-research
Thesis-driven equity analysis from public SEC EDGAR and market data; /analyze, /score, /compare workflows with bundled Python tools (Claude Code, Cursor, Codex).
xss-vulnerability-scanner
Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals. Triggers on: xss vulnerability scanner, xss vulnerability scanner Part of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like "xss vulnerability scanner", "xss scanner", "xss".