Skip to content

创建投放计划

创建投放计划

请求参数类型描述
jsonobject声明请求的JSON数据结构
out_request_nostring创建请求单号
brand_idstring创建投放计划的品牌ID
product_coupon_idstring商品券ID
stock_idstring批次ID
plan_namestring投放计划名称
total_countinteger总库存
user_limitinteger单用户限领
daily_limitinteger单日限领
delivery_start_timestring开始可用时间
delivery_end_timestring结束可用时间
recommend_wordstring营销标签
php
$instance->v3->marketing->partner->deliveryPlan->deliveryPlans->postAsync([
  'json' => [
    'out_request_no'      => 'asdf-1234-40016',
    'brand_id'            => '40016',
    'product_coupon_id'   => '701146876221757924829193824428',
    'stock_id'            => '701246876221757924829194755312',
    'plan_name'           => '冬季饮料投放',
    'total_count'         => 1,
    'user_limit'          => 1,
    'daily_limit'         => 1,
    'delivery_start_time' => '2025-01-01T00:00:00+08:00',
    'delivery_end_time'   => '2025-01-01T00:00:00+08:00',
    'recommend_word'      => '天天有惊喜',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/partner/delivery-plan/delivery-plans')->postAsync([
  'json' => [
    'out_request_no'      => 'asdf-1234-40016',
    'brand_id'            => '40016',
    'product_coupon_id'   => '701146876221757924829193824428',
    'stock_id'            => '701246876221757924829194755312',
    'plan_name'           => '冬季饮料投放',
    'total_count'         => 1,
    'user_limit'          => 1,
    'daily_limit'         => 1,
    'delivery_start_time' => '2025-01-01T00:00:00+08:00',
    'delivery_end_time'   => '2025-01-01T00:00:00+08:00',
    'recommend_word'      => '天天有惊喜',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/partner/delivery-plan/delivery-plans']->postAsync([
  'json' => [
    'out_request_no'      => 'asdf-1234-40016',
    'brand_id'            => '40016',
    'product_coupon_id'   => '701146876221757924829193824428',
    'stock_id'            => '701246876221757924829194755312',
    'plan_name'           => '冬季饮料投放',
    'total_count'         => 1,
    'user_limit'          => 1,
    'daily_limit'         => 1,
    'delivery_start_time' => '2025-01-01T00:00:00+08:00',
    'delivery_end_time'   => '2025-01-01T00:00:00+08:00',
    'recommend_word'      => '天天有惊喜',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->partner->deliveryPlan->deliveryPlans->post([
  'json' => [
    'out_request_no'      => 'asdf-1234-40016',
    'brand_id'            => '40016',
    'product_coupon_id'   => '701146876221757924829193824428',
    'stock_id'            => '701246876221757924829194755312',
    'plan_name'           => '冬季饮料投放',
    'total_count'         => 1,
    'user_limit'          => 1,
    'daily_limit'         => 1,
    'delivery_start_time' => '2025-01-01T00:00:00+08:00',
    'delivery_end_time'   => '2025-01-01T00:00:00+08:00',
    'recommend_word'      => '天天有惊喜',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/partner/delivery-plan/delivery-plans')->post([
  'json' => [
    'out_request_no'      => 'asdf-1234-40016',
    'brand_id'            => '40016',
    'product_coupon_id'   => '701146876221757924829193824428',
    'stock_id'            => '701246876221757924829194755312',
    'plan_name'           => '冬季饮料投放',
    'total_count'         => 1,
    'user_limit'          => 1,
    'daily_limit'         => 1,
    'delivery_start_time' => '2025-01-01T00:00:00+08:00',
    'delivery_end_time'   => '2025-01-01T00:00:00+08:00',
    'recommend_word'      => '天天有惊喜',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/partner/delivery-plan/delivery-plans']->post([
  'json' => [
    'out_request_no'      => 'asdf-1234-40016',
    'brand_id'            => '40016',
    'product_coupon_id'   => '701146876221757924829193824428',
    'stock_id'            => '701246876221757924829194755312',
    'plan_name'           => '冬季饮料投放',
    'total_count'         => 1,
    'user_limit'          => 1,
    'daily_limit'         => 1,
    'delivery_start_time' => '2025-01-01T00:00:00+08:00',
    'delivery_end_time'   => '2025-01-01T00:00:00+08:00',
    'recommend_word'      => '天天有惊喜',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
planobject投放计划详情
plan_idstring投放计划ID
plan_namestring投放计划名称
plan_statestring投放计划状态
PLAN_CREATING | PLAN_CREATED | PLAN_TERMINATING | PLAN_TERMINATED | PLAN_EXPIRED | PLAN_DELIVERING | PLAN_PAUSED 枚举值之一
delivery_start_timestring开始可用时间
delivery_end_timestring结束可用时间
stock_idstring批次ID
product_coupon_idstring商品券ID
recommend_wordstring营销标签
brand_idstring品牌ID
total_countinteger总库存
user_limitinteger单用户限领
daily_limitinteger单日限领

参阅 官方文档

Published on the GitHub by TheNorthMemory