修改批次预算
商户可以通过该接口修改批次单天发放上限数量或者批次最大发放数量
请求参数 | 类型 | 描述 |
---|---|---|
stock_id | string | 批次号 |
json | object | 声明请求的JSON 数据结构 |
target_max_coupons | integer | 目标批次最大发放个数 |
target_max_coupons_by_day | integer | 目标单天发放上限个数 |
current_max_coupons | integer | 当前批次最大发放个数 |
current_max_coupons_by_day | integer | 当前单天发放上限个数 |
modify_budget_request_no | string | 修改预算请求单据号 |
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_coupons | integer | 批次当前最大发放个数 |
max_coupons_by_day | integer | 当前单天发放上限个数 |
参阅 官方文档