Skip to content

创建全场满额送活动

商户可以创建满额送活动,用户支付后送全场券,提升交易额。

请求参数类型描述
jsonobject声明请求的JSON数据结构
activity_base_infoobject活动基本信息
activity_namestring活动名称
activity_second_titlestring活动副标题
merchant_logo_urlstring商户logo
background_colorstring背景颜色
Color010 | Color020 | Color030 | Color040 | Color050 | Color060 | Color070 | Color080 | Color090 | Color100 枚举值之一
begin_timestring活动开始时间
end_timestring活动结束时间
available_periodsobject可用时间段
available_timeobject[]可用时间
begin_timestring可用开始时间
end_timestring可用结束时间
available_day_timeobject[]每日可用时间
begin_day_timestring每日可用开始时间
end_day_timestring每日可用结束时间
out_request_nostring商户请求单号
delivery_purposestring投放目的
OFF_LINE_PAY | JUMP_MINI_APP 枚举值之一
mini_programs_appidstring商家小程序appid
mini_programs_pathstring商家小程序path
advanced_settingobject活动高级设置
delivery_user_categorystring奖品类型
BUSIFAVOR 枚举值
merchant_member_appidstring商家会员appid
payment_modeobject支付模式
payment_scene_liststring[]支付场景列表
APP_SCENE 枚举值
payment_method_informationobject支付方式信息
payment_methodstring支付方式
CFT | SPECIFIC_BANK_CARD 枚举值之一
bank_abbreviationstring银行简称
goods_tagsstring[]订单优惠标记
award_send_ruleobject活动奖品发放规则
award_typestring奖品类型
BUSIFAVOR 枚举值
merchant_optionstring发券商户号选项
IN_SEVICE_COUPON_MERCHANT | MANUAL_INPUT_MERCHANT 枚举值之一
transaction_amount_minimuminteger消费金额门槛
send_contentstring发放内容
SINGLE_COUPON | GIFT_PACKAGE 枚举值之一
award_listobject[]奖品基本信息列表
stock_idstring代金券批次Id
original_image_urlstring奖品原始图(大图)
thumbnail_urlstring奖品缩略图(小图)
merchant_id_liststring[]发券商户号列表
php
$instance->v3->marketing->paygiftactivity->uniqueThresholdActivity->postAsync([
  'json' => [
    'activity_base_info' => [
      'activity_name'         => '',
      'activity_second_title' => '',
      'merchant_logo_url'     => '',
      'background_color'      => 'Color010',
      'begin_time'            => '',
      'end_time'              => '',
      'available_periods'     => [
        'available_time'     => [[
          'begin_time' => '',
          'end_time'   => '',
        ],],
        'available_day_time' => [[
          'begin_day_time' => '',
          'end_day_time'   => '',
        ],],
      ],
      'out_request_no'        => '',
      'delivery_purpose'      => 'OFF_LINE_PAY',
      'mini_programs_appid'   => '',
      'mini_programs_path'    => '',
    ],
    'advanced_setting'   => [
      'delivery_user_category' => 'BUSIFAVOR',
      'merchant_member_appid'  => '',
      'payment_mode'           => [
        'payment_scene_list'         => ['APP_SCENE'],
        'payment_method_information' => [
          'payment_method'    => 'CFT',
          'bank_abbreviation' => '',
        ],
      ],
      'goods_tags'             => ['string'],
    ],
    'award_send_rule'    => [
      'award_type'                 => 'BUSIFAVOR',
      'merchant_option'            => 'IN_SEVICE_COUPON_MERCHANT',
      'transaction_amount_minimum' => 0,
      'send_content'               => 'SINGLE_COUPON',
      'award_list'                 => [[
        'stock_id'           => '',
        'original_image_url' => '',
        'thumbnail_url'      => '',
      ],],
      'merchant_id_list'           => ['string'],
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/paygiftactivity/unique-threshold-activity')->postAsync([
  'json' => [
    'activity_base_info' => [
      'activity_name'         => '',
      'activity_second_title' => '',
      'merchant_logo_url'     => '',
      'background_color'      => 'Color010',
      'begin_time'            => '',
      'end_time'              => '',
      'available_periods'     => [
        'available_time'     => [[
          'begin_time' => '',
          'end_time'   => '',
        ],],
        'available_day_time' => [[
          'begin_day_time' => '',
          'end_day_time'   => '',
        ],],
      ],
      'out_request_no'        => '',
      'delivery_purpose'      => 'OFF_LINE_PAY',
      'mini_programs_appid'   => '',
      'mini_programs_path'    => '',
    ],
    'advanced_setting'   => [
      'delivery_user_category' => 'BUSIFAVOR',
      'merchant_member_appid'  => '',
      'payment_mode'           => [
        'payment_scene_list'         => ['APP_SCENE'],
        'payment_method_information' => [
          'payment_method'    => 'CFT',
          'bank_abbreviation' => '',
        ],
      ],
      'goods_tags'             => ['string'],
    ],
    'award_send_rule'    => [
      'award_type'                 => 'BUSIFAVOR',
      'merchant_option'            => 'IN_SEVICE_COUPON_MERCHANT',
      'transaction_amount_minimum' => 0,
      'send_content'               => 'SINGLE_COUPON',
      'award_list'                 => [[
        'stock_id'           => '',
        'original_image_url' => '',
        'thumbnail_url'      => '',
      ],],
      'merchant_id_list'           => ['string'],
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/paygiftactivity/unique-threshold-activity']->postAsync([
  'json' => [
    'activity_base_info' => [
      'activity_name'         => '',
      'activity_second_title' => '',
      'merchant_logo_url'     => '',
      'background_color'      => 'Color010',
      'begin_time'            => '',
      'end_time'              => '',
      'available_periods'     => [
        'available_time'     => [[
          'begin_time' => '',
          'end_time'   => '',
        ],],
        'available_day_time' => [[
          'begin_day_time' => '',
          'end_day_time'   => '',
        ],],
      ],
      'out_request_no'        => '',
      'delivery_purpose'      => 'OFF_LINE_PAY',
      'mini_programs_appid'   => '',
      'mini_programs_path'    => '',
    ],
    'advanced_setting'   => [
      'delivery_user_category' => 'BUSIFAVOR',
      'merchant_member_appid'  => '',
      'payment_mode'           => [
        'payment_scene_list'         => ['APP_SCENE'],
        'payment_method_information' => [
          'payment_method'    => 'CFT',
          'bank_abbreviation' => '',
        ],
      ],
      'goods_tags'             => ['string'],
    ],
    'award_send_rule'    => [
      'award_type'                 => 'BUSIFAVOR',
      'merchant_option'            => 'IN_SEVICE_COUPON_MERCHANT',
      'transaction_amount_minimum' => 0,
      'send_content'               => 'SINGLE_COUPON',
      'award_list'                 => [[
        'stock_id'           => '',
        'original_image_url' => '',
        'thumbnail_url'      => '',
      ],],
      'merchant_id_list'           => ['string'],
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->paygiftactivity->uniqueThresholdActivity->post([
  'json' => [
    'activity_base_info' => [
      'activity_name'         => '',
      'activity_second_title' => '',
      'merchant_logo_url'     => '',
      'background_color'      => 'Color010',
      'begin_time'            => '',
      'end_time'              => '',
      'available_periods'     => [
        'available_time'     => [[
          'begin_time' => '',
          'end_time'   => '',
        ],],
        'available_day_time' => [[
          'begin_day_time' => '',
          'end_day_time'   => '',
        ],],
      ],
      'out_request_no'        => '',
      'delivery_purpose'      => 'OFF_LINE_PAY',
      'mini_programs_appid'   => '',
      'mini_programs_path'    => '',
    ],
    'advanced_setting'   => [
      'delivery_user_category' => 'BUSIFAVOR',
      'merchant_member_appid'  => '',
      'payment_mode'           => [
        'payment_scene_list'         => ['APP_SCENE'],
        'payment_method_information' => [
          'payment_method'    => 'CFT',
          'bank_abbreviation' => '',
        ],
      ],
      'goods_tags'             => ['string'],
    ],
    'award_send_rule'    => [
      'award_type'                 => 'BUSIFAVOR',
      'merchant_option'            => 'IN_SEVICE_COUPON_MERCHANT',
      'transaction_amount_minimum' => 0,
      'send_content'               => 'SINGLE_COUPON',
      'award_list'                 => [[
        'stock_id'           => '',
        'original_image_url' => '',
        'thumbnail_url'      => '',
      ],],
      'merchant_id_list'           => ['string'],
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/paygiftactivity/unique-threshold-activity')->post([
  'json' => [
    'activity_base_info' => [
      'activity_name'         => '',
      'activity_second_title' => '',
      'merchant_logo_url'     => '',
      'background_color'      => 'Color010',
      'begin_time'            => '',
      'end_time'              => '',
      'available_periods'     => [
        'available_time'     => [[
          'begin_time' => '',
          'end_time'   => '',
        ],],
        'available_day_time' => [[
          'begin_day_time' => '',
          'end_day_time'   => '',
        ],],
      ],
      'out_request_no'        => '',
      'delivery_purpose'      => 'OFF_LINE_PAY',
      'mini_programs_appid'   => '',
      'mini_programs_path'    => '',
    ],
    'advanced_setting'   => [
      'delivery_user_category' => 'BUSIFAVOR',
      'merchant_member_appid'  => '',
      'payment_mode'           => [
        'payment_scene_list'         => ['APP_SCENE'],
        'payment_method_information' => [
          'payment_method'    => 'CFT',
          'bank_abbreviation' => '',
        ],
      ],
      'goods_tags'             => ['string'],
    ],
    'award_send_rule'    => [
      'award_type'                 => 'BUSIFAVOR',
      'merchant_option'            => 'IN_SEVICE_COUPON_MERCHANT',
      'transaction_amount_minimum' => 0,
      'send_content'               => 'SINGLE_COUPON',
      'award_list'                 => [[
        'stock_id'           => '',
        'original_image_url' => '',
        'thumbnail_url'      => '',
      ],],
      'merchant_id_list'           => ['string'],
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/paygiftactivity/unique-threshold-activity']->post([
  'json' => [
    'activity_base_info' => [
      'activity_name'         => '',
      'activity_second_title' => '',
      'merchant_logo_url'     => '',
      'background_color'      => 'Color010',
      'begin_time'            => '',
      'end_time'              => '',
      'available_periods'     => [
        'available_time'     => [[
          'begin_time' => '',
          'end_time'   => '',
        ],],
        'available_day_time' => [[
          'begin_day_time' => '',
          'end_day_time'   => '',
        ],],
      ],
      'out_request_no'        => '',
      'delivery_purpose'      => 'OFF_LINE_PAY',
      'mini_programs_appid'   => '',
      'mini_programs_path'    => '',
    ],
    'advanced_setting'   => [
      'delivery_user_category' => 'BUSIFAVOR',
      'merchant_member_appid'  => '',
      'payment_mode'           => [
        'payment_scene_list'         => ['APP_SCENE'],
        'payment_method_information' => [
          'payment_method'    => 'CFT',
          'bank_abbreviation' => '',
        ],
      ],
      'goods_tags'             => ['string'],
    ],
    'award_send_rule'    => [
      'award_type'                 => 'BUSIFAVOR',
      'merchant_option'            => 'IN_SEVICE_COUPON_MERCHANT',
      'transaction_amount_minimum' => 0,
      'send_content'               => 'SINGLE_COUPON',
      'award_list'                 => [[
        'stock_id'           => '',
        'original_image_url' => '',
        'thumbnail_url'      => '',
      ],],
      'merchant_id_list'           => ['string'],
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
activity_idstring活动id
create_timestring创建时间

参阅 官方文档

Published on the GitHub by TheNorthMemory