{"id":30426166,"url":"https://github.com/inbjo/express","last_synced_at":"2025-08-22T12:24:30.609Z","repository":{"id":34414173,"uuid":"178779366","full_name":"inbjo/express","owner":"inbjo","description":"支持快递鸟、快递100的快递查询SDK","archived":false,"fork":false,"pushed_at":"2022-09-23T13:58:33.000Z","size":41,"stargazers_count":33,"open_issues_count":1,"forks_count":14,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-21T17:32:41.221Z","etag":null,"topics":["kuaidi100","kuaidiniao","laravel","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/inbjo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-01T03:30:55.000Z","updated_at":"2024-08-21T06:06:37.000Z","dependencies_parsed_at":"2022-09-24T22:40:24.402Z","dependency_job_id":null,"html_url":"https://github.com/inbjo/express","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/inbjo/express","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inbjo%2Fexpress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inbjo%2Fexpress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inbjo%2Fexpress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inbjo%2Fexpress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inbjo","download_url":"https://codeload.github.com/inbjo/express/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inbjo%2Fexpress/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271636052,"owners_count":24794147,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kuaidi100","kuaidiniao","laravel","php"],"created_at":"2025-08-22T12:24:21.292Z","updated_at":"2025-08-22T12:24:30.559Z","avatar_url":"https://github.com/inbjo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e Express \u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e支持快递鸟、快递100的快递查询SDK\u003c/p\u003e\n\n[![Build Status](https://travis-ci.org/inbjo/express.svg?branch=master)](https://travis-ci.org/inbjo/express)\n[![StyleCI build status](https://github.styleci.io/repos/178779366/shield)](https://github.styleci.io/repos/178779366)\n[![Latest Stable Version](https://poser.pugx.org/flex/express/v/stable)](https://packagist.org/packages/flex/express)\n[![Total Downloads](https://poser.pugx.org/flex/express/downloads)](https://packagist.org/packages/flex/express)\n[![License](https://poser.pugx.org/flex/express/license)](https://packagist.org/packages/flex/express)\n\n\n## 安装\n\n```shell\n$ composer require flex/express -vvv\n```\n## 配置\n\n在使用本扩展之前，你需要去 [快递100](https://www.kuaidi100.com/openapi/applyapi.shtml) 或者 [快递鸟](http://www.kdniao.com/reg) 注册申请，获取到APP_id和APP_key。\n\n## Usage\n### 快递100\n```php\nuse Flex\\Express\\Express100;\n\n$express = new Express100('app_id','app_key');\n$info = $express-\u003etrack($tracking_code, $shipping_code, $phone); //快递单号 物流公司编号 收件人手机号(顺丰必填 其他快递选填)\n```\n示例:\n```json\n{\n    \"message\": \"ok\",\n    \"nu\": \"888888888888\",\n    \"ischeck\": \"1\",\n    \"condition\": \"F00\",\n    \"com\": \"shunfeng\",\n    \"status\": \"200\",\n    \"state\": \"3\",\n    \"data\": [\n        {\n            \"time\": \"2019-03-08 19:11:51\",\n            \"ftime\": \"2019-03-08 19:11:51\",\n            \"context\": \"[安高广场速运营业点]快件已发车\"\n        },\n        {\n            \"time\": \"2019-03-08 18:56:12\",\n            \"ftime\": \"2019-03-08 18:56:12\",\n            \"context\": \"[安高广场速运营业点]快件在【合肥蜀山区安高广场营业点】已装车,准备发往 【合肥经开集散中心】\"\n        },\n        {\n            \"time\": \"2019-03-08 18:50:52\",\n            \"ftime\": \"2019-03-08 18:50:52\",\n            \"context\": \"[安高广场速运营业点]顺丰速运 已收取快件\"\n        }\n    ]\n}\n```\n\n### 快递鸟\n```php\nuse Flex\\Express\\ExpressBird;\n\n$express = new ExpressBird('app_id','app_key'); \n$info = $express-\u003etrack($tracking_code, $shipping_code，$order_code); //快递单号 物流公司编号 订单编号(选填)\n```\n示例:\n```json\n{\n    \"LogisticCode\": \"8888888888888888\",\n    \"ShipperCode\": \"YTO\",\n    \"Traces\": [\n        {\n            \"AcceptStation\": \"【四川省直营市场部公司】 取件人: 四川省直营市场部41 已收件\",\n            \"AcceptTime\": \"2019-03-21 11:03:40\"\n        },\n        {\n            \"AcceptStation\": \"【四川省直营市场部公司】 已收件\",\n            \"AcceptTime\": \"2019-03-21 13:45:01\"\n        },\n        {\n            \"AcceptStation\": \"【成都转运中心】 已收入\",\n            \"AcceptTime\": \"2019-03-21 22:40:01\"\n        }\n    ],\n    \"State\": \"3\",\n    \"OrderCode\": \"\",\n    \"EBusinessID\": \"100000\",\n    \"Success\": true\n}\n```\n### 通用方法\n```php\nuse Flex\\Express\\Express;\n\n\n$express = new Express($app_id,$app_key,$type); //$type支持类型'express100'、'expressbird'\n\n//快递鸟$additional=['order_code'=\u003e111111] 快递100 $additional=['phone'=\u003e'18899996666']\n$info = $express-\u003etrack($tracking_code, $shipping_code，$additional); ////查询物流 快递单号 额外参数\n```\n\n ### 在 Laravel 中使用\n \n 在 Laravel 中使用也是同样的安装方式，配置写在 `config/services.php` 中：\n \n ```php\n     .\n     .\n     .\n      'express' =\u003e [\n         'id' =\u003e env('EXPRESS_ID'),\n         'key' =\u003e env('EXPRESS_KEY'),\n         'type' =\u003e env('EXPRESS_TYPE'),\n     ],\n ```\n \n 然后在 `.env` 中配置 `EXPRESS_ID`、`EXPRESS_KEY`、`EXPRESS_TYPE`；\n \n ```env\n EXPRESS_ID=xxxxxxxxxxxxxxxxxxxxx\n EXPRESS_KEY=xxxxxxxxxxxxxxxxxxxxx\n EXPRESS_TYPE=express100\n ```\n \n 可以用两种方式来获取 `Flex\\Express\\Express` 实例：\n \n #### 方法参数注入\n \n ```php\n     .\n     .\n     .\n     public function edit(Express $express) \n     {\n         $response = $express-\u003etrack('888888888','YTO');\n     }\n     .\n     .\n     .\n ```\n \n #### 服务名访问\n \n ```php\n     .\n     .\n     .\n     public function edit() \n     {\n         $response = app('express')-\u003etrack('888888888','YTO');\n     }\n     .\n     .\n     .\n \n ```\n \n ## 参考\n \n - [快递100接口文档](https://www.kuaidi100.com/openapi/api_post.shtml)\n - [快递100快递公司编码](https://blog.csdn.net/u011816231/article/details/53063611)\n - [快递鸟接口文档](http://www.kdniao.com/documents)\n - [快递鸟快递公司编码](http://www.kdniao.com/documents)\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finbjo%2Fexpress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finbjo%2Fexpress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finbjo%2Fexpress/lists"}