Skip to content

修改批次预算

商户可以通过该接口修改批次单天发放上限数量或者批次最大发放数量

请求参数类型描述
stock_idstring批次号
jsonobject声明请求的JSON数据结构
target_max_couponsinteger目标批次最大发放个数
target_max_coupons_by_dayinteger目标单天发放上限个数
current_max_couponsinteger当前批次最大发放个数
current_max_coupons_by_dayinteger当前单天发放上限个数
modify_budget_request_nostring修改预算请求单据号
php
$instance->v3->marketing->busifavor->stocks->_stock_id_->budget->patchAsync([
  'stock_id' => '98065001',
  'json' => [
    'target_max_coupons'         => 3000,
    'target_max_coupons_by_day'  => 0,
    'current_max_coupons'        => 500,
    'current_max_coupons_by_day' => 300,
    'modify_budget_request_no'   => '1002600620019090123143254436',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/busifavor/stocks/{stock_id}/budget')->patchAsync([
  'stock_id' => '98065001',
  'json' => [
    'target_max_coupons'         => 3000,
    'target_max_coupons_by_day'  => 0,
    'current_max_coupons'        => 500,
    'current_max_coupons_by_day' => 300,
    'modify_budget_request_no'   => '1002600620019090123143254436',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/busifavor/stocks/{stock_id}/budget']->patchAsync([
  'stock_id' => '98065001',
  'json' => [
    'target_max_coupons'         => 3000,
    'target_max_coupons_by_day'  => 0,
    'current_max_coupons'        => 500,
    'current_max_coupons_by_day' => 300,
    'modify_budget_request_no'   => '1002600620019090123143254436',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->busifavor->stocks->_stock_id_->budget->patch([
  'stock_id' => '98065001',
  'json' => [
    'target_max_coupons'         => 3000,
    'target_max_coupons_by_day'  => 0,
    'current_max_coupons'        => 500,
    'current_max_coupons_by_day' => 300,
    'modify_budget_request_no'   => '1002600620019090123143254436',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/busifavor/stocks/{stock_id}/budget')->patch([
  'stock_id' => '98065001',
  'json' => [
    'target_max_coupons'         => 3000,
    'target_max_coupons_by_day'  => 0,
    'current_max_coupons'        => 500,
    'current_max_coupons_by_day' => 300,
    'modify_budget_request_no'   => '1002600620019090123143254436',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/busifavor/stocks/{stock_id}/budget']->patch([
  'stock_id' => '98065001',
  'json' => [
    'target_max_coupons'         => 3000,
    'target_max_coupons_by_day'  => 0,
    'current_max_coupons'        => 500,
    'current_max_coupons_by_day' => 300,
    'modify_budget_request_no'   => '1002600620019090123143254436',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
max_couponsinteger批次当前最大发放个数
max_coupons_by_dayinteger当前单天发放上限个数

参阅 官方文档

Published on the GitHub by TheNorthMemory