ADR-00022 — Courier Aggregator vs. Direct Per-Courier API Integration

By Engineering Team•October 2, 2026•6 min read
  • Status: Approved / Implemented
  • Date: 2026-10-02
  • Authors: Engineering Team

Context

A new marketplace needs to deliver orders nationwide from its very first sale, with no shipment-volume history to negotiate on and no ability to predict which regions its early customers will actually be in. Two fundamentally different ways to get that delivery capability were evaluated: integrate directly with one or more individual courier companies’ own APIs (negotiating a contract and rate card per courier), or integrate once with a multi-courier aggregator that already has negotiated rates and routing across many couriers. The two paths differ in who negotiates volume-based rates, who builds pincode-level routing logic, and who owns the engineering cost of tracking, non-delivery handling, and cash-on-delivery reconciliation.


Decision Drivers (FRs & NFRs)

See SR-011 for the full requirement list.

  • BR-01 / BR-02 (BRD-010): nationwide reach from the first order, at a cost that scales with actual volume rather than a fixed upfront commitment.
  • BR-03 (BRD-010): the most cost-effective delivery option must be selected automatically per destination, since no single courier serves every region equally well.
  • BR-06 (BRD-010): the business must be able to move toward a more customized, negotiated arrangement later without discarding what was built to get started.
  • FR-01 / FR-02 (SR-011): cached, multi-tier serviceability lookup returning a primary courier plus ordered fallbacks per destination.
  • NFR-01 (SR-011): each third-party provider endpoint is wrapped by its own repository method, so the integration is not locked to one provider’s specific call shape.

Options Evaluated

Option 1 — Multi-courier aggregator (Shiprocket), single integration (CHOSEN)

Integrate once with an aggregator that already negotiates enterprise-tier rates across 15–20+ individual couriers, and exposes a single API surface for serviceability, order creation, label/invoice generation, pickup scheduling, and delivery tracking.

  • Pros:
    • No minimum-volume requirement to access good rates. A direct courier contract’s best rates are tiered by committed monthly volume — typically 1,000–3,000+ shipments/month before meaningfully favorable pricing kicks in. An aggregator pools shipment volume across all of its sellers and passes on its own negotiated enterprise-tier rate card regardless of how many orders any single seller ships, which directly satisfies BR-02’s “no large upfront commitment” requirement at day one.
    • Destination-aware routing without building it. No single courier covers every pincode equally well — one may be fast and cheap in metro areas but weak in Tier-3 towns or certain regions. An aggregator’s routing already spans 24,000+ pincodes across its courier network and can select the cheapest or most reliable option per destination automatically (BR-03), instead of the platform having to build and maintain that routing logic itself for a growing list of individually-integrated couriers.
    • One integration instead of N. Label generation, webhook-based tracking, non-delivery handling, and cash-on-delivery reconciliation are each a meaningful engineering effort per courier when integrated directly. An aggregator provides one unified API and ready-made workflows for all of this, so the platform’s own shipment-service/provider-auth-service integration work is done once rather than repeated per courier (FR-03 through FR-09, FR-11).
    • Reversible. Nothing about this choice requires a rewrite later — shipment-service’s repository/shiprocket/ and repository/providerauth/ split (NFR-01) wraps the aggregator behind the same per-endpoint repository pattern a direct-courier integration would also need, so a future direct contract composes alongside it rather than replacing it (see Final Decision).
  • Cons & Accepted Trade-offs:
    • Lower per-shipment margin than a high-volume direct contract would eventually offer. An aggregator’s rate card, while enterprise-tier relative to a low-volume seller’s own standalone rate, is still a markup over what a courier would offer a shipper large enough to negotiate directly at scale.
    • Less control over the exact courier used for a given shipment. The aggregator’s routing engine picks the courier per destination; the platform cannot unilaterally force a specific courier relationship the way a direct contract would allow.
    • Cash-on-delivery remittance cycle is the aggregator’s standard cycle (typically D+7 to D+8), not the faster direct-from-courier payout (typically D+2 to D+3) a dedicated courier contract can offer — accepted as a cost of avoiding per-courier integration and reconciliation work at this stage. A faster remittance cycle is available from the aggregator at extra cost but was not adopted for the initial integration.

Option 2 — Direct integration with one or more individual courier APIs

Negotiate a contract directly with one or more couriers (e.g. a major national carrier) and build a dedicated integration against each one’s own API for order creation, tracking, and reconciliation.

  • Pros:
    • Best achievable per-shipment rate at high, committed volume. Once volume in a specific lane is large and predictable, a direct contract can beat an aggregator’s rate card on pure per-shipment cost.
    • Faster cash-on-delivery remittance — typically a direct D+2 to D+3 payout from the courier, versus an aggregator’s standard cycle.
    • Direct commercial relationship with the courier for service-level negotiation on a known lane.
  • Cons (Why Rejected For This Stage):
    • Minimum-volume commitment the business cannot meet yet. A new marketplace with no order history cannot credibly commit to 1,000–3,000+ shipments/month to unlock favorable direct rates — it would either overpay at low tiers or take on a fixed monthly spend unrelated to actual revenue, directly violating BR-02.
    • No single courier serves the whole country well. Launching nationwide (BR-01) with one direct courier means accepting weak coverage or poor service in whatever regions that courier doesn’t serve well — covering the gaps would mean integrating multiple couriers directly from day one, multiplying both the contract-negotiation effort and the engineering cost below.
    • The full engineering surface (label generation, webhook tracking, non-delivery automation, cash-on-delivery reconciliation) must be built and maintained per courier, with no shared workflow across them — a meaningfully larger initial engineering investment than a single aggregator integration, for a business that also doesn’t yet know which couriers it will actually need.
    • Committing early forecloses the aggregator’s pooled-rate advantage without yet having the volume to replace it with a better one.

Final Decision

Option 1 is selected for initial launch. A multi-courier aggregator (Shiprocket) gives the business nationwide reach and enterprise-tier rates from the first order, with no minimum-volume commitment and no per-courier engineering effort — directly satisfying BRD-010’s BR-01 and BR-02. shipment-service’s repository/shiprocket/ and repository/providerauth/ split (NFR-01) deliberately wraps the aggregator behind the same per-endpoint repository shape a direct-courier integration would also need, so this choice does not have to be unwound later — it composes alongside a future direct contract rather than blocking one.

This decision is revisited, not fixed. Once order volume in a specific lane stabilizes at a level that would unlock meaningfully better direct-courier rates (the phased guidance evaluated during this decision used 3,000+ orders/month in a given lane as the point at which a direct contract becomes worth negotiating), the business can pursue a direct contract with that lane’s primary courier for that lane specifically, while continuing to route everything else through the aggregator — satisfying BR-06 without a platform-wide migration.