查询sn码状态
查询sn码是否被使用了,可以在支付后,3c商品出库前查询,当然不查询直接调用后面的sn锁定也可以。
| 请求参数 | 类型 | 描述 |
|---|---|---|
| json | object | 声明请求的JSON数据结构 |
| sn_code_list | string[] | S/N码集合 |
| qualification_region_code | number | 使用的资格的地区编码 |
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_list | object[] | sn码状态数组 |
| sn_code | string | S/N码 |
| state | string | 状态SNCODE_STATE_UNKNOWN | SNCODE_STATE_SELLABLE | SNCODE_STATE_NOT_SELLABLE 枚举值之一 |
| not_sellable_reason | string | 不可售的原因NOT_SELLABLE_REASON_USED | NOT_SELLABLE_REASON_NOT_FOUND 枚举值之一 |
参阅 官方文档