.png)
EasyPost Integration Guide
Connect EasyPost shipping, rating, labeling, tracking, and webhook events with enterprise order, fulfillment, and support systems through Martini workflows and APIs.
EasyPost integration options at a glance
EasyPost provides a versioned REST API for Addresses, Parcels, Shipments, Rates, PostageLabels, Trackers, Refunds, customs resources, and Batch shipments. It also delivers documented webhook events for selected shipment, tracking, label, address, and refund updates. Martini can consume these APIs, expose an endpoint for EasyPost callbacks, validate webhook signatures, and orchestrate shipment and reconciliation workflows. API keys use HTTP Basic Authentication with a blank password and should be stored as protected Martini secrets. Batch processing and label URLs support operational workflows, while scheduled polling can supplement webhooks when reconciliation or missed-event recovery is required.
| Integration point | Supported by EasyPost? | Common use cases | How Martini supports it |
|---|---|---|---|
| REST APIs | Yes | Create and retrieve Addresses, Shipments, Parcels, Rates, PostageLabels, Trackers, Refunds, customs resources, and Batch shipments. | Martini can consume EasyPost REST endpoints, map request and response payloads, expose abstraction APIs, and orchestrate multi-step shipping workflows. |
| Webhooks / outbound callbacks | Yes | Receive documented asynchronous events for shipment status, tracking, label, address verification, refund, and other supported object updates. | Martini can expose a REST endpoint or webhook-consuming workflow, validate EasyPost signatures, route events, and record Event IDs for deduplication. |
| Bulk / async / batch APIs | Limited | The EasyPost Batch resource groups shipments for batch-oriented shipping workflows; it is not a universal bulk export interface. | Martini can schedule batch submissions, collect results, persist identifiers, and handle item-level failures or retries. |
| File / attachment APIs | Limited | PostageLabel responses provide label metadata and file URLs in the requested label format. No general-purpose EasyPost attachment repository was confirmed. | Martini can retrieve or relay permitted label outputs and associate label references with orders, warehouse records, or support cases. |
| Authentication | Yes | EasyPost uses API keys with HTTP Basic Authentication; the API key is the username and the password is blank. Webhook signatures should also be verified. | Martini can store test and production keys and webhook secrets in protected secrets or environment configuration and apply them to workflows and APIs. |
| Scheduled synchronization | Yes | Scheduled queries can reconcile active Shipments or Trackers, recover from missed webhook deliveries, and verify unexpected shipment states. | Martini can trigger scheduled workflows, maintain checkpoints or object IDs, compare current state, and route discrepancies for review. |
| SDKs | Limited | EasyPost publishes client libraries, but the core documented integration contract is the REST API. | Martini can call the REST API directly and use custom JVM-compatible logic only where specialized validation or response handling is required. |
How EasyPost exposes data and business events
EasyPost REST APIs
EasyPost’s versioned REST API is the primary integration mechanism for creating shipment data, retrieving Rates, purchasing postage, accessing labels and tracking information, managing refunds, and working with customs and Batch resources.
Martini implementation pattern
Martini implementation pattern: a workflow or Martini API receives an order or fulfillment request, validates and maps it to EasyPost resources, calls the required REST endpoints, applies business rules to the response, and persists EasyPost identifiers and state for later updates.
Implementation sequence
EasyPost Webhooks
EasyPost sends HTTP requests to a customer-controlled endpoint for documented events involving supported objects and lifecycle changes, including relevant Shipment and Tracker updates. Coverage is event- and object-specific rather than universal.
Martini implementation pattern
Martini implementation pattern: expose an API endpoint or webhook-consuming workflow, verify the EasyPost webhook signature, acknowledge valid events promptly, deduplicate using the Event ID, and route supported updates to order, warehouse, support, or notification systems.
Implementation sequence
EasyPost Batch and Labels
The Batch resource groups shipments for batch-oriented shipping workflows, while purchased label information is returned through Shipment and PostageLabel data. These capabilities support operational grouping and label distribution but do not constitute a general file repository or universal bulk API.
Martini implementation pattern
Martini implementation pattern: a scheduled or triggered workflow assembles fulfillment requests, submits suitable groups to EasyPost, collects shipment and label results, and distributes label references while handling item-level errors and preserving correlation IDs.
Implementation sequence
EasyPost Reconciliation
Scheduled reconciliation supplements webhook delivery by querying selected Shipment or Tracker resources and comparing EasyPost state with stored fulfillment state. EasyPost should not be assumed to provide one universal cursor-based synchronization API across all resources.
Martini implementation pattern
Martini implementation pattern: a scheduled workflow reads active shipments, queries current EasyPost state, compares status and identifiers with the internal record, applies missing updates idempotently, and records discrepancies for investigation.
Implementation sequence
Common EasyPost integration patterns
Pattern 1: Create shipments and purchase postage
When to use this pattern
Use this pattern when an order or fulfillment system needs automated shipment creation and label purchasing after an order is released. It centralizes address, parcel, rate-selection, and postage rules in an integration workflow.
Integration direction
Example Mapping
| EasyPost Field | Canonical Field | Target Field |
|---|---|---|
| shipping_address | destinationAddress | Address |
| package.weight | parcelWeight | Parcel.weight |
| package.dimensions | parcelDimensions | Parcel |
| selected_service | serviceLevel | Rate.service |
Martini implementation pattern
Martini receives the fulfillment request, validates address and parcel data, creates or references EasyPost Address and Parcel objects, creates a Shipment, evaluates returned Rates against cost and delivery rules, and purchases the selected postage. It persists the Shipment and PostageLabel IDs and uses bounded retries with business-level idempotency to prevent duplicate labels.
Martini capabilities used
- workflows
- API consumption
- data mapping
- validation
- business rules
- error handling
- secrets management
Pattern 2: Synchronize tracking events
When to use this pattern
Use this pattern when order, support, warehouse, or notification systems must receive near-real-time tracking and shipment status updates from EasyPost.
Integration direction
Example Mapping
| EasyPost Field | Canonical Field | Target Field |
|---|---|---|
| event.id | sourceEventId | integrationEventId |
| result.id | shipmentOrTrackerId | externalShipmentId |
| result.status | trackingStatus | shipmentStatus |
| result.tracking_code | trackingNumber | trackingNumber |
Martini implementation pattern
Martini receives documented EasyPost webhook events, validates the signature, records the Event ID, and routes supported Shipment or Tracker updates. It retrieves current object details when needed, maps statuses to the target model, updates downstream systems idempotently, and sends duplicate or failed events to retry or reconciliation handling.
Martini capabilities used
- API exposure
- webhook consumption
- workflow orchestration
- data mapping
- idempotency
- error handling
Pattern 3: Select rates by business rules
When to use this pattern
Use this pattern when shipping decisions depend on service level, cost threshold, destination, promised delivery date, or other fulfillment rules rather than a fixed carrier option.
Integration direction
Example Mapping
| EasyPost Field | Canonical Field | Target Field |
|---|---|---|
| destination.country | destinationCountry | Shipment.to_address.country |
| delivery_promise | promisedDeliveryDate | Rate.delivery_date |
| maximum_shipping_cost | costThreshold | Rate.rate |
| requested_service_level | serviceLevel | Rate.service |
Martini implementation pattern
Martini submits the shipment details to EasyPost, receives the available Rates, filters and ranks them using configured business rules, and purchases only the selected Rate. The workflow records the decision and prevents a retry after timeout from purchasing another label when an existing Shipment or purchase result is already present.
Martini capabilities used
- workflows
- API consumption
- data transformation
- business rules
- idempotency
- retry handling
Pattern 4: Reconcile active shipments
When to use this pattern
Use this pattern when webhook delivery, downstream processing, or operational changes can leave internal shipment status different from EasyPost. Scheduled reconciliation provides an audit and recovery path.
Integration direction
Example Mapping
| EasyPost Field | Canonical Field | Target Field |
|---|---|---|
| shipment.id | externalShipmentId | NetSuite shipment reference |
| tracker.status | currentTrackingStatus | fulfillment status |
| tracking_code | trackingNumber | carrier tracking number |
| updated_at | lastSourceUpdate | last synchronized timestamp |
Martini implementation pattern
A scheduled Martini workflow selects active shipments from the source system, retrieves current EasyPost Shipment or Tracker state, compares it with stored values, and applies only required updates. It stores correlation details, records exceptions, and escalates shipments that remain inconsistent after bounded retries.
Martini capabilities used
- scheduled workflows
- API consumption
- SQL persistence
- data comparison
- mapping
- monitoring
- error handling
Applications commonly integrated with EasyPost
EasyPost can be integrated with commerce, ERP, customer-service, and operational applications through their available APIs and event mechanisms. Martini can coordinate these flows without requiring a dedicated EasyPost connector, while preserving shipment identifiers, label references, tracking state, and processing history.
| Application | Scenario | Direction | Martini Pattern |
|---|---|---|---|
| Shopify | Create EasyPost shipments and labels after order release, then return tracking numbers and shipment status to Shopify orders. | Shopify → Martini → EasyPost | Receive fulfillment-ready Shopify data, validate addresses and parcel details, map the order into EasyPost Address, Parcel, Shipment, and Rate structures, purchase postage according to business rules, and write tracking and label references back to Shopify. |
| WooCommerce | Automate postage purchasing and synchronize tracking information with WooCommerce orders. | WooCommerce → Martini → EasyPost | Use a Martini API or workflow trigger for fulfillment requests, call EasyPost REST endpoints, persist Shipment and PostageLabel identifiers, and update WooCommerce after successful label purchase or tracking changes. |
| Salesforce | Make shipment status, tracking numbers, and delivery exceptions available to customer and service teams. | EasyPost → Martini → Salesforce | Receive documented EasyPost webhook events, validate signatures, deduplicate by Event ID, map Tracker and Shipment updates to Salesforce objects, and route exceptions for service follow-up. |
| NetSuite | Connect sales orders and item fulfillments with EasyPost label generation and tracking reconciliation. | NetSuite → Martini → EasyPost | Orchestrate fulfillment requests from NetSuite, transform package, address, and customs data for EasyPost, store returned IDs, and reconcile active shipments through webhooks and scheduled API queries. |
| SAP S/4HANA | Use delivery data to create EasyPost shipments and return carrier, label, and tracking information to logistics processes. | SAP S/4HANA → Martini → EasyPost | Consume the available SAP API surface, validate delivery and parcel data, call EasyPost REST operations, and map shipment and tracking results back to the SAP delivery process. |
| ShipStation | Coordinate shipment, label, and tracking data when EasyPost participates in a broader shipping-operations architecture. | ShipStation → Martini → EasyPost | Define system ownership to avoid duplicate shipment creation, then use Martini to transform shipment requests, preserve EasyPost IDs, and synchronize label or tracking state between the two platforms. |
| Zendesk | Expose tracking status and delivery exceptions to customer-support agents. | EasyPost → Martini → Zendesk | Route validated EasyPost Tracker or Shipment events through Martini, apply status and exception rules, and update the relevant Zendesk ticket or customer context with tracking details. |
| ServiceNow | Create operational incidents or fulfillment tasks for delivery exceptions, address problems, or failed label purchases. | EasyPost → Martini → ServiceNow | Use a webhook and reconciliation workflow to identify actionable EasyPost exceptions, enrich them with order context, and create or update ServiceNow records with idempotent processing. |
How to build a EasyPost integration in Martini
Objective
Set up separate EasyPost test and production configurations and protect the API keys and webhook secret.
Instructions in Martini
- Store the EasyPost API key and webhook signing secret in Martini secrets or protected environment configuration.
- Use HTTP Basic Authentication with the API key as the username and a blank password.
- Keep test and production credentials and endpoints isolated.
Objective
Select the workflow entry point that matches the business process, such as an order request, EasyPost event, or scheduled reconciliation.
Instructions in Martini
- Use a Martini API or workflow trigger for outbound shipment requests.
- Expose a controlled Martini endpoint for EasyPost webhook delivery.
- Use a scheduler for reconciliation and batch-oriented processing.
Objective
Receive source order data or retrieve the current EasyPost resource needed for processing.
Instructions in Martini
- Read fulfillment, address, parcel, and customs information from the source system.
- Call EasyPost REST endpoints for Shipments, Rates, Trackers, or related resources.
- Handle pagination for collection responses and retain required cursors or page tokens.
Objective
Coordinate EasyPost calls, event routing, state persistence, and downstream updates as one maintainable integration flow.
Instructions in Martini
- Create or retrieve Addresses, Parcels, Shipments, and other required objects in the correct sequence.
- Route webhook events by event type and related object.
- Persist EasyPost IDs, Event IDs, label references, and processing state.
Objective
Convert source and EasyPost payloads into the canonical and target data models.
Instructions in Martini
- Map addresses, parcel measurements, customs data, rates, labels, and tracking fields.
- Normalize units and formats required by EasyPost.
- Apply validation before sending requests and tolerate additional response fields.
Objective
Make explicit decisions about rate selection, label purchase, exception handling, and duplicate processing.
Instructions in Martini
- Filter Rates by service level, cost, destination, or delivery promise.
- Check for an existing Shipment or purchase result before retrying a non-idempotent operation.
- Treat webhook events as at-least-once messages and use Event IDs for deduplication.
Common EasyPost data objects used in integrations
| Object | Typical Use | Common target systems | Martini handling |
|---|---|---|---|
| Shipment | Represents the shipment request, addresses, parcel, available Rates, purchased postage, and tracking details. | Shopify, WooCommerce, NetSuite, SAP S/4HANA, warehouse systems | Martini maps fulfillment data into a Shipment, stores the EasyPost ID, evaluates Rates, and tracks lifecycle changes from API responses or events. |
| Address | Represents origin, destination, or return address information and related verification results. | Commerce platforms, ERP systems, warehouse systems, customer-service platforms | Martini validates and normalizes address fields before submission and routes verification outcomes according to business rules. |
| Parcel | Describes package weight and dimensions used for rating and postage calculation. | Order management, warehouse management, ERP systems | Martini converts source units and validates required dimensions and weight before creating or updating a Shipment. |
| Rate | Represents a carrier service option with estimated cost and delivery information. | Order management, commerce platforms, fulfillment systems | Martini applies service-level, cost, destination, and promised-date rules before selecting a Rate for postage purchase. |
| PostageLabel | Contains purchased label information, label file URLs or formats, and related shipment references. | Warehouse systems, commerce platforms, order management, customer support | Martini persists label IDs and URLs, relays permitted label outputs, and prevents duplicate purchases during retries. |
| Tracker | Represents tracking information and status updates associated with a shipment. | Shopify, Salesforce, Zendesk, NetSuite, customer notification services | Martini consumes Tracker responses or webhook events, maps statuses to target models, and reconciles active shipments on a schedule. |
Authentication and security considerations
API keys and environments
EasyPost uses API keys with HTTP Basic Authentication. The API key is supplied as the username and the password is blank. Keep test and production keys separate and store them in Martini secrets or protected environment configuration.
Webhook verification
EasyPost webhook signatures should be verified before an event can change shipment, order, or customer data. Do not place API keys or webhook secrets in workflow mappings, request bodies, or logs.
Controlled API exposure
Expose only the Martini endpoints required for EasyPost callbacks and internal fulfillment requests. Apply Martini authentication and authorization to APIs used by upstream and downstream systems.
Operational considerations for EasyPost integrations
Rate limits and retries
Use bounded retries with backoff for transient failures, timeouts, and service-unavailable responses. Do not retry malformed shipment requests without correcting the input.
Pagination and state
Handle paginated EasyPost collections explicitly and retain the required cursor or page token. Store source order IDs, EasyPost object IDs, label IDs, and webhook Event IDs for correlation and idempotency.
Shipment lifecycle
Keep Rate selection separate from postage purchase. Prevent retries from purchasing multiple labels, and preserve carrier, service, tracking, and label-format information.
Reconciliation and testing
Use scheduled reconciliation for important shipments because webhook delivery and downstream processing can fail independently. Test successful and failed API responses, address verification, customs data, label purchase, signature validation, and unexpected schema fields.
Why use Martini instead of scripts or point-to-point integrations?
Orchestrate the complete shipping process
Martini coordinates source orders, EasyPost API calls, rate-selection rules, label handling, webhook processing, and downstream updates in maintainable workflows rather than scattering logic across scripts.
Separate integration concerns
Mappings, validation, authentication, retries, idempotency, and reconciliation can be managed as reusable integration behavior while EasyPost remains the system of record for its shipping resources.
Support multiple operating modes
Martini can combine real-time webhook processing with API-led requests, scheduled reconciliation, and batch-oriented workflows. This provides a controlled recovery path when asynchronous delivery or downstream systems are unavailable.
Expose stable internal APIs
Martini can expose APIs that abstract EasyPost-specific request and response structures from commerce, ERP, warehouse, and support applications, reducing point-to-point coupling.
Frequently asked questions
EasyPost integrates primarily through its versioned REST API for Addresses, Parcels, Shipments, Rates, PostageLabels, Trackers, refunds, customs resources, and Batch shipments. It also supports documented webhook events for selected shipment, tracking, label, address, and refund updates. Enterprise systems can use these mechanisms for shipment creation, label purchasing, tracking synchronization, and reconciliation.
Yes. Martini can consume the EasyPost REST API, expose an API endpoint for EasyPost webhook delivery, validate webhook signatures, orchestrate shipment and rate workflows, map data between systems, and run scheduled reconciliation processes. No native Martini EasyPost connector is documented in the supplied sources.
No. A dedicated EasyPost connector is not required. Martini can integrate using EasyPost’s native REST API, documented webhook events, API-key authentication, Batch resource, and label outputs, with workflows and APIs handling orchestration and transformation.
Lonti does not charge an additional per-connector or per-vendor fee to integrate EasyPost. The integration is subject to the provisioned capacity of the Martini environment. Separate costs may apply from EasyPost, cloud infrastructure, or other third-party systems depending on subscription, usage, and deployment model.
Use the EasyPost REST API as the primary mechanism for shipment creation, rate retrieval, postage purchase, tracking queries, refunds, and customs processing. Use documented webhooks for near-real-time updates, Batch for suitable grouped shipment workflows, and scheduled API reconciliation when webhook delivery or downstream processing needs verification.
Yes, EasyPost can send documented webhook events for supported object and lifecycle changes, including relevant Shipment and Tracker updates. Coverage is not universal for every platform action, so Martini should validate signatures, deduplicate Event IDs, process supported event types, and supplement important flows with scheduled reconciliation.
Martini maps source order, address, parcel, and customs models into EasyPost resources, then transforms Shipment, Rate, PostageLabel, Tracker, and event responses for downstream systems. Synchronization can be event-driven through webhooks, scheduled through resource queries, or combined so reconciliation corrects missed or delayed updates.
Martini can distinguish validation failures from transient HTTP, timeout, or service-unavailable errors, apply bounded retries with backoff, and route unrecoverable issues for review. Webhook Event IDs and source order or Shipment IDs should be persisted to make processing idempotent and prevent duplicate shipment creation or label purchases.
Related Martini documentation
Workflows
Connect EasyPost with Martini
Use Martini to build governed EasyPost integrations for shipment creation, rate selection, label distribution, tracking updates, and reconciliation across your enterprise systems.