Skip to content

对指定商户管理记录提交资料

通过调用该接口可用于提交指定商户的管理记录要求的资料

请求参数类型描述
manage_record_idstring商户管理记录ID
jsonobject声明请求的JSON数据结构
sub_mchidstring子商户号
submit_datastring商户提交资料内容
record_fieldsobject[]资料项集合
item_idstring资料项ID
field_namestring资料项英文名
namestring资料项中文名
typenumber资料项类型
1 | 2 | 3 | 4 | 5 | 6 枚举值之一
repeated_field_datastring补充资料项多值JSON格式
field_dataobject[]补充资料项
longitudestring经度值
latitudestring纬度值
provincestring省份
citystring城市
areastring区域
streetstring街道
addressstring详细地址
namestring地址名
wechat_order_idstring微信支付订单号
merchant_order_idstring商户订单号
trade_timestring交易时间+08:00东八区时间
trade_money_amountstring交易金额
trade_goodsstring调单商品
logistic_flagnumber是否物流
0 | 1 枚举值之一
evidence_img_liststring[]凭证图片信息
tipsstring资料项填写提示
placeholderstring输入框占位文案
tooltipstring叹号悬浮提示语
requirednumber是否必须提交
0 | 1 枚举值之一
need_encryptboolean提交内容需要加密
string_check_ruleobject字符串校验规则
min_string_lengthnumber字符串最小长度
max_string_lengthnumber字符串最大长度
validatorstring校验规则
number | phone | idcard | url | email 枚举值之一
enum_check_ruleobject枚举校验规则
min_list_lengthnumber最小列表长度
max_list_lengthnumber最大列表长度
enum_valuesstring[]展示给商户看的枚举可选的字段列表
file_check_ruleobject文件校验规则
min_list_lengthnumber最小列表长度
max_list_lengthnumber最大列表长度
enum_file_extsstring[]限制提交的文件后缀
png | jpg | jpeg | mp4 | avi | mov | wmv | pdf | doc | docx | csv | xlsx 枚举值之一
max_file_sizenumber限制文件提交大小,单位M
time_interval_check_ruleobject时间区间校验规则
min_list_lengthnumber最小列表长度
max_list_lengthnumber最大列表长度
order_interval_check_ruleobject订单类型校验规则
min_list_lengthnumber最小列表长度
max_list_lengthnumber最大列表长度
enum_file_extsstring[]限制提交的文件后缀
png | jpg | jpeg | mp4 | avi | mov | wmv | pdf | doc | docx | csv | xlsx 枚举值之一
max_file_sizenumber限制文件提交大小,单位M
relationsobject[]资料项关联规则集合
(不同资料项ID取交集,相同资料项ID不同资料项值取并集)
source_keynumber关联的资料项ID
source_valuestring关联的资料项值
php
$instance->v3->mchManage->mchManageRecords->_manage_record_id_->mchManageSubmissions->postAsync([
  'manage_record_id' => 'M1210999900435123451697535102441',
  'json' => [
    'sub_mchid'   => '123000110',
    'submit_data' => \json_encode([
      'record_fields' => [[
        'item_id'                   => '',
        'field_name'                => '',
        'name'                      => '',
        'type'                      => 0,
        'repeated_field_data'       => \json_encode([[
          'longitude'          => '',
          'latitude'           => '',
          'province'           => '',
          'city'               => '',
          'area'               => '',
          'street'             => '',
          'address'            => '',
          'name'               => '',
          'wechat_order_id'    => '',
          'merchant_order_id'  => '',
          'trade_time'         => '',
          'trade_money_amount' => '',
          'trade_goods'        => '',
          'logistic_flag'      => 0,
          'evidence_img_list'  => ['凭证图片1'],
        ],]),
        'tips'                      => '',
        'placeholder'               => '',
        'tooltip'                   => '',
        'required'                  => 0,
        'need_encrypt'              => true,
        'string_check_rule'         => [
          'min_string_length' => 0,
          'max_string_length' => 0,
          'validator'         => 'number',
        ],
        'enum_check_rule'           => [
          'min_list_length' => 0,
          'max_list_length' => 0,
          'enum_values'     => ['string'],
        ],
        'file_check_rule'           => [
          'min_list_length' => 0,
          'max_list_length' => 0,
          'enum_file_exts'  => ['png'],
          'max_file_size'   => 0,
        ],
        'time_interval_check_rule'  => [
          'min_list_length' => 2,
          'max_list_length' => 2,
        ],
        'order_interval_check_rule' => [
          'min_list_length' => 0,
          'max_list_length' => 0,
          'enum_file_exts'  => ['png'],
          'max_file_size'   => 0,
        ],
        'relations'                 => [[
          'source_key'   => 0,
          'source_value' => '',
        ],],
      ],],
    ]),
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/mch-manage/mch-manage-records/{manage_record_id}/mch-manage-submissions')->postAsync([
  'manage_record_id' => 'M1210999900435123451697535102441',
  'json' => [
    'sub_mchid'   => '123000110',
    'submit_data' => \json_encode([
      'record_fields' => [[
        'item_id'                   => '',
        'field_name'                => '',
        'name'                      => '',
        'type'                      => 0,
        'repeated_field_data'       => \json_encode([[
          'longitude'          => '',
          'latitude'           => '',
          'province'           => '',
          'city'               => '',
          'area'               => '',
          'street'             => '',
          'address'            => '',
          'name'               => '',
          'wechat_order_id'    => '',
          'merchant_order_id'  => '',
          'trade_time'         => '',
          'trade_money_amount' => '',
          'trade_goods'        => '',
          'logistic_flag'      => 0,
          'evidence_img_list'  => ['凭证图片1'],
        ],]),
        'tips'                      => '',
        'placeholder'               => '',
        'tooltip'                   => '',
        'required'                  => 0,
        'need_encrypt'              => true,
        'string_check_rule'         => [
          'min_string_length' => 0,
          'max_string_length' => 0,
          'validator'         => 'number',
        ],
        'enum_check_rule'           => [
          'min_list_length' => 0,
          'max_list_length' => 0,
          'enum_values'     => ['string'],
        ],
        'file_check_rule'           => [
          'min_list_length' => 0,
          'max_list_length' => 0,
          'enum_file_exts'  => ['png'],
          'max_file_size'   => 0,
        ],
        'time_interval_check_rule'  => [
          'min_list_length' => 2,
          'max_list_length' => 2,
        ],
        'order_interval_check_rule' => [
          'min_list_length' => 0,
          'max_list_length' => 0,
          'enum_file_exts'  => ['png'],
          'max_file_size'   => 0,
        ],
        'relations'                 => [[
          'source_key'   => 0,
          'source_value' => '',
        ],],
      ],],
    ]),
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/mch-manage/mch-manage-records/{manage_record_id}/mch-manage-submissions']->postAsync([
  'manage_record_id' => 'M1210999900435123451697535102441',
  'json' => [
    'sub_mchid'   => '123000110',
    'submit_data' => \json_encode([
      'record_fields' => [[
        'item_id'                   => '',
        'field_name'                => '',
        'name'                      => '',
        'type'                      => 0,
        'repeated_field_data'       => \json_encode([[
          'longitude'          => '',
          'latitude'           => '',
          'province'           => '',
          'city'               => '',
          'area'               => '',
          'street'             => '',
          'address'            => '',
          'name'               => '',
          'wechat_order_id'    => '',
          'merchant_order_id'  => '',
          'trade_time'         => '',
          'trade_money_amount' => '',
          'trade_goods'        => '',
          'logistic_flag'      => 0,
          'evidence_img_list'  => ['凭证图片1'],
        ],]),
        'tips'                      => '',
        'placeholder'               => '',
        'tooltip'                   => '',
        'required'                  => 0,
        'need_encrypt'              => true,
        'string_check_rule'         => [
          'min_string_length' => 0,
          'max_string_length' => 0,
          'validator'         => 'number',
        ],
        'enum_check_rule'           => [
          'min_list_length' => 0,
          'max_list_length' => 0,
          'enum_values'     => ['string'],
        ],
        'file_check_rule'           => [
          'min_list_length' => 0,
          'max_list_length' => 0,
          'enum_file_exts'  => ['png'],
          'max_file_size'   => 0,
        ],
        'time_interval_check_rule'  => [
          'min_list_length' => 2,
          'max_list_length' => 2,
        ],
        'order_interval_check_rule' => [
          'min_list_length' => 0,
          'max_list_length' => 0,
          'enum_file_exts'  => ['png'],
          'max_file_size'   => 0,
        ],
        'relations'                 => [[
          'source_key'   => 0,
          'source_value' => '',
        ],],
      ],],
    ]),
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->mchManage->mchManageRecords->_manage_record_id_->mchManageSubmissions->post([
  'manage_record_id' => 'M1210999900435123451697535102441',
  'json' => [
    'sub_mchid'   => '123000110',
    'submit_data' => \json_encode([
      'record_fields' => [[
        'item_id'                   => '',
        'field_name'                => '',
        'name'                      => '',
        'type'                      => 0,
        'repeated_field_data'       => \json_encode([[
          'longitude'          => '',
          'latitude'           => '',
          'province'           => '',
          'city'               => '',
          'area'               => '',
          'street'             => '',
          'address'            => '',
          'name'               => '',
          'wechat_order_id'    => '',
          'merchant_order_id'  => '',
          'trade_time'         => '',
          'trade_money_amount' => '',
          'trade_goods'        => '',
          'logistic_flag'      => 0,
          'evidence_img_list'  => ['凭证图片1'],
        ],]),
        'tips'                      => '',
        'placeholder'               => '',
        'tooltip'                   => '',
        'required'                  => 0,
        'need_encrypt'              => true,
        'string_check_rule'         => [
          'min_string_length' => 0,
          'max_string_length' => 0,
          'validator'         => 'number',
        ],
        'enum_check_rule'           => [
          'min_list_length' => 0,
          'max_list_length' => 0,
          'enum_values'     => ['string'],
        ],
        'file_check_rule'           => [
          'min_list_length' => 0,
          'max_list_length' => 0,
          'enum_file_exts'  => ['png'],
          'max_file_size'   => 0,
        ],
        'time_interval_check_rule'  => [
          'min_list_length' => 2,
          'max_list_length' => 2,
        ],
        'order_interval_check_rule' => [
          'min_list_length' => 0,
          'max_list_length' => 0,
          'enum_file_exts'  => ['png'],
          'max_file_size'   => 0,
        ],
        'relations'                 => [[
          'source_key'   => 0,
          'source_value' => '',
        ],],
      ],],
    ]),
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/mch-manage/mch-manage-records/{manage_record_id}/mch-manage-submissions')->post([
  'manage_record_id' => 'M1210999900435123451697535102441',
  'json' => [
    'sub_mchid'   => '123000110',
    'submit_data' => \json_encode([
      'record_fields' => [[
        'item_id'                   => '',
        'field_name'                => '',
        'name'                      => '',
        'type'                      => 0,
        'repeated_field_data'       => \json_encode([[
          'longitude'          => '',
          'latitude'           => '',
          'province'           => '',
          'city'               => '',
          'area'               => '',
          'street'             => '',
          'address'            => '',
          'name'               => '',
          'wechat_order_id'    => '',
          'merchant_order_id'  => '',
          'trade_time'         => '',
          'trade_money_amount' => '',
          'trade_goods'        => '',
          'logistic_flag'      => 0,
          'evidence_img_list'  => ['凭证图片1'],
        ],]),
        'tips'                      => '',
        'placeholder'               => '',
        'tooltip'                   => '',
        'required'                  => 0,
        'need_encrypt'              => true,
        'string_check_rule'         => [
          'min_string_length' => 0,
          'max_string_length' => 0,
          'validator'         => 'number',
        ],
        'enum_check_rule'           => [
          'min_list_length' => 0,
          'max_list_length' => 0,
          'enum_values'     => ['string'],
        ],
        'file_check_rule'           => [
          'min_list_length' => 0,
          'max_list_length' => 0,
          'enum_file_exts'  => ['png'],
          'max_file_size'   => 0,
        ],
        'time_interval_check_rule'  => [
          'min_list_length' => 2,
          'max_list_length' => 2,
        ],
        'order_interval_check_rule' => [
          'min_list_length' => 0,
          'max_list_length' => 0,
          'enum_file_exts'  => ['png'],
          'max_file_size'   => 0,
        ],
        'relations'                 => [[
          'source_key'   => 0,
          'source_value' => '',
        ],],
      ],],
    ]),
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/mch-manage/mch-manage-records/{manage_record_id}/mch-manage-submissions']->post([
  'manage_record_id' => 'M1210999900435123451697535102441',
  'json' => [
    'sub_mchid'   => '123000110',
    'submit_data' => \json_encode([
      'record_fields' => [[
        'item_id'                   => '',
        'field_name'                => '',
        'name'                      => '',
        'type'                      => 0,
        'repeated_field_data'       => \json_encode([[
          'longitude'          => '',
          'latitude'           => '',
          'province'           => '',
          'city'               => '',
          'area'               => '',
          'street'             => '',
          'address'            => '',
          'name'               => '',
          'wechat_order_id'    => '',
          'merchant_order_id'  => '',
          'trade_time'         => '',
          'trade_money_amount' => '',
          'trade_goods'        => '',
          'logistic_flag'      => 0,
          'evidence_img_list'  => ['凭证图片1'],
        ],]),
        'tips'                      => '',
        'placeholder'               => '',
        'tooltip'                   => '',
        'required'                  => 0,
        'need_encrypt'              => true,
        'string_check_rule'         => [
          'min_string_length' => 0,
          'max_string_length' => 0,
          'validator'         => 'number',
        ],
        'enum_check_rule'           => [
          'min_list_length' => 0,
          'max_list_length' => 0,
          'enum_values'     => ['string'],
        ],
        'file_check_rule'           => [
          'min_list_length' => 0,
          'max_list_length' => 0,
          'enum_file_exts'  => ['png'],
          'max_file_size'   => 0,
        ],
        'time_interval_check_rule'  => [
          'min_list_length' => 2,
          'max_list_length' => 2,
        ],
        'order_interval_check_rule' => [
          'min_list_length' => 0,
          'max_list_length' => 0,
          'enum_file_exts'  => ['png'],
          'max_file_size'   => 0,
        ],
        'relations'                 => [[
          'source_key'   => 0,
          'source_value' => '',
        ],],
      ],],
    ]),
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
manage_submission_idstring商户管理提交资料记录ID

参阅 官方文档

Published on the GitHub by TheNorthMemory