PHPackages                             yumufeng/jd-union-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. yumufeng/jd-union-sdk

ActiveLibrary

yumufeng/jd-union-sdk
=====================

v2.1.9(5y ago)1146.0k↓100%31[1 issues](https://github.com/yumufeng/jd-union-sdk/issues)MITPHPPHP &gt;=7.0

Since Mar 19Pushed 5y ago3 watchersCompare

[ Source](https://github.com/yumufeng/jd-union-sdk)[ Packagist](https://packagist.org/packages/yumufeng/jd-union-sdk)[ RSS](/packages/yumufeng-jd-union-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (21)Used By (0)

**京东联盟SDK**

京东联盟SDK，基于新版的

PHP =&gt;7.0

`composer require yumufeng/jd-union-sdk`

如果是在swoole 扩展下使用，支持协程并发，需要在编译swoole扩展的时候开启，系统会自动判断是否采用swoole

`./configure --enable-openssl`

由于自己没有高级接口，所以高级权限和基础权限封装是分开成两部分的。

### 使用示例

[](#使用示例)

```
$config = [
    'appkey' => '', // AppId （京东联盟的appkey）
    'appSecret' => '', // 密钥 （京东联盟的appSecret）
    'unionId' => '', // 联盟ID （如果使用京东联盟的，填京东联盟的，使用京佣的填京佣的）
    'positionId' => '', // 推广位ID （如果使用京东联盟的，填京东联盟的，使用京佣的填京佣的）
    'siteId' => '', // 网站ID, （如果使用京东联盟的，填京东联盟的，使用京佣的填京佣的）
    'apithId' => '',  // 第三方网站Apith的appid （可选，不使用apith的，可以不用填写）
    'apithKey' => '', // 第三方网站Apith的appSecret (可选，不使用apith的，可以不用填写)
    'jyCode' => '', // 京东京佣的API授权调用code (可选，不使用京佣的，可以不用填写)
    'isCurl' => true // 设置为true的话，强制使用php的curl，为false的话，在swoole cli环境下自动启用 http协程客户端
];
$client = new \JdMediaSdk\JdFatory($config);
$result = $client->apith->querySeckillGoods();
if ($result == false ) {
    var_dump($client->getError());
}

var_dump($result);
```

说明文档
----

[](#说明文档)

### 1.官方版本

[](#1官方版本)

以下**官方版本**传参参考：

接口名称 \[**基础**\]对应方法jd.union.open.order.query (订单查询接口)$client-&gt;promotion-&gt;order()jd.union.open.order.row.query (订单行查询接口)$client-&gt;promotion-&gt;orderRow()jd.union.open.goods.promotiongoodsinfo.query (获取推广商品信息接口)$client-&gt;good-&gt;info()jd.union.open.category.goods.get(商品类目查询)$client-&gt;good-&gt;category()jd.union.open.user.pid.get(获取PID)$client-&gt;promotion-&gt;pid()jd.union.open.promotion.common.get(获取通用推广链接)$client-&gt;link-&gt;get()jd.union.open.goods.jingfen.query (京粉精选商品查询接口)$client-&gt;good-&gt;jingfen()根据短链查询出落地页$client-&gt;good-&gt;getLinkByShortUrl()jd.union.open.statistics.giftcoupon.query(活动查询接口)$client-&gt;activity-&gt;query()接口名称 \[**高级**\] **官方版**对应方法jd.union.open.coupon.query(优惠券领取情况查询接口【**申请**】)$client-&gt;coupon-&gt;query()jd.union.open.goods.seckill.query(秒杀商品查询接口【**申请**】)$client-&gt;good-&gt;seckill()jd.union.open.goods.query(关键词商品查询接口【**申请**】)$client-&gt;good-&gt;query()jd.union.open.promotion.bysubunionid.get(社交媒体获取推广链接接口【**申请**】)$client-&gt;link-&gt;bySubUnionId()jd.union.open.promotion.byunionid.get(通过unionId获取推广链接【**申请**】)$client-&gt;link-&gt;byUnionId()jd.union.open.coupon.importation(优惠券导入【**申请**】)$client-&gt;coupon-&gt;importation()jd.union.open.position.query(查询推广位【**申请**】)$client-&gt;promotion-&gt;queryPosition()jd.union.open.goods.bigfield.query(大字段商品查询接口（内测版）【**申请**】)$client-&gt;good-&gt;bigFieldQuery()jd.union.open.coupon.gift.get(礼金创建【**申请**】)$client-&gt;gift-&gt;get()jd.union.open.coupon.gift.stop(礼金停止【**申请**】)$client-&gt;gift-&gt;stop()jd.union.open.statistics.giftcoupon.query(礼金停止【**申请**】)$client-&gt;gift-&gt;query()### 2.京佣版

[](#2京佣版)

没有**高级权限**的，可以点击 加QQ 445328312 辅助获取 京佣 高级权限（由于时间有限 100人/次 服务费用，一次开通，永久使用，不限制调用量）

接口名称 \[**高级**\] **京佣版**对应方法关键词商品查询接口【**申请**】$client-&gt;jingyong-&gt;queryGood()订单查询接口,支持“subid”进行返利跟踪【**申请**】$client-&gt;jingyong-&gt;order()长短转链接口,支持“subid”进行返利跟踪【**申请**】$client-&gt;jingyong-&gt;convert()### 3.Apith版

[](#3apith版)

没有**Apith高级权限**的，可以点击  （用github登录即可 ，28元/月，收费的哦）。

接口名称 \[**高级**\] **Apith版**对应方法jd.union.open.coupon.query(优惠券领取情况查询接口【**申请**】)$client-&gt;apith-&gt;queryCoupon()jd.union.open.goods.seckill.query(秒杀商品查询接口【**申请**】)$client-&gt;apith-&gt;querySeckillGoods()jd.union.open.goods.query(关键词商品查询接口【**申请**】)$client-&gt;apith-&gt;queryGoods()jd.union.open.promotion.byunionid.get(通过unionId获取推广链接【**申请**】)$client-&gt;apith-&gt;getByUnionidPromotion()jd.union.open.position.query(查询推广位【**申请**】)$client-&gt;apith-&gt;queryPosition()jd.union.open.position.create(创建推广位【**申请**】)$client-&gt;apith-&gt;createPosition()商品主图列表查询【**申请**】$client-&gt;apith-&gt;getGoodsImageList()根据短链查询出落地页【**申请**】$client-&gt;apith-&gt;getLinkByShort()根据短链接查询商品编号【**申请**】$client-&gt;apith-&gt;getSkuIdByShort()License
-------

[](#license)

Apache

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 55.2% 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 ~36 days

Recently: every ~80 days

Total

20

Last Release

1924d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/724d2abcc46ad08231f455ae139502a824e48a1de5caeb3767ff71efbc9ccc83?d=identicon)[yumufeng](/maintainers/yumufeng)

---

Top Contributors

[![yumufeng](https://avatars.githubusercontent.com/u/9146937?v=4)](https://github.com/yumufeng "yumufeng (16 commits)")[![uhowep](https://avatars.githubusercontent.com/u/24932775?v=4)](https://github.com/uhowep "uhowep (4 commits)")[![vangogogo](https://avatars.githubusercontent.com/u/5194254?v=4)](https://github.com/vangogogo "vangogogo (4 commits)")[![asundust](https://avatars.githubusercontent.com/u/6573979?v=4)](https://github.com/asundust "asundust (2 commits)")[![hisway](https://avatars.githubusercontent.com/u/3006019?v=4)](https://github.com/hisway "hisway (2 commits)")[![sdhou](https://avatars.githubusercontent.com/u/1942478?v=4)](https://github.com/sdhou "sdhou (1 commits)")

---

Tags

jdjdunionsdk

### Embed Badge

![Health badge](/badges/yumufeng-jd-union-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/yumufeng-jd-union-sdk/health.svg)](https://phpackages.com/packages/yumufeng-jd-union-sdk)
```

PHPackages © 2026

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