PHPackages                             shibanashiqc/dtdc-courier-php-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. shibanashiqc/dtdc-courier-php-sdk

ActiveLibrary[HTTP &amp; Networking](/categories/http)

shibanashiqc/dtdc-courier-php-sdk
=================================

Dtdc unofficial php package

v1.1.0(1y ago)020ISCPHP

Since Nov 17Pushed 1y ago1 watchersCompare

[ Source](https://github.com/shibanashiqc/dtdc-courier-php-sdk)[ Packagist](https://packagist.org/packages/shibanashiqc/dtdc-courier-php-sdk)[ RSS](/packages/shibanashiqc-dtdc-courier-php-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

dtdc-courier-php-sdk
====================

[](#dtdc-courier-php-sdk)

Unofficial PHP library for [DTDC](https://www.dtdc.in/integrated-e-commerce-logistics.asp).

### Prerequisites

[](#prerequisites)

- A minimum of PHP 8.0 is required.

Installation
------------

[](#installation)

- If your project using composer, run the below command

```
composer require shibanashiqc/dtdc-courier-php-sdk

```

- If you are not using composer, download the latest release from [the releases section](https://github.com/shibanashiqc/dtdc-courier-php-sdk/releases). **You should download the `dtdc-courier-php-sdk.zip` file**. After that, include `DTDC.php` in your application and you can use the API as usual.

\##Note: This PHP library follows the following practices:

- Namespaced under `Shibanashiqc\DtdcCourierPhpSdk\`
- API throws exceptions instead of returning errors
- Options are passed as an array instead of multiple arguments wherever possible
- All requests and responses are communicated over JSON

Documentation
-------------

[](#documentation)

For Documentation of DTDC API you need contact DTDC Team

Basic Usage
-----------

[](#basic-usage)

Api Key , x\_access\_token and customer code credentials can be obtained from the DTDC.

Required parameters for the constructor are: api-key, x\_access\_token, customer\_code

```
use Shibanashiqc\DtdcCourierPhpSdk\DTDC;
use Shibanashiqc\DtdcCourierPhpSdk\Config;

$client = new DTDC('your_api_key', 'your_access_token', false);
$client->setCustomerCode('customer_code');

Config::setShippingInfo([
    'customer_code' => $client::$customer_code,
    'service_type_id' => 'B2C PRIORITY',
    'load_type' => 'NON-DOCUMENT',
    'description' => 'Caddy DM48 Office Chair (Black)',
    'dimension_unit' => 'cm',
    'length' => '70.0',
    'width' => '70.0',
    'height' => '65.0',
    'weight_unit' => 'kg',
    'weight' => '17.0',
    'declared_value' => '5982.6',
    'num_pieces' => '1',
    'customer_reference_number' => '202424-135028',
    'cod_collection_mode' => '',
    'cod_amount' => '0',
    'commodity_id' => '99',
    'reference_number' => '',
]);

Config::setOriginDetails('TEST', '7894561230', '8766747774', '3/658  pillayar nagar karattur Amani kondalampatti', '', '676552', 'SALEM', 'Tamil Nadu');
Config::setDestinationDetails('TEST', '7844561230', '', '3/658  pillayar nagar karattur Amani kondalampatti', '', '636010', 'SALEM', 'Tamil Nadu');

Config::addPieceDetail([
    [
        'description' => 'Test Product',
        'declared_value' => '200',
        'weight' => '0.5',
        'height' => '5',
        'length' => '5',
        'width' => '5'
    ],
    // next piece detail can be added here
]);

$config = Config::$config;
$response = $client->base->createNewShipment($config);
print_r($response);

$response = $client->base->getShippingLabel('7X6548766');
print_r($response);

$response = $client->base->getTrackingStatus('7X6548766');
print_r($response);
```

### createNewShipment

[](#createnewshipment)

```
$config = Config::$config;
$response = $client->base->createNewShipment($config);
print_r($response);
```

### getShippingLabel

[](#getshippinglabel)

```
$response = $client->base->getShippingLabel('7X6548766');
print_r($response);
```

### getTrackingStatus

[](#gettrackingstatus)

```
$response = $client->base->getTrackingStatus('7X6548766');
print_r($response);
```

### cancelShipment

[](#cancelshipment)

```
$response = $client->base->cancelShipment([
    "D78326386"
]);
print_r($response);
```

### shippingAmount

[](#shippingamount)

```
// type of zone : City, Region, Zone, Metro, Rol-A
$response = $client->base->shippingAmount(50, 'City');
print_r($response);
```

### getPincodeInfo

[](#getpincodeinfo)

```
$response = $client->base->getPincodeInfo('676552', '600040');
print_r($response);
```

License
-------

[](#license)

The DTDC PHP SDK is released under the MIT License. See [LICENSE](LICENSE) file for more details.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

5

Last Release

533d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/da197b840be9a1a9da9eb431fcb34ea211c6a33119acf131a76e68f78563ddbb?d=identicon)[shibanashiq697](/maintainers/shibanashiq697)

---

Top Contributors

[![shibanashiqc](https://avatars.githubusercontent.com/u/80801260?v=4)](https://github.com/shibanashiqc "shibanashiqc (17 commits)")

### Embed Badge

![Health badge](/badges/shibanashiqc-dtdc-courier-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/shibanashiqc-dtdc-courier-php-sdk/health.svg)](https://phpackages.com/packages/shibanashiqc-dtdc-courier-php-sdk)
```

###  Alternatives

[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[omniphx/forrest

A Laravel library for Salesforce

2724.4M8](/packages/omniphx-forrest)[akamai-open/edgegrid-client

Implements the Akamai {OPEN} EdgeGrid Authentication specified by https://developer.akamai.com/introduction/Client\_Auth.html

482.5M6](/packages/akamai-open-edgegrid-client)[muhammadhuzaifa/telescope-guzzle-watcher

Telescope Guzzle Watcher provide a custom watcher for intercepting http requests made via guzzlehttp/guzzle php library. The package uses the on\_stats request option for extracting the request/response data. The watcher intercept and log the request into the Laravel Telescope HTTP Client Watcher.

98239.8k1](/packages/muhammadhuzaifa-telescope-guzzle-watcher)[onesignal/onesignal-php-api

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

34170.2k2](/packages/onesignal-onesignal-php-api)[ory/hydra-client-php

Documentation for all of Ory Hydra's APIs.

1710.8k](/packages/ory-hydra-client-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
