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

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    config: ShopeeConfig

    Methods

    • Apply a pre-defined item set to a livestream session. Only available for TW, ID, TH regions.

      Parameters

      • params: ApplyItemSetParams

        Parameters for applying item set

        Parameters for applying item set

        • item_set_id: number

          The identifier of item set

        • Optionalitem_set_ids?: number[]

          The list of item set IDs

        • session_id: number

          The identifier of livestream session

      Returns Promise<ApplyItemSetResponse>

      A promise that resolves to the apply item set response

      When the API request fails or returns an error

    • Ban a user from commenting in a livestream session. Only available for TW, ID, TH regions.

      Parameters

      • params: BanUserCommentParams

        Parameters for banning a user

        Parameters for banning a user from commenting

        • Optionalban_user_id?: number

          Ban user ID (field gap requirement)

        • session_id: number

          The identifier of livestream session

        • user_id: number

          User ID to ban

      Returns Promise<BanUserCommentResponse>

      A promise that resolves to the ban user comment response

      When the API request fails or returns an error

    • Create a new livestream session with basic information. Only available for TW, ID, TH regions.

      Parameters

      • params: CreateSessionParams

        Parameters for creating a livestream session

        Parameters for creating a livestream session

        • cover_image_url: string

          The cover image URL of livestream session

        • Optionaldescription?: string

          The description of livestream session, cannot exceed 200 characters

        • Optionalis_test?: boolean

          Indicate whether the livestream session is for testing purpose only

        • title: string

          The title of livestream session, cannot exceed 200 characters

      Returns Promise<CreateSessionResponse>

      A promise that resolves to the create session response containing:

      • session_id: The identifier of the created livestream session

      When the API request fails or returns an error

    • Get the total count of items in a livestream session's shopping bag. Only available for TW, ID, TH regions.

      Parameters

      • params: GetItemCountParams

        Parameters for getting item count

        Parameters for getting item count

        • [key: string]: string | number | boolean | undefined
        • session_id: number

          The identifier of livestream session

      Returns Promise<GetItemCountResponse>

      A promise that resolves to the item count response containing:

      • total_count: Total number of items

      When the API request fails or returns an error

    • Get the list of items in a livestream session's shopping bag. Only available for TW, ID, TH regions.

      Parameters

      • params: GetItemListParams

        Parameters for getting item list

        Parameters for getting item list

        • [key: string]: string | number | boolean | undefined
        • offset: number

          Specifies the starting entry of data to return

        • page_size: number

          Maximum number of entries per page (1-100)

        • session_id: number

          The identifier of livestream session

      Returns Promise<GetItemListResponse>

      A promise that resolves to the item list response containing:

      • more: Whether there are more pages
      • next_offset: Next offset for pagination
      • list: List of items with details, pricing, and affiliate info

      When the API request fails or returns an error

    • Get the items in a specific item set. Only available for TW, ID, TH regions.

      Parameters

      • params: GetItemSetItemListParams

        Parameters for getting item set item list

        Parameters for getting item set item list

        • [key: string]: string | number | boolean | undefined
        • item_set_id: number

          The identifier of item set

        • offset: number

          Specifies the starting entry of data to return

        • page_size: number

          Maximum number of entries per page (1-100)

      Returns Promise<GetItemSetItemListResponse>

      A promise that resolves to the item set item list response

      When the API request fails or returns an error

    • Get the list of available item sets. Only available for TW, ID, TH regions.

      Parameters

      • params: GetItemSetListParams

        Parameters for getting item set list

        Parameters for getting item set list

        • [key: string]: string | number | boolean | undefined
        • Optionalkeyword?: string

          Keyword for search

        • offset: number

          Specifies the starting entry of data to return

        • page_size: number

          Maximum number of entries per page (1-100)

      Returns Promise<GetItemSetListResponse>

      A promise that resolves to the item set list response containing:

      • more: Whether there are more pages
      • next_offset: Next offset for pagination
      • list: List of item sets with ID, name, and item count

      When the API request fails or returns an error

    • Get the latest comments from a livestream session. Only available for TW, ID, TH regions.

      Parameters

      • params: GetLatestCommentListParams

        Parameters for getting latest comment list

        Parameters for getting latest comment list

        • [key: string]: string | number | boolean | undefined
        • offset: number

          Specifies the starting entry of data to return

        • page_size: number

          Maximum number of entries per page (1-100)

        • session_id: number

          The identifier of livestream session

      Returns Promise<GetLatestCommentListResponse>

      A promise that resolves to the latest comment list response containing:

      • more: Whether there are more pages
      • next_offset: Next offset for pagination
      • list: List of comments with user info and timestamp

      When the API request fails or returns an error

    • Get items that viewers liked during the livestream session. Only available for TW, ID, TH regions.

      Parameters

      • params: GetLikeItemListParams

        Parameters for getting like item list

        Parameters for getting like item list

        • [key: string]: string | number | boolean | undefined
        • Optionalkeyword?: string

          Keyword for search

        • offset: number

          Specifies the starting entry of data to return

        • page_size: number

          Maximum number of entries per page (1-100)

        • session_id: number

          The identifier of livestream session

      Returns Promise<GetLikeItemListResponse>

      A promise that resolves to the like item list response

      When the API request fails or returns an error

    • Get recently added items in a livestream session. Only available for TW, ID, TH regions.

      Parameters

      • params: GetRecentItemListParams

        Parameters for getting recent item list

        Parameters for getting recent item list

        • [key: string]: string | number | boolean | undefined
        • offset: number

          Specifies the starting entry of data to return

        • page_size: number

          Maximum number of entries per page (1-100)

        • session_id: number

          The identifier of livestream session

      Returns Promise<GetRecentItemListResponse>

      A promise that resolves to the recent item list response

      When the API request fails or returns an error

    • Get basic information about a livestream session including cover, title, description, type (test live or normal live), create time, update time, stream url, etc. Only available for TW, ID, TH regions.

      Parameters

      • params: GetSessionDetailParams

        Parameters for getting session detail

        Parameters for getting session detail

        • [key: string]: string | number | boolean | undefined
        • session_id: number

          The identifier of livestream session

      Returns Promise<GetSessionDetailResponse>

      A promise that resolves to the session detail response containing:

      • session_id: Session identifier
      • title: Session title
      • description: Session description
      • cover_image_url: Cover image URL
      • status: Session status (0=Not started, 1=Ongoing, 2=Ended)
      • share_url: Share URL
      • is_test: Whether it's a test session
      • create_time: Creation timestamp
      • update_time: Last update timestamp
      • start_time: Start timestamp
      • end_time: End timestamp
      • stream_url_list: Stream URL information

      When the API request fails or returns an error

    • Get item-level metrics for a livestream session. Only available for TW, ID, TH regions.

      Parameters

      • params: GetSessionItemMetricParams

        Parameters for getting session item metrics

        Parameters for getting session item metrics

        • [key: string]: string | number | boolean | undefined
        • offset: number

          Specifies the starting entry of data to return

        • page_size: number

          Maximum number of entries per page (1-100)

        • session_id: number

          The identifier of livestream session

      Returns Promise<GetSessionItemMetricResponse>

      A promise that resolves to the session item metric response containing:

      • more: Whether there are more pages
      • next_offset: Next offset for pagination
      • list: List of item metrics with clicks, orders, and GMV

      When the API request fails or returns an error

    • Get metrics for a livestream session including GMV, orders, viewers, engagement metrics. Only available for TW, ID, TH regions.

      Parameters

      • params: GetSessionMetricParams

        Parameters for getting session metrics

        Parameters for getting session metrics

        • [key: string]: string | number | boolean | undefined
        • session_id: number

          The identifier of livestream session

      Returns Promise<GetSessionMetricResponse>

      A promise that resolves to the session metric response containing:

      • gmv: Value of placed orders during livestream
      • atc: Number of "Add To Cart" clicks
      • ctr: Click-through rate
      • co: Conversion rate
      • orders: Number of placed orders
      • ccu: Number of concurrent viewers
      • engage_ccu_1m: Number of engaged concurrent viewers (>1 min)
      • peak_ccu: Peak concurrent viewers
      • likes: Number of likes
      • comments: Number of comments
      • shares: Number of shares
      • views: Number of views
      • avg_viewing_duration: Average viewing duration

      When the API request fails or returns an error

    • Get the currently displayed item in a livestream session. Only available for TW, ID, TH regions.

      Parameters

      • params: GetShowItemParams

        Parameters for getting show item

        Parameters for getting show item

        • [key: string]: string | number | boolean | undefined
        • session_id: number

          The identifier of livestream session

      Returns Promise<GetShowItemResponse>

      A promise that resolves to the show item response containing:

      • item: The currently displayed item (null if no item is being shown)

      When the API request fails or returns an error

    • Post a comment to a livestream session. Only available for TW, ID, TH regions.

      Parameters

      • params: PostCommentParams

        Parameters for posting a comment

        Parameters for posting a comment

        • comment: string

          Comment text

        • Optionalcontent?: string

          Comment content (field gap requirement)

        • session_id: number

          The identifier of livestream session

      Returns Promise<PostCommentResponse>

      A promise that resolves to the post comment response

      When the API request fails or returns an error

    • Unban a user from commenting in a livestream session. Only available for TW, ID, TH regions.

      Parameters

      • params: UnbanUserCommentParams

        Parameters for unbanning a user

        Parameters for unbanning a user from commenting

        • session_id: number

          The identifier of livestream session

        • Optionalunban_user_id?: number

          Unban user ID (field gap requirement)

        • user_id: number

          User ID to unban

      Returns Promise<UnbanUserCommentResponse>

      A promise that resolves to the unban user comment response

      When the API request fails or returns an error

    • Update basic information of a livestream session. Only available for TW, ID, TH regions.

      Parameters

      • params: UpdateSessionParams

        Parameters for updating a livestream session

        Parameters for updating a livestream session

        • Optionalcover_image_url?: string

          The cover image URL of livestream session

        • Optionaldescription?: string

          The description of livestream session, cannot exceed 200 characters

        • Optionalis_test?: boolean

          Indicate whether the livestream session is for testing purpose only

        • session_id: number

          The identifier of livestream session

        • Optionaltitle?: string

          The title of livestream session, cannot exceed 200 characters

      Returns Promise<UpdateSessionResponse>

      A promise that resolves to the update session response

      When the API request fails or returns an error

    • Update which item to display in a livestream session. Only available for TW, ID, TH regions.

      Parameters

      • params: UpdateShowItemParams

        Parameters for updating show item

        Parameters for updating show item

        • item_id: number

          Shopee's unique identifier for an item

        • session_id: number

          The identifier of livestream session

        • shop_id: number

          The shop id of this item

      Returns Promise<UpdateShowItemResponse>

      A promise that resolves to the update show item response

      When the API request fails or returns an error

    • Upload an image for use in livestream (e.g., cover image). Only available for TW, ID, TH regions.

      Parameters

      • params: UploadImageParams

        Parameters for uploading an image

        Parameters for uploading an image

        • image: Blob | Buffer<ArrayBufferLike>

          The image file to upload

      Returns Promise<UploadImageResponse>

      A promise that resolves to the upload image response containing:

      • image_url: The uploaded image URL

      When the API request fails or returns an error