PHPackages                             homer/kuaidi100 - 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. homer/kuaidi100

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

homer/kuaidi100
===============

access to logistics system via kuaidi100

1.0.0(9y ago)124proprietaryPHP

Since Jul 6Pushed 9y ago1 watchersCompare

[ Source](https://github.com/brianz82/kuaidi100)[ Packagist](https://packagist.org/packages/homer/kuaidi100)[ RSS](/packages/homer-kuaidi100/feed)WikiDiscussions master Synced 3w ago

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

Kuaidi100 Logistics Service
===========================

[](#kuaidi100-logistics-service)

Use APIs exposed by [Kuaidi100](http://www.kuaidi100.com/openapi/) to implement logisitics query service.

Demo Snippt
-----------

[](#demo-snippt)

Request API key (the below) from Kuaidi1000, and try the following code:

```
use Homer\Logistics\Kuaidi100\Service as LogisticsService;

$service = new LogisticsService(, );
// - or the full version
// $service = new LogisticsService(, , $optionsOfService, $instanceOfClient);

// to start tracking waybill
$service->track(, $options);

// handle on waybill's status update
$service->handleWaybillUpdated($notification, Closure $callback);

// eagerly query logistics of some waybill
$logistics = $service->query(, , , );
```

API
---

[](#api)

### construct

[](#construct)

`__construct($name, $key, array $options = [], ClientInterface $client = null)`

- `$name` name of the your company (it will be used when eagerly query logistics)
- `$key` API key (from Kuaidi100)
- `$options` some configurations, including:
    - `notification_url` the url to receive notification on waybill's status update
    - `salt` (optional) a globally choosen value for response's signature verification.
- $client (optional)http client

### start tracking some waybill

[](#start-tracking-some-waybill)

You can start tracking some waybill's logistics by calling the `track` method.

`track($waybillNo, array $options = [])`

- `$waybillNo` waybill's number (of the waybill to track)
- `$options` options, including:
    - company 快递公司[编码](http://www.kuaidi100.com/download/api_kuaidi100_com(20140729).doc)
    - from 出发地城市，格式: 省市区。例如: 广东省深圳市南山区
    - to 目的地城市，格式: 省市区。例如: 北京市朝阳区
    - salt (optional)签名用随机字符串(如果指定将覆盖构造函数中设定的salt，如果两处都没有设定，将使用运单号即waybillNo作为盐值)
    - international (optional)是否开启国际订单 true开启(缺省), false不开启
    - notification\_url (optional)接受通知的地址(如果使用,将覆盖构造函数中指定的notification\_url)

Return value of this method is a boolean value, true on success, false otherwise. Status/new logistics of the waybill will be notified once tracking is applied.

### handle waybill's status update

[](#handle-waybills-status-update)

`handleWaybillUpdated($notification, Closure $callback, $salt = null)`

- $notification (string) waybill status update
- $salt (string|null) salt used for signature verification

The returned value is an object containing updated status (with 'tracking', 'domestic' and an optional 'overseas' fields).

- tracking 跟踪
- | |---- status 跟踪状态, polling:监控中，shutdown:结束，abort:中止，updateall：重新推送。
- | |---- message 跟踪状态相关消息
- | |---- fake 是否被认为是假运单(到快递公司查不到运单)
- |
- domestic 国内物流
- | |---- state 当前签收状态，0在途中、1已揽收、2疑难、3已签收、4退签、5同城派送中、6退回、7转单
- | |---- signed 是否签收 false未签收、true已签收
- | |---- waybillNo 运单号
- | |---- company 快递公司编码
- | |---- items 物流信息(多项)
- | |---- time 时间
- | |---- state 状态
- | |---- desc 内容
- |
- overseas 国际物流 数据结构与国内物流相同

### (sync) Query the waybill's status

[](#sync-query-the-waybills-status)

Eagerly check status of some waybill.

`query($company, $waybillNo, $from, $to)`

- `$company` the logistics company's [code](http://www.kuaidi100.com/download/api_kuaidi100_com(20140729).doc)
- `$waybillNo` waybill's number
- `$from` 出发地城市，格式: 省市区。例如: 广东省深圳市南山区
- `$to` 目的地城市，格式: 省市区。例如: 北京市朝阳区

The return value contains only domestic logistics for now.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

3639d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17995689?v=4)[brianz82](/maintainers/brianz82)[@brianz82](https://github.com/brianz82)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/homer-kuaidi100/health.svg)

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

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[illuminate/http

The Illuminate Http package.

11937.2M6.5k](/packages/illuminate-http)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[dreamfactory/df-core

DreamFactory(tm) Core Components

1652.0k38](/packages/dreamfactory-df-core)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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