Skip to content

获取用户信息(跳转型激活)

如果商家选择跳转激活的投放方式,用户点击开卡跳转至商家H5网页/小程序时,会员组件会在跳转链接activate_url后拼接若干个参数,包括:用户的openid、加密的会员code(encrypt_code)、激活ticket(activate_ticket)。对于其中的activate_ticket,商家可调用当前api,获取用户的开卡信息。

请求参数类型描述
activate_ticketstring激活ticket
php
$instance->v3->marketing->membercardOpen->activateInformations->_activate_ticket_->getAsync([
  'activate_ticket' => 'abcdefg',
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/membercard-open/activate-informations/{activate_ticket}')->getAsync([
  'activate_ticket' => 'abcdefg',
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/membercard-open/activate-informations/{activate_ticket}']->getAsync([
  'activate_ticket' => 'abcdefg',
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->membercardOpen->activateInformations->_activate_ticket_->get([
  'activate_ticket' => 'abcdefg',
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/membercard-open/activate-informations/{activate_ticket}')->get([
  'activate_ticket' => 'abcdefg',
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/membercard-open/activate-informations/{activate_ticket}']->get([
  'activate_ticket' => 'abcdefg',
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
nicknamestring微信昵称
head_image_urlstring微信头像url
user_informationobject用户开卡时填写的个人信息
common_field_listobject[]平台提供的通用开卡信息字段
namestring平台提供的通用开卡信息字段
USER_FORM_FLAG_MOBILE | USER_FORM_FLAG_SEX | USER_FORM_FLAG_NAME | USER_FORM_FLAG_BIRTHDAY | USER_FORM_FLAG_ADDRESS | USER_FORM_FLAG_EMAIL | USER_FORM_FLAG_CITY 枚举值之一
valuestring用户开卡时填写的个人信息
custom_field_listobject[]商户自定义的开卡信息字段
namestring字段名称
valuestring字段值
value_liststring[]字段值

参阅 官方文档

Published on the GitHub by TheNorthMemory