Skip to content

sn码锁定

用户支付成功后,在具体的3c商品出库时要调用此接口锁定sn。如果sn被使用过了,就要解锁。

请求参数类型描述
jsonobject声明请求的JSON数据结构
appliance_idnumber消费品类ID
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 枚举值之一
out_trade_nostring商户支付订单号
brandstring家电品牌
qualification_region_codenumber使用的资格的地区编码
sn_codestringS/N码
manufacturer_infostring厂商信息
barcodestring商品条码
spec_modelstring规格型号
product_typestring产品类型
COMMON_PRODUCT | AI_PRODUCT 枚举值之一
sale_timestring销售时间
imei1stringimei1编码
imei2stringimei2编码
php
$instance->v3->gov->subsidy->sncode->lock->postAsync([
  'json' => [
    'appliance_id'              => 1,
    'out_trade_no'              => 'vmall_250120131959_993_4494',
    'brand'                     => '海尔',
    'qualification_region_code' => 310100,
    'sn_code'                   => 'fallervuh',
    'manufacturer_info'         => '',
    'barcode'                   => '6901010101098',
    'spec_model'                => 'YOGA Air 15s ILL9',
    'product_type'              => 'COMMON_PRODUCT',
    'sale_time'                 => '2025-01-14T19:55:06+08:00',
    'imei1'                     => '358882046176540',
    'imei2'                     => '358882046176540',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/gov/subsidy/sncode/lock')->postAsync([
  'json' => [
    'appliance_id'              => 1,
    'out_trade_no'              => 'vmall_250120131959_993_4494',
    'brand'                     => '海尔',
    'qualification_region_code' => 310100,
    'sn_code'                   => 'fallervuh',
    'manufacturer_info'         => '',
    'barcode'                   => '6901010101098',
    'spec_model'                => 'YOGA Air 15s ILL9',
    'product_type'              => 'COMMON_PRODUCT',
    'sale_time'                 => '2025-01-14T19:55:06+08:00',
    'imei1'                     => '358882046176540',
    'imei2'                     => '358882046176540',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/gov/subsidy/sncode/lock']->postAsync([
  'json' => [
    'appliance_id'              => 1,
    'out_trade_no'              => 'vmall_250120131959_993_4494',
    'brand'                     => '海尔',
    'qualification_region_code' => 310100,
    'sn_code'                   => 'fallervuh',
    'manufacturer_info'         => '',
    'barcode'                   => '6901010101098',
    'spec_model'                => 'YOGA Air 15s ILL9',
    'product_type'              => 'COMMON_PRODUCT',
    'sale_time'                 => '2025-01-14T19:55:06+08:00',
    'imei1'                     => '358882046176540',
    'imei2'                     => '358882046176540',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->gov->subsidy->sncode->lock->post([
  'json' => [
    'appliance_id'              => 1,
    'out_trade_no'              => 'vmall_250120131959_993_4494',
    'brand'                     => '海尔',
    'qualification_region_code' => 310100,
    'sn_code'                   => 'fallervuh',
    'manufacturer_info'         => '',
    'barcode'                   => '6901010101098',
    'spec_model'                => 'YOGA Air 15s ILL9',
    'product_type'              => 'COMMON_PRODUCT',
    'sale_time'                 => '2025-01-14T19:55:06+08:00',
    'imei1'                     => '358882046176540',
    'imei2'                     => '358882046176540',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/gov/subsidy/sncode/lock')->post([
  'json' => [
    'appliance_id'              => 1,
    'out_trade_no'              => 'vmall_250120131959_993_4494',
    'brand'                     => '海尔',
    'qualification_region_code' => 310100,
    'sn_code'                   => 'fallervuh',
    'manufacturer_info'         => '',
    'barcode'                   => '6901010101098',
    'spec_model'                => 'YOGA Air 15s ILL9',
    'product_type'              => 'COMMON_PRODUCT',
    'sale_time'                 => '2025-01-14T19:55:06+08:00',
    'imei1'                     => '358882046176540',
    'imei2'                     => '358882046176540',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/gov/subsidy/sncode/lock']->post([
  'json' => [
    'appliance_id'              => 1,
    'out_trade_no'              => 'vmall_250120131959_993_4494',
    'brand'                     => '海尔',
    'qualification_region_code' => 310100,
    'sn_code'                   => 'fallervuh',
    'manufacturer_info'         => '',
    'barcode'                   => '6901010101098',
    'spec_model'                => 'YOGA Air 15s ILL9',
    'product_type'              => 'COMMON_PRODUCT',
    'sale_time'                 => '2025-01-14T19:55:06+08:00',
    'imei1'                     => '358882046176540',
    'imei2'                     => '358882046176540',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
codestring响应码
messagestring响应描述

参阅 官方文档

Published on the GitHub by TheNorthMemory