Skip to content

批次取消关联门店

品牌方可以通过该接口取消品牌的门店列表与商品券批次的关联关系 前置条件:已创建商品券批次且批次的 store_scope 为 SPECIFIC

请求参数类型描述
product_coupon_idstring商品券ID
stock_idstring批次ID
jsonobject声明请求的JSON数据结构
brand_idstring品牌ID
store_listobject[]门店列表
store_idstring门店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_countinteger去重后门店总数
success_store_listobject[]取消关联成功的门店列表
store_idstring门店ID
failed_store_listobject[]取消关联失败的门店列表
store_idstring门店ID
codestring失败错误码
messagestring失败错误信息

参阅 官方文档

Published on the GitHub by TheNorthMemory