PHPackages                             sobyte/kdniao - 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. sobyte/kdniao

ActiveLibrary

sobyte/kdniao
=============

快递鸟API集成

0.0.3(5y ago)04MITPHPPHP ~5.6|~7.0

Since Apr 27Pushed 5y ago1 watchersCompare

[ Source](https://github.com/mingo6/kdniao)[ Packagist](https://packagist.org/packages/sobyte/kdniao)[ Docs](https://github.com/mingo6/kdniao)[ RSS](/packages/sobyte-kdniao/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

集成了 [快递鸟](http://www.kdniao.com) 官方的Api，当前包含`订阅物流信息` `查询物流信息` `电子面单下单` `即时查询` 三个接口。

安装
--

[](#安装)

1. 安装包文件

    ```
    $ composer require sobyte/kdniao
    ```

配置
--

[](#配置)

1. 在 `.env` 文件中增加如下两项配置：

    - `KDNIAO_EBUSINESS_ID`：快点鸟用户ID。
    - `KDNIAO_API_KEY`：快点鸟ApiKey。

使用
--

[](#使用)

1. 获取快递公司列表

    ```
       Sobyte\KDNiao\KDNiao::expresses();
    ```
2. 根据快递公司编码反查快递公司

    ```
       $code = 'SF';
       Sobyte\KDNiao\KDNiao::getExpressByCode($code);
    ```
3. 订阅物流信息

    ```
       $orderSn = '业务订单号';
       $expressCode = '物流公司编码';
       $orderSn = '物流单号';
       Sobyte\KDNiao\KDNiao::subExpressInfo($orderSn, $expressCode, $expressSn);
    ```

    订阅结果字段：

    参数类型说明可为空EBusinessIDString用户IDNUpdateTimeString时间NSuccessBool成功与否：true，falseNReasonString失败原因Y，Success为false时有值Y
4. 查询物流信息

    ```
       $orderSn = '业务订单号';
       $expressCode = '物流公司编码';
       $orderSn = '物流单号';
       Sobyte\KDNiao\KDNiao::queryExpressInfo($orderSn, $expressCode, $expressSn);
    ```

    查询结果字段：

    参数类型说明可为空EBusinessIDString用户IDNOrderCodeString订单编号YShipperCodeString快递公司编码NLogisticCodeString物流运单号YSuccessBool成功与否：true，falseNReasonString失败原因Y，Success为false时有值YStateString物流状态：2-在途中,3-签收,4-问题件NTracesJsonArray物流信息，详细字段见下表YTraces(物流信息)字段：

    参数类型说明可为空AcceptTimeString时间NAcceptStationString描述NRemarkString备注Y

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

1847d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/436ea1d0beda7273f6be426e03b4520fb15a9212133a7447f808d2e7d385d338?d=identicon)[Robyte](/maintainers/Robyte)

---

Top Contributors

[![mingo6](https://avatars.githubusercontent.com/u/24412465?v=4)](https://github.com/mingo6 "mingo6 (3 commits)")

---

Tags

kdniao

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/sobyte-kdniao/health.svg)

```
[![Health](https://phpackages.com/badges/sobyte-kdniao/health.svg)](https://phpackages.com/packages/sobyte-kdniao)
```

###  Alternatives

[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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