Skip to content

查询用户签约列表

商户使用本接口来查询用户签约信息,返回用户在该签约模板下的合约列表(包括处于「已解约」状态下的合约);被用户主动删除的合约无法被查询到。结果中「已签约」合约排列于「已解约」合约之前。

请求参数类型描述
openidstring商户appid下的用户标识
queryobject声明请求的查询参数
plan_idstring签约模板号
contract_statusstring签约状态
offsetinteger分页页码
limitinteger分页大小
php
$instance->v3->eduschoolpay->users->_openid_->contracts->getAsync([
  'openid' => 'oUpF8uMuAJOM2pxb1Q',
  'query' => [
    'plan_id' => '101164396123311331',
    'contract_status' => 'ADD',
    'offset' => 0,
    'limit' => 20,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/eduschoolpay/users/{openid}/contracts')->getAsync([
  'openid' => 'oUpF8uMuAJOM2pxb1Q',
  'query' => [
    'plan_id' => '101164396123311331',
    'contract_status' => 'ADD',
    'offset' => 0,
    'limit' => 20,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/eduschoolpay/users/{openid}/contracts']->getAsync([
  'openid' => 'oUpF8uMuAJOM2pxb1Q',
  'query' => [
    'plan_id' => '101164396123311331',
    'contract_status' => 'ADD',
    'offset' => 0,
    'limit' => 20,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->eduschoolpay->users->_openid_->contracts->get([
  'openid' => 'oUpF8uMuAJOM2pxb1Q',
  'query' => [
    'plan_id' => '101164396123311331',
    'contract_status' => 'ADD',
    'offset' => 0,
    'limit' => 20,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/eduschoolpay/users/{openid}/contracts')->get([
  'openid' => 'oUpF8uMuAJOM2pxb1Q',
  'query' => [
    'plan_id' => '101164396123311331',
    'contract_status' => 'ADD',
    'offset' => 0,
    'limit' => 20,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/eduschoolpay/users/{openid}/contracts']->get([
  'openid' => 'oUpF8uMuAJOM2pxb1Q',
  'query' => [
    'plan_id' => '101164396123311331',
    'contract_status' => 'ADD',
    'offset' => 0,
    'limit' => 20,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
dataobject[]查询结果列表
contract_idstring签约协议号
mchidstring商户号
appidstring商户appid
openidstring商户appid下的用户标识
plan_idstring签约模板号
contract_statusstring签约状态
create_timestring签约时间
out_contract_codestring外部签约号
offsetinteger请求资源起始位置
limitinteger最大资源条数
total_countinteger资源总条数
linksobject相关链接
nextstring下一页链接
prevstring上一页链接
selfstring当前链接

参阅 官方文档

Published on the GitHub by TheNorthMemory