flexport-cost-tuning

Featured

Optimize Flexport API usage costs through efficient pagination, caching, webhook-driven updates, and monitoring API call volume. Trigger: "flexport costs", "flexport API usage", "reduce flexport calls", "flexport billing".

AI & Automation 2,266 stars 315 forks Updated today 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 Cost Tuning ## Overview Reduce Flexport API costs by minimizing unnecessary calls. Key strategies: use webhooks instead of polling, cache aggressively, maximize page sizes, and batch operations. ## Instructions ### Strategy 1: Webhooks Over Polling ```typescript // BAD: Polling every 5 minutes (288 API calls/day per shipment) setInterval(async () => { const shipment = await flexport(`/shipments/${id}`); if (shipment.data.status !== lastStatus) updateDB(shipment); }, 5 * 60 * 1000); // GOOD: Webhook-driven (0 API calls — Flexport pushes updates) app.post('/webhooks/flexport', (req, res) => { const event = req.body; if (event.type === 'shipment.milestone') { updateDB(event.data); // Only processes real changes } res.sendStatus(200); }); // Savings: 100 shipments * 288 calls/day = 28,800 calls/day eliminated ``` ### Strategy 2: Maximize Page Size ```typescript // BAD: Default pagination (per=25) // 1000 shipments = 40 API calls // GOOD: Max pagination (per=100) // 1000 shipments = 10 API calls (75% reduction) const shipments = await flexport('/shipments?per=100&page=1'); ``` ### Strategy 3: Cache with Smart TTLs | Data Type | Change Frequency | Cache TTL | Impact | |-----------|-----------------|-----------|--------| | Products | Rarely | 1 hour | ~95% fewer calls | | Shipment list | Every few hours | 5 minutes | ~90% fewer calls | | Shipment detail | On milestones | Until webhook | ~99% fewer calls | | Purchase orders | Daily | 15 minutes ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

flexport-performance-tuning

Optimize Flexport API performance with pagination tuning, response caching, parallel requests, and connection pooling for logistics data. Trigger: "flexport performance", "flexport slow API", "flexport caching", "optimize flexport".

2,266 Updated today
jeremylongshore
AI & Automation Featured

flexport-rate-limits

Handle Flexport API rate limits with exponential backoff, queue-based throttling, and response header monitoring for logistics API calls. Trigger: "flexport rate limit", "flexport 429", "flexport throttling", "flexport backoff".

2,266 Updated today
jeremylongshore
AI & Automation Featured

appfolio-cost-tuning

Optimize AppFolio API costs through efficient usage patterns. Trigger: "appfolio cost".

2,266 Updated today
jeremylongshore
AI & Automation Featured

salesloft-cost-tuning

Optimize SalesLoft API costs by reducing request volume and deep pagination. Use when analyzing API usage, reducing rate limit consumption, or planning capacity for bulk operations. Trigger: "salesloft cost", "salesloft billing", "reduce salesloft API usage".

2,266 Updated today
jeremylongshore
AI & Automation Featured

maintainx-cost-tuning

Optimize MaintainX API usage for cost efficiency. Use when managing API costs, optimizing request volume, or implementing cost-effective integration patterns with MaintainX. Trigger with phrases like "maintainx cost", "maintainx billing", "reduce maintainx usage", "maintainx api costs", "maintainx optimization".

2,266 Updated today
jeremylongshore