REST API Basics

Foundational REST concepts as they apply to carrier integrations.

REST (Representational State Transfer) uses HTTP methods on resources: - Resources are identified by URLs (/v1/shipments/123) - Methods indicate the action (GET, POST, PUT, DELETE) - Status codes indicate the result (2xx success, 4xx client error, 5xx server error) - Content negotiation via Accept and Content-Type headers Carrier REST APIs vary widely in adherence to REST principles. Some use POST for everything, return 200 for errors, or nest resources inconsistently. Adapt to each carrier's actual behavior, not the REST ideal.