查询和更新保单信息
查询保单
商户通过商户保险编号获取在微信支付侧同步的保单信息。信息对账:商户应定期通过此接口,核对微信支付平台记录的保单信息与商户系统内是否一致。
| 请求参数 | 类型 | 描述 |
|---|---|---|
| out_insurance_no | string | 商户保险编号 |
php
$instance->v3->inspolicymgr->deduct->policies->_out_insurance_no_->getAsync([
'out_insurance_no' => 'Auisihsiahishishi4hihsid123418id',
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance->chain('v3/inspolicymgr/deduct/policies/{out_insurance_no}')->getAsync([
'out_insurance_no' => 'Auisihsiahishishi4hihsid123418id',
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance['v3/inspolicymgr/deduct/policies/{out_insurance_no}']->getAsync([
'out_insurance_no' => 'Auisihsiahishishi4hihsid123418id',
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$response = $instance->v3->inspolicymgr->deduct->policies->_out_insurance_no_->get([
'out_insurance_no' => 'Auisihsiahishishi4hihsid123418id',
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance->chain('v3/inspolicymgr/deduct/policies/{out_insurance_no}')->get([
'out_insurance_no' => 'Auisihsiahishishi4hihsid123418id',
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance['v3/inspolicymgr/deduct/policies/{out_insurance_no}']->get([
'out_insurance_no' => 'Auisihsiahishishi4hihsid123418id',
]);
print_r(json_decode((string) $response->getBody(), true));| 返回字典 | 类型 | 描述 |
|---|---|---|
| out_insurance_no | string | 商户保险编号 |
| insurance_name | string | 保险名称 |
| insured_name_list | string[] | 被保险人姓名列表 |
| insurance_company_code | string | 承保公司代码 |
| effective_time | string | 保单生效时间 |
| expired_time | string | 保单失效时间 |
| coverage_detail | string | 保障详情 |
| support_renewal | boolean | 是否支持续保 |
| start_renewal_time | string | 可续保开始时间 |
| end_renewal_time | string | 可续保结束时间 |
| policy_type | string | 保单类型POLICY_TYPE_OTHER | POLICY_TYPE_MEDICAL | POLICY_TYPE_ACCIDENT | POLICY_TYPE_CRITICAL | POLICY_TYPE_CAR | POLICY_TYPE_LIFE | POLICY_TYPE_PROPERTY | POLICY_TYPE_PET | POLICY_TYPE_ANNUITY 枚举值之一 |
| car_number | string | 车牌信息 |
| pet_name | string | 宠物名称 |
| address | string | 地址信息 |
| policy_state | string | 保单状态POLICY_STATE_ISSUING | POLICY_STATE_APPROVED | POLICY_STATE_DECLINED | POLICY_STATE_INACTIVE 枚举值之一 |
| policy_code | string | 保司保单号 |
| plan_id | number | 委托代扣模板ID |
| out_contract_code | string | 商户签约协议号 |
| policy_periods | number[] | 保单的扣费周期列表 |
参阅 官方文档
更新保单信息
当保单信息变更,如出单成功、用户退保、保单失效等,商户需调用此接口实时同步更新保单信息。
| 请求参数 | 类型 | 描述 |
|---|---|---|
| out_insurance_no | string | 商户保险编号 |
| json | object | 声明请求的JSON数据结构 |
| insured_name_list | string[] | 被保险人姓名列表 |
| insurance_name | string | 保险名称 |
| effective_time | string | 保单生效时间 |
| expired_time | string | 保单失效时间 |
| coverage_detail | string | 保障详情 |
| support_renewal | boolean | 是否支持续保 |
| start_renewal_time | string | 可续保开始时间 |
| end_renewal_time | string | 可续保结束时间 |
| policy_type | string | 保单类型POLICY_TYPE_OTHER | POLICY_TYPE_MEDICAL | POLICY_TYPE_ACCIDENT | POLICY_TYPE_CRITICAL | POLICY_TYPE_CAR | POLICY_TYPE_LIFE | POLICY_TYPE_PROPERTY | POLICY_TYPE_PET | POLICY_TYPE_ANNUITY 枚举值之一 |
| car_number | string | 车牌信息 |
| pet_name | string | 宠物名称 |
| address | string | 地址信息 |
| policy_state | string | 保单状态POLICY_STATE_ISSUING | POLICY_STATE_APPROVED | POLICY_STATE_DECLINED | POLICY_STATE_INACTIVE 枚举值之一 |
| policy_code | string | 保司保单号 |
| plan_id | number | 委托代扣模板ID |
| out_contract_code | string | 商户签约协议号 |
| policy_periods | number[] | 保单的扣费周期列表 |
| headers | object | 声明请求的头参数 |
| Wechatpay-Serial | string | 微信支付公钥ID/平台证书序列号 |
php
$instance->v3->inspolicymgr->deduct->policies->_out_insurance_no_->patchAsync([
'out_insurance_no' => 'Auisihsiahishishi4hihsid123418id',
'json' => [
'insured_name_list' => ['tCk1JSUV2QUlCQURBTkJna3Foa2lHOXc'],
'insurance_name' => '微医保·百万医疗险',
'effective_time' => '2025-09-21T17:11:12+08:00',
'expired_time' => '2025-09-21T17:11:12+08:00',
'coverage_detail' => '可保190种疾病,确诊一次性赔付',
'support_renewal' => true,
'start_renewal_time' => '2025-09-21T17:11:12+08:00',
'end_renewal_time' => '2025-09-21T17:11:12+08:00',
'policy_type' => 'POLICY_TYPE_OTHER',
'car_number' => '粤B·AB123',
'pet_name' => '小狗',
'address' => '上海市浦东新区晨晖路1001号',
'policy_state' => 'POLICY_STATE_ISSUING',
'policy_code' => 'Coisihsiaxishishi4hihsid1ii411co',
'plan_id' => 12535,
'out_contract_code' => 'wxwtdk20200910100000',
'policy_periods' => [1],
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance->chain('v3/inspolicymgr/deduct/policies/{out_insurance_no}')->patchAsync([
'out_insurance_no' => 'Auisihsiahishishi4hihsid123418id',
'json' => [
'insured_name_list' => ['tCk1JSUV2QUlCQURBTkJna3Foa2lHOXc'],
'insurance_name' => '微医保·百万医疗险',
'effective_time' => '2025-09-21T17:11:12+08:00',
'expired_time' => '2025-09-21T17:11:12+08:00',
'coverage_detail' => '可保190种疾病,确诊一次性赔付',
'support_renewal' => true,
'start_renewal_time' => '2025-09-21T17:11:12+08:00',
'end_renewal_time' => '2025-09-21T17:11:12+08:00',
'policy_type' => 'POLICY_TYPE_OTHER',
'car_number' => '粤B·AB123',
'pet_name' => '小狗',
'address' => '上海市浦东新区晨晖路1001号',
'policy_state' => 'POLICY_STATE_ISSUING',
'policy_code' => 'Coisihsiaxishishi4hihsid1ii411co',
'plan_id' => 12535,
'out_contract_code' => 'wxwtdk20200910100000',
'policy_periods' => [1],
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance['v3/inspolicymgr/deduct/policies/{out_insurance_no}']->patchAsync([
'out_insurance_no' => 'Auisihsiahishishi4hihsid123418id',
'json' => [
'insured_name_list' => ['tCk1JSUV2QUlCQURBTkJna3Foa2lHOXc'],
'insurance_name' => '微医保·百万医疗险',
'effective_time' => '2025-09-21T17:11:12+08:00',
'expired_time' => '2025-09-21T17:11:12+08:00',
'coverage_detail' => '可保190种疾病,确诊一次性赔付',
'support_renewal' => true,
'start_renewal_time' => '2025-09-21T17:11:12+08:00',
'end_renewal_time' => '2025-09-21T17:11:12+08:00',
'policy_type' => 'POLICY_TYPE_OTHER',
'car_number' => '粤B·AB123',
'pet_name' => '小狗',
'address' => '上海市浦东新区晨晖路1001号',
'policy_state' => 'POLICY_STATE_ISSUING',
'policy_code' => 'Coisihsiaxishishi4hihsid1ii411co',
'plan_id' => 12535,
'out_contract_code' => 'wxwtdk20200910100000',
'policy_periods' => [1],
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$response = $instance->v3->inspolicymgr->deduct->policies->_out_insurance_no_->patch([
'out_insurance_no' => 'Auisihsiahishishi4hihsid123418id',
'json' => [
'insured_name_list' => ['tCk1JSUV2QUlCQURBTkJna3Foa2lHOXc'],
'insurance_name' => '微医保·百万医疗险',
'effective_time' => '2025-09-21T17:11:12+08:00',
'expired_time' => '2025-09-21T17:11:12+08:00',
'coverage_detail' => '可保190种疾病,确诊一次性赔付',
'support_renewal' => true,
'start_renewal_time' => '2025-09-21T17:11:12+08:00',
'end_renewal_time' => '2025-09-21T17:11:12+08:00',
'policy_type' => 'POLICY_TYPE_OTHER',
'car_number' => '粤B·AB123',
'pet_name' => '小狗',
'address' => '上海市浦东新区晨晖路1001号',
'policy_state' => 'POLICY_STATE_ISSUING',
'policy_code' => 'Coisihsiaxishishi4hihsid1ii411co',
'plan_id' => 12535,
'out_contract_code' => 'wxwtdk20200910100000',
'policy_periods' => [1],
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance->chain('v3/inspolicymgr/deduct/policies/{out_insurance_no}')->patch([
'out_insurance_no' => 'Auisihsiahishishi4hihsid123418id',
'json' => [
'insured_name_list' => ['tCk1JSUV2QUlCQURBTkJna3Foa2lHOXc'],
'insurance_name' => '微医保·百万医疗险',
'effective_time' => '2025-09-21T17:11:12+08:00',
'expired_time' => '2025-09-21T17:11:12+08:00',
'coverage_detail' => '可保190种疾病,确诊一次性赔付',
'support_renewal' => true,
'start_renewal_time' => '2025-09-21T17:11:12+08:00',
'end_renewal_time' => '2025-09-21T17:11:12+08:00',
'policy_type' => 'POLICY_TYPE_OTHER',
'car_number' => '粤B·AB123',
'pet_name' => '小狗',
'address' => '上海市浦东新区晨晖路1001号',
'policy_state' => 'POLICY_STATE_ISSUING',
'policy_code' => 'Coisihsiaxishishi4hihsid1ii411co',
'plan_id' => 12535,
'out_contract_code' => 'wxwtdk20200910100000',
'policy_periods' => [1],
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance['v3/inspolicymgr/deduct/policies/{out_insurance_no}']->patch([
'out_insurance_no' => 'Auisihsiahishishi4hihsid123418id',
'json' => [
'insured_name_list' => ['tCk1JSUV2QUlCQURBTkJna3Foa2lHOXc'],
'insurance_name' => '微医保·百万医疗险',
'effective_time' => '2025-09-21T17:11:12+08:00',
'expired_time' => '2025-09-21T17:11:12+08:00',
'coverage_detail' => '可保190种疾病,确诊一次性赔付',
'support_renewal' => true,
'start_renewal_time' => '2025-09-21T17:11:12+08:00',
'end_renewal_time' => '2025-09-21T17:11:12+08:00',
'policy_type' => 'POLICY_TYPE_OTHER',
'car_number' => '粤B·AB123',
'pet_name' => '小狗',
'address' => '上海市浦东新区晨晖路1001号',
'policy_state' => 'POLICY_STATE_ISSUING',
'policy_code' => 'Coisihsiaxishishi4hihsid1ii411co',
'plan_id' => 12535,
'out_contract_code' => 'wxwtdk20200910100000',
'policy_periods' => [1],
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
]);
print_r(json_decode((string) $response->getBody(), true));| 返回字典 | 类型 | 描述 |
|---|---|---|
| out_insurance_no | string | 商户保险编号 |
| insurance_name | string | 保险名称 |
| insured_name_list | string[] | 被保险人姓名列表 |
| insurance_company_code | string | 承保公司代码 |
| effective_time | string | 保单生效时间 |
| expired_time | string | 保单失效时间 |
| coverage_detail | string | 保障详情 |
| support_renewal | boolean | 是否支持续保 |
| start_renewal_time | string | 可续保开始时间 |
| end_renewal_time | string | 可续保结束时间 |
| policy_type | string | 保单类型POLICY_TYPE_OTHER | POLICY_TYPE_MEDICAL | POLICY_TYPE_ACCIDENT | POLICY_TYPE_CRITICAL | POLICY_TYPE_CAR | POLICY_TYPE_LIFE | POLICY_TYPE_PROPERTY | POLICY_TYPE_PET | POLICY_TYPE_ANNUITY 枚举值之一 |
| car_number | string | 车牌信息 |
| pet_name | string | 宠物名称 |
| address | string | 地址信息 |
| policy_state | string | 保单状态POLICY_STATE_ISSUING | POLICY_STATE_APPROVED | POLICY_STATE_DECLINED | POLICY_STATE_INACTIVE 枚举值之一 |
| policy_code | string | 保司保单号 |
| plan_id | number | 委托代扣模板ID |
| out_contract_code | string | 商户签约协议号 |
| policy_periods | number[] | 保单的扣费周期列表 |
参阅 官方文档