Skip to content

生成小店活动物料码

该接口为服务商或商户给零售小店活动申请物料码专用接口。 使用对象:品牌的品牌主商户号或品牌服务商。

请求参数类型描述
brand_idstring品牌ID
jsonobject声明请求的JSON数据结构
out_request_nostring请求业务单据
material_numnumber生成物料码数量
php
$instance->v3->marketing->goodsSubsidyActivity->retailStoreAct->_brand_id_->materials->postAsync([
  'brand_id' => '1001',
  'json' => [
    'out_request_no' => '1002600620019090123143254436',
    'material_num' => 100,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/goods-subsidy-activity/retail-store-act/{brand_id}/materials')->postAsync([
  'brand_id' => '1001',
  'json' => [
    'out_request_no' => '1002600620019090123143254436',
    'material_num' => 100,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/goods-subsidy-activity/retail-store-act/{brand_id}/materials']->postAsync([
  'brand_id' => '1001',
  'json' => [
    'out_request_no' => '1002600620019090123143254436',
    'material_num' => 100,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->goodsSubsidyActivity->retailStoreAct->_brand_id_->materials->post([
  'brand_id' => '1001',
  'json' => [
    'out_request_no' => '1002600620019090123143254436',
    'material_num' => 100,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/goods-subsidy-activity/retail-store-act/{brand_id}/materials')->post([
  'brand_id' => '1001',
  'json' => [
    'out_request_no' => '1002600620019090123143254436',
    'material_num' => 100,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/goods-subsidy-activity/retail-store-act/{brand_id}/materials']->post([
  'brand_id' => '1001',
  'json' => [
    'out_request_no' => '1002600620019090123143254436',
    'material_num' => 100,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
material_listobject[]成功的物料码列表
material_idstring物料码ID
material_urlstring物料码链接

参阅 官方文档

Published on the GitHub by TheNorthMemory