Shopee SDK API Reference - v1.11.0
    Preparing search index...

    Interface GetVoucherResponse

    Response for the get voucher API

    interface GetVoucherResponse {
        error: string;
        message: string;
        request_id: string;
        response: {
            cmt_voucher_status?: number;
            current_usage: number;
            discount_amount?: number;
            display_channel_list: number[];
            display_start_time?: number;
            end_time: number;
            is_admin: boolean;
            item_id_list?: number[];
            max_price?: number;
            min_basket_price: number;
            percentage?: number;
            reward_type: number;
            start_time: number;
            target_voucher?: number;
            usage_quantity: number;
            usecase?: number;
            voucher_code: string;
            voucher_id: number;
            voucher_name: string;
            voucher_purpose: number;
            voucher_type: number;
        };
        warning?: string
        | string[];
    }

    Hierarchy (View Summary)

    Index

    Properties

    error: string

    Error code if any error occurred

    message: string

    Error message if any error occurred

    request_id: string

    The identifier for an API request for error tracking

    response: {
        cmt_voucher_status?: number;
        current_usage: number;
        discount_amount?: number;
        display_channel_list: number[];
        display_start_time?: number;
        end_time: number;
        is_admin: boolean;
        item_id_list?: number[];
        max_price?: number;
        min_basket_price: number;
        percentage?: number;
        reward_type: number;
        start_time: number;
        target_voucher?: number;
        usage_quantity: number;
        usecase?: number;
        voucher_code: string;
        voucher_id: number;
        voucher_name: string;
        voucher_purpose: number;
        voucher_type: number;
    }

    Type Declaration

    • Optionalcmt_voucher_status?: number

      The voucher status in CMT. 1: review, 2: approved, 3: reject. Only returned when attending CMT campaign and not rejected

    • current_usage: number

      Up till now, how many times has this particular voucher already been used

    • Optionaldiscount_amount?: number

      The discount amount set for this particular voucher. Only returned for fix amount voucher

    • display_channel_list: number[]

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

    • Optionaldisplay_start_time?: number

      The timing of when voucher is displayed on shop pages; so buyer is allowed to claim

    • end_time: number

      The timing until when the voucher is still valid

    • is_admin: boolean

      If the voucher is created by Shopee or not

    • Optionalitem_id_list?: number[]

      The list of items which is applicable for the voucher. Only returned for product type voucher

    • Optionalmax_price?: number

      The max amount of discount/value a user can enjoy by using this particular voucher. Only returned for discount percentage or coins cashback voucher

    • min_basket_price: number

      The minimum spend required for using this voucher

    • Optionalpercentage?: number

      The discount percentage set for this particular voucher. Only returned for discount percentage or coins cashback voucher

    • reward_type: number

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

    • start_time: number

      The timing from when the voucher is valid; so buyer is allowed to claim and to use

    • Optionaltarget_voucher?: number

      The field to mark voucher type. 1: new user voucher, 2: repeat buyer voucher with 1 order, 3: repeat buyer voucher with 2 orders

    • usage_quantity: number

      The number of times for this particular voucher could be used

    • Optionalusecase?: number

      Indicates specific business scenario. 1: shop voucher, 2: product voucher, 3: new buyer voucher, 4: repeat buyer voucher, 5: private voucher, 6: live voucher, 7: video voucher, 8: campaign voucher, 9: follow prize voucher, 10: membership voucher, 11: game prize voucher, 12: sample voucher

    • voucher_code: string

      Voucher Code

    • voucher_id: number

      The unique identifier of the voucher whose details are returned

    • voucher_name: string

      Voucher Name

    • voucher_purpose: number

      The use case for the voucher. 0: normal, 1: welcome, 2: referral, 3: shop_follow, 4: shop_game, 5: free_gift, 6: membership, 7: Ads

    • voucher_type: number

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

    warning?: string | string[]

    Warning message or list of warning messages