Skip to content

商圈积分授权查询

通过积分授权查询API,商圈商户可自行查询用户积分功能开通情况

请求参数类型描述
openidstring顾客openid
queryobject声明请求的查询参数
sub_mchidstring商圈商户ID
appidstring小程序appid
php
$instance->v3->businesscircle->userAuthorizations->_openid_->getAsync([
  'openid' => 'oWmnN4xxxxxxxxxxe92NHIGf1xd8',
  'query' => [
    'sub_mchid' => '1900000109',
    'appid'     => 'wx1234567890abcdef',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/businesscircle/user-authorizations/{openid}')->getAsync([
  'openid' => 'oWmnN4xxxxxxxxxxe92NHIGf1xd8',
  'query' => [
    'sub_mchid' => '1900000109',
    'appid'     => 'wx1234567890abcdef',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/businesscircle/user-authorizations/{openid}']->getAsync([
  'openid' => 'oWmnN4xxxxxxxxxxe92NHIGf1xd8',
  'query' => [
    'sub_mchid' => '1900000109',
    'appid'     => 'wx1234567890abcdef',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->businesscircle->userAuthorizations->_openid_->get([
  'openid' => 'oWmnN4xxxxxxxxxxe92NHIGf1xd8',
  'query' => [
    'sub_mchid' => '1900000109',
    'appid'     => 'wx1234567890abcdef',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/businesscircle/user-authorizations/{openid}')->get([
  'openid' => 'oWmnN4xxxxxxxxxxe92NHIGf1xd8',
  'query' => [
    'sub_mchid' => '1900000109',
    'appid'     => 'wx1234567890abcdef',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/businesscircle/user-authorizations/{openid}']->get([
  'openid' => 'oWmnN4xxxxxxxxxxe92NHIGf1xd8',
  'query' => [
    'sub_mchid' => '1900000109',
    'appid'     => 'wx1234567890abcdef',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
openidstring顾客openid
authorize_statestring授权状态
authorize_timestring授权时间
deauthorize_timestring取消授权时间

参阅 官方文档 官方文档

Published on the GitHub by TheNorthMemory