npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jytextiles/medusa-plugin-dtdc-shipping

v0.3.0

Published

Medusa v2 plugin for DTDC shipping integration — pincode check, order booking, label generation, cancellation, and tracking.

Readme

@jytextiles/medusa-plugin-dtdc-shipping

A Medusa v2 fulfillment provider for DTDC — India's express parcel carrier. It wraps DTDC's two API surfaces (booking + tracking) into a Medusa fulfillment provider, so orders can be rated, booked, labelled, tracked and cancelled through the same path as the other JYT carriers.

Features

  • Pincode serviceabilityisPincodeServiceable() checks whether a destination pincode is B2C-serviceable before you quote or book.
  • Booking — create a consignment (Ground Express or Priority) against DTDC's booking API (pxapi.dtdc.in, Shipsy demo host in sandbox).
  • Label streaming — fetch the shipping label / manifest PDF for a booked waybill.
  • Cancellation — cancel a booked consignment by reference number.
  • Tracking — resolve tracking scans from DTDC's tracking API using either a username/password pair or a pre-minted X-Access-Token.
  • Sandbox modesandbox: true routes booking/label/cancel to DTDC's Shipsy demo host and tracking to the staging host, so no live waybill is minted.

Requirements

  • Medusa 2.x
  • Node.js >= 22
  • A DTDC customer code + API key (booking), and tracking credentials (username/password or X-Access-Token)

Install

npm install @jytextiles/medusa-plugin-dtdc-shipping
# or
pnpm add @jytextiles/medusa-plugin-dtdc-shipping

Configure

Register the provider in medusa-config.ts under the fulfillment module. It is gated on DTDC_API_KEY so dev/test stay clean without credentials:

import { Modules } from "@medusajs/framework/utils"

{
  resolve: "@medusajs/medusa/fulfillment",
  options: {
    providers: [
      {
        resolve: "@jytextiles/medusa-plugin-dtdc-shipping/providers/dtdc",
        id: "dtdc",
        options: {
          customer_code: process.env.DTDC_CUSTOMER_CODE,
          api_key: process.env.DTDC_API_KEY,
          sandbox: process.env.DTDC_SANDBOX === "true",
          tracking_username: process.env.DTDC_TRACKING_USERNAME,
          tracking_password: process.env.DTDC_TRACKING_PASSWORD,
          tracking_access_token: process.env.DTDC_TRACKING_ACCESS_TOKEN,
          default_service_type: process.env.DTDC_DEFAULT_SERVICE_TYPE,
        },
      },
    ],
  },
}

Fulfillment options

The provider exposes four options:

| Option | Mode | Return | |---|---|---| | dtdc-ground-express | Surface | no | | dtdc-ground-express-return | Surface | yes | | dtdc-priority | Express | no | | dtdc-priority-return | Express | yes |

Shared client

The booking/tracking client is exported for direct use outside the fulfillment provider (e.g. a carrier resolver that needs a pincode check before quoting):

import { DtdcClient, isPincodeServiceable } from "@jytextiles/medusa-plugin-dtdc-shipping/lib/dtdc-client"
import { DtdcProviderAdapter } from "@jytextiles/medusa-plugin-dtdc-shipping/providers/dtdc/adapter"

License

MIT