批次取消关联门店
品牌方可以通过该接口取消品牌的门店列表与商品券批次的关联关系 前置条件:已创建商品券批次且批次的 store_scope 为 SPECIFIC
请求参数 | 类型 | 描述 |
---|---|---|
product_coupon_id | string | 商品券ID |
stock_id | string | 批次ID |
json | object | 声明请求的JSON 数据结构 |
brand_id | string | 品牌ID |
store_list | object[] | 门店列表 |
store_id | string | 门店ID |
php
$instance->v3->marketing->partner->productCoupon->productCoupons->_product_coupon_id_->stocks->_stock_id_->disassociateStores->postAsync([
'product_coupon_id' => '1000000013',
'stock_id' => '1000000013001',
'json' => [
'brand_id' => '120344',
'store_list' => [[
'store_id' => '100000001',
],],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/partner/product-coupon/product-coupons/{product_coupon_id}/stocks/{stock_id}/disassociate-stores')->postAsync([
'product_coupon_id' => '1000000013',
'stock_id' => '1000000013001',
'json' => [
'brand_id' => '120344',
'store_list' => [[
'store_id' => '100000001',
],],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/partner/product-coupon/product-coupons/{product_coupon_id}/stocks/{stock_id}/disassociate-stores']->postAsync([
'product_coupon_id' => '1000000013',
'stock_id' => '1000000013001',
'json' => [
'brand_id' => '120344',
'store_list' => [[
'store_id' => '100000001',
],],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->partner->productCoupon->productCoupons->_product_coupon_id_->stocks->_stock_id_->disassociateStores->post([
'product_coupon_id' => '1000000013',
'stock_id' => '1000000013001',
'json' => [
'brand_id' => '120344',
'store_list' => [[
'store_id' => '100000001',
],],
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/partner/product-coupon/product-coupons/{product_coupon_id}/stocks/{stock_id}/disassociate-stores')->post([
'product_coupon_id' => '1000000013',
'stock_id' => '1000000013001',
'json' => [
'brand_id' => '120344',
'store_list' => [[
'store_id' => '100000001',
],],
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/partner/product-coupon/product-coupons/{product_coupon_id}/stocks/{stock_id}/disassociate-stores']->post([
'product_coupon_id' => '1000000013',
'stock_id' => '1000000013001',
'json' => [
'brand_id' => '120344',
'store_list' => [[
'store_id' => '100000001',
],],
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
total_count | integer | 去重后门店总数 |
success_store_list | object[] | 取消关联成功的门店列表 |
store_id | string | 门店ID |
failed_store_list | object[] | 取消关联失败的门店列表 |
store_id | string | 门店ID |
code | string | 失败错误码 |
message | string | 失败错误信息 |
参阅 官方文档