Shopee SDK API Reference - v2.8.0
    Preparing search index...

    Interface AddVoucherRequest

    Request parameters for add_voucher

    Add voucher

    interface AddVoucherRequest {
        discount_amount?: number;
        display_channel_list?: number[];
        display_start_time?: number;
        end_time: number | Date;
        item_id_list?: number[];
        max_price?: number;
        min_basket_price: number;
        percentage?: number;
        reward_type: number;
        start_time: number | Date;
        usage_quantity: number;
        voucher_code: string;
        voucher_name: string;
        voucher_type: number;
    }
    Index

    Properties

    discount_amount?: number

    The discount amount set for this particular voucher. Only fill in when you are creating a fix amount voucher.

    display_channel_list?: number[]

    The FE channel where the voucher will be displayed. The available values are: 1: display_all 3: feed, 4: live streaming, [] (empty - which is hidden).

    display_start_time?: number

    The timing of when voucher is displayed on shop pages; so buyer is allowed to claim.display_start_time must be left empty if the display_channel_list is empty (when voucher is hidden), otherwise it will show error.

    end_time: number | Date

    The timing until when the voucher is still valid. Any time after this end_time, buyer is not allowed to claim or to use.

    item_id_list?: number[]

    The list of items which is applicable for the voucher. Only fill in when you are creating a product type of voucher.

    max_price?: number

    The max amount of discount/value a user can enjoy by using this particular voucher. Only fill in when you are creating a discount percentage voucher or coins cashback voucher.If no cap limit, can set to be 0.

    min_basket_price: number

    The minimum spend required for using this voucher.

    percentage?: number

    The discount percentage set for this particular voucher. Only fill in when you are creating a discount percentage voucher or coins cashback voucher.

    reward_type: number

    The reward type of the voucher. The available values are: 1: fix_amount voucher, 2: discount_percentage voucher, 3: coin_cashback voucher.

    start_time: number | Date

    The timing from when the voucher is valid; so buyer is allowed to claim and to use. Field can only be updated if voucher has not started.

    usage_quantity: number

    The number of times for this particular voucher could be used.

    voucher_code: string

    The code of the voucher.

    voucher_name: string

    The name of the voucher.

    voucher_type: number

    The type of the voucher. The available values are: 1: shop voucher, 2: product voucher.