๐Ÿ“– Looking for karrio's legacy docs? Visit docs.karrio.io

Developer Tools Navigation

Community Edition
Developer Feature

The Developer Tools section provides comprehensive access to APIs, webhooks, logs, and integration resources. Built for developers and technical teams, it offers everything needed to integrate Karrio with your applications and monitor system performance.

Developer Tools Overview

Developer tools dashboard showing API usage statistics and navigation menu

Developer Tools Overview

The developer section is organized into key areas:

API Management

  • Overview: API usage statistics and integration health
  • API Keys: Authentication token management
  • Apps: OAuth applications and integrations (Enterprise)
  • Documentation: Interactive API explorer and reference

Monitoring and Debugging

  • Logs: Request/response monitoring and debugging
  • Events: System event tracking and analysis
  • Webhooks: Real-time notification configuration
  • Performance: API usage metrics and analytics

Integration Resources

  • Playground: Interactive API testing environment
  • GraphiQL: GraphQL query interface
  • Code Examples: Integration samples and SDKs
  • Documentation: Comprehensive API reference

API Overview Dashboard

Integration Health Monitor

The main developer dashboard provides integration insights:

API Usage Statistics

Real-time API usage metrics:

  • Total Requests: Complete request count for selected period
  • API Errors: Error rate and failure analysis
  • Request Volume: Traffic patterns over time
  • Performance Metrics: Response times and throughput

Visual Analytics

  • Usage Charts: Line graphs showing API usage trends
  • Error Tracking: Error rate monitoring over time
  • Peak Analysis: High-traffic period identification
  • Growth Metrics: Integration usage growth patterns

System Information

Key integration details:

API Configuration Details
1{ 2 "api_version": "v1", 3 "rest_endpoint": "https://api.karrio.io", 4 "graphql_endpoint": "https://api.karrio.io/graphql", 5 "authentication": "Token-based", 6 "rate_limits": "1000 requests/minute" 7}

Quick Access Tools

Direct links to common developer tasks:

  • Generate API Key: Create new authentication tokens
  • Test Endpoints: Quick API endpoint testing
  • View Documentation: Access comprehensive API docs
  • Check Logs: Monitor recent API activity
  • Configure Webhooks: Set up event notifications
Tip

Developer Dashboard Benefits

The developer dashboard provides real-time visibility into your integration health, helping you monitor performance, debug issues, and optimize your implementation.

API Keys Management

Token Administration

Manage authentication tokens securely:

Key Generation

  • Create Keys: Generate new API authentication tokens
  • Permission Scopes: Set specific access permissions per key
  • Expiration Dates: Configure key lifecycle management
  • Usage Tracking: Monitor key-specific usage patterns

Security Features

  • Token Rotation: Regular key rotation for security
  • Access Control: Restrict key permissions and scope
  • IP Restrictions: Limit access by IP address
  • Rate Limiting: Control request volume per key

Key Management Interface

API Key Configuration
1{ 2 "key_id": "key_123456789", 3 "name": "Production Integration", 4 "scopes": ["shipments", "tracking", "rates"], 5 "created_at": "2024-01-15T10:30:00Z", 6 "expires_at": "2025-01-15T10:30:00Z", 7 "last_used": "2024-01-20T14:22:33Z", 8 "requests_count": 15420, 9 "rate_limit": "1000/min" 10}

Key Usage Analytics

Monitor API key performance:

Usage Metrics

  • Request Volume: Calls per key over time
  • Error Rates: Failed requests by authentication key
  • Endpoint Usage: Most frequently accessed endpoints
  • Geographic Distribution: Request origin analysis

Security Monitoring

  • Unusual Activity: Detect abnormal usage patterns
  • Failed Authentication: Monitor invalid key usage attempts
  • Rate Limit Violations: Track and alert on limit breaches
  • Access Patterns: Analyze usage timing and frequency

Webhook Configuration

Event Notification Setup

Configure real-time notifications:

Webhook Endpoints

  • Endpoint URLs: Target URLs for webhook delivery
  • Event Selection: Choose which events trigger notifications
  • Security Settings: Configure authentication and verification
  • Delivery Options: Retry policies and failure handling

Supported Events

  • Shipment Events: Label creation, status updates, delivery confirmation
  • Order Events: Order creation, fulfillment, cancellation
  • Tracking Events: Package movement, delivery updates, exceptions
  • System Events: API errors, rate limiting, maintenance notifications

Webhook Configuration

Webhook Configuration Example
1{ 2 "webhook_id": "wh_987654321", 3 "name": "Order Fulfillment Notifications", 4 "url": "https://myapp.com/webhooks/karrio", 5 "events": [ 6 "order.created", 7 "order.fulfilled", 8 "shipment.created", 9 "tracking.updated" 10 ], 11 "secret": "whsec_...", 12 "active": true, 13 "delivery_attempts": 3, 14 "timeout": 30 15}

Event Management

Handle webhook events effectively:

Event Types

  • order.created: New order received
  • order.fulfilled: Order completely fulfilled
  • shipment.created: Shipping label generated
  • shipment.delivered: Package delivered successfully
  • tracking.updated: Tracking status changed
  • payment.processed: Payment completed
  • exception.occurred: System error or warning

Payload Structure

1{ 2 "event": "shipment.created", 3 "timestamp": "2024-01-20T15:30:00Z", 4 "data": { 5 "id": "shp_123456789", 6 "tracking_number": "1Z999AA1234567890", 7 "carrier_name": "ups", 8 "service": "ups_ground", 9 "status": "created", 10 "label_url": "https://api.karrio.io/documents/label_123.pdf", 11 "order_id": "ord_987654321" 12 }, 13 "test": false 14}
Warning

Webhook Security

Always validate webhook signatures to ensure events come from Karrio. Store webhook secrets securely and use HTTPS endpoints for receiving notifications.

API Logs and Monitoring

Request/Response Tracking

Monitor API interactions in detail:

Log Information

  • Request Details: Method, URL, headers, payload
  • Response Data: Status codes, response body, timing
  • Error Information: Detailed error messages and stack traces
  • Metadata: IP addresses, user agents, authentication info

Log Categories

  • Successful Requests: Completed API calls
  • Failed Requests: Errors and exceptions
  • Rate Limited: Requests blocked by rate limiting
  • Authentication Failures: Invalid or expired tokens

Log Interface

API Log Entry Example
1{ 2 "log_id": "log_456789123", 3 "timestamp": "2024-01-20T16:45:22Z", 4 "method": "POST", 5 "endpoint": "/v1/shipments", 6 "status_code": 201, 7 "response_time": 1.2, 8 "api_key": "key_***456789", 9 "request_size": 1024, 10 "response_size": 2048, 11 "user_agent": "MyApp/1.0", 12 "ip_address": "192.168.1.100", 13 "error": null 14}

Performance Analysis

Analyze integration performance:

Performance Metrics

  • Response Times: Average and percentile response times
  • Throughput: Requests per second capacity
  • Error Rates: Percentage of failed requests
  • Endpoint Performance: Performance by specific endpoint

Optimization Insights

  • Slow Endpoints: Identify performance bottlenecks
  • Error Patterns: Common failure modes
  • Usage Patterns: Peak usage times and trends
  • Resource Utilization: API capacity planning

Events and System Monitoring

System Event Tracking

Monitor system-wide events and activities:

Event Categories

  • System Events: API status changes, maintenance windows
  • Integration Events: Third-party service updates, carrier changes
  • Security Events: Authentication failures, suspicious activity
  • Performance Events: Rate limiting triggers, capacity warnings

Event Details

System Event Example
1{ 2 "event_id": "evt_789123456", 3 "type": "system.maintenance", 4 "severity": "info", 5 "timestamp": "2024-01-20T02:00:00Z", 6 "message": "Scheduled maintenance window started", 7 "details": { 8 "maintenance_type": "database_upgrade", 9 "expected_duration": "2 hours", 10 "affected_services": ["api", "webhooks"], 11 "status_page": "https://status.karrio.io" 12 } 13}
  • Event Type Filtering: Focus on specific event categories
  • Date Range Selection: View events within time periods
  • Severity Levels: Filter by importance (info, warning, error)
  • Full Text Search: Search event descriptions and details

Alerting and Notifications

Stay informed about important events:

Alert Configuration

  • Event-based Alerts: Notifications for specific events
  • Threshold Alerts: Warnings when metrics exceed limits
  • Custom Rules: Business-specific alert conditions
  • Multi-channel Delivery: Email, SMS, webhook notifications

Interactive API Testing

API Playground

Test endpoints directly from the dashboard:

Testing Environment

  • Interactive Forms: Fill out API parameters easily
  • Live Testing: Real API calls with actual responses
  • Authentication: Automatic token handling
  • Response Inspection: Detailed response analysis

Request Builder

Example API Request in Playground
1{ 2 "endpoint": "/v1/proxy/rates", 3 "method": "POST", 4 "headers": { 5 "Authorization": "Token your-api-key", 6 "Content-Type": "application/json" 7 }, 8 "body": { 9 "shipper": { 10 "postal_code": "10001", 11 "country_code": "US" 12 }, 13 "recipient": { 14 "postal_code": "90210", 15 "country_code": "US" 16 }, 17 "parcels": [{ 18 "weight": 2.5, 19 "weight_unit": "LB" 20 }] 21 } 22}

GraphQL Interface

Use GraphiQL for GraphQL query testing:

Query Builder

  • Schema Explorer: Browse available queries and mutations
  • Auto-completion: Intelligent query building
  • Query Validation: Real-time syntax checking
  • Result Formatting: Pretty-printed JSON responses

Example GraphQL Query

1query GetShipments($first: Int!, $status: [ShipmentStatusEnum]) { 2 shipments(first: $first, status: $status) { 3 edges { 4 node { 5 id 6 trackingNumber 7 status 8 carrierName 9 service 10 createdAt 11 selectedRate { 12 totalCharge 13 currency 14 } 15 } 16 } 17 pageInfo { 18 hasNextPage 19 endCursor 20 } 21 } 22}

Integration Resources

Code Examples and SDKs

Access implementation resources:

Language Support

  • JavaScript/Node.js: NPM package and examples
  • Python: PyPI package with comprehensive docs
  • PHP: Composer package and Laravel integration
  • Ruby: Gem with Rails integration examples
  • Go: Module with complete implementation guide

Quick Start Examples

JavaScript SDK Example
1import { KarrioClient } from "@karrio/javascript-sdk"; 2 3const karrio = new KarrioClient({ 4 apiKey: "your-api-key", 5 baseUrl: "https://api.karrio.io", 6}); 7 8// Get shipping rates 9const rates = await karrio.rates.get({ 10 shipper: { postal_code: "10001", country_code: "US" }, 11 recipient: { postal_code: "90210", country_code: "US" }, 12 parcels: [{ weight: 2.5, weight_unit: "LB" }], 13}); 14 15// Create shipment 16const shipment = await karrio.shipments.create({ 17 service: "fedex_ground", 18 // ... shipment details 19});

Integration Guides

  • E-commerce Platforms: Shopify, WooCommerce, Magento guides
  • Custom Applications: Step-by-step integration tutorials
  • Webhook Implementation: Event handling best practices
  • Error Handling: Comprehensive error management strategies

Documentation Access

Complete API documentation:

Documentation Sections

  • API Reference: Complete endpoint documentation
  • Schema Definitions: Data models and structures
  • Authentication Guide: Token management and security
  • Rate Limiting: Usage limits and best practices
  • Webhooks: Event types and payload structures
  • Error Codes: Complete error reference

Interactive Documentation

  • Try It Now: Test endpoints directly from docs
  • Code Samples: Multiple language examples
  • Response Schemas: Expected response formats
  • Parameter Validation: Input requirements and constraints

Troubleshooting and Support

Common Developer Issues

Authentication Problems

  • Invalid API Keys: Verify key validity and permissions
  • Expired Tokens: Check key expiration dates
  • Permission Errors: Verify scope settings
  • Rate Limiting: Monitor usage against limits

Integration Issues

  • Webhook Failures: Check endpoint accessibility and response codes
  • Data Format Errors: Validate request/response schemas
  • Timeout Issues: Optimize request size and complexity
  • Network Problems: Verify connectivity and DNS resolution

Debug Tools

Built-in debugging assistance:

Request Inspection

  • Raw Request/Response: Complete HTTP transaction details
  • Header Analysis: Authentication and content-type verification
  • Payload Validation: Schema compliance checking
  • Error Diagnostics: Detailed error explanation and solutions

Performance Optimization

  • Request Timing: Identify slow operations
  • Payload Size Analysis: Optimize data transmission
  • Endpoint Efficiency: Choose optimal API endpoints
  • Batch Processing: Reduce API call overhead
Tip

Developer Best Practices

Use the developer tools regularly to monitor integration health, debug issues proactively, and optimize performance. Set up appropriate alerts and monitoring to catch issues before they impact users.

API Usage Optimization

Performance Best Practices

Optimize integration performance:

Request Optimization

  • Batch Requests: Combine multiple operations
  • Caching: Cache frequently accessed data
  • Pagination: Handle large result sets efficiently
  • Compression: Use gzip for large payloads

Error Handling

  • Retry Logic: Implement exponential backoff
  • Circuit Breakers: Handle service outages gracefully
  • Timeout Management: Set appropriate request timeouts
  • Error Recovery: Graceful degradation strategies

Monitoring and Alerting

  • Usage Tracking: Monitor API consumption patterns
  • Performance Metrics: Track response times and error rates
  • Health Checks: Regular integration testing
  • Capacity Planning: Prepare for traffic growth

Next Steps

Now that you understand the developer tools:

  1. Live vs Test Mode - Use developer tools in both environments
  2. Label Creation - Integrate label creation APIs
  3. Order Management - Automate order processing
  4. Tracker Management - Implement tracking webhooks

Need help? Join our community Discord or contact our support team.