Skip to content

查询sn码状态

查询sn码是否被使用了,可以在支付后,3c商品出库前查询,当然不查询直接调用后面的sn锁定也可以。

请求参数类型描述
jsonobject声明请求的JSON数据结构
sn_code_liststring[]S/N码集合
qualification_region_codenumber使用的资格的地区编码
php
$instance->v3->gov->subsidy->sncode->query->postAsync([
  'json' => [
    'sn_code_list'              => ['9CC0AC186027'],
    'qualification_region_code' => 310100,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/gov/subsidy/sncode/query')->postAsync([
  'json' => [
    'sn_code_list'              => ['9CC0AC186027'],
    'qualification_region_code' => 310100,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/gov/subsidy/sncode/query']->postAsync([
  'json' => [
    'sn_code_list'              => ['9CC0AC186027'],
    'qualification_region_code' => 310100,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->gov->subsidy->sncode->query->post([
  'json' => [
    'sn_code_list'              => ['9CC0AC186027'],
    'qualification_region_code' => 310100,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/gov/subsidy/sncode/query')->post([
  'json' => [
    'sn_code_list'              => ['9CC0AC186027'],
    'qualification_region_code' => 310100,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/gov/subsidy/sncode/query']->post([
  'json' => [
    'sn_code_list'              => ['9CC0AC186027'],
    'qualification_region_code' => 310100,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
goods_sn_listobject[]sn码状态数组
sn_codestringS/N码
statestring状态
SNCODE_STATE_UNKNOWN | SNCODE_STATE_SELLABLE | SNCODE_STATE_NOT_SELLABLE 枚举值之一
not_sellable_reasonstring不可售的原因
NOT_SELLABLE_REASON_USED | NOT_SELLABLE_REASON_NOT_FOUND 枚举值之一

参阅 官方文档

Published on the GitHub by TheNorthMemory