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

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    config: ShopeeConfig

    Methods

    • Delete a product item

      Use this API to delete a product item.

      Parameters

      • params: DeleteItemParams

        Parameters for deleting item

        Parameters for deleting a product item

        • item_id: number

          The ID of the product item to delete

      Returns Promise<DeleteItemResponse>

      A promise that resolves to the delete response

      When the API request fails or returns an error:

      • error_item_not_found: Item_id is not found
      • error_param_shop_id_not_found: Shop_id is not found
      • error_cannot_delete_item: Delete item failed
    • Get comments for products

      Use this API to get comments by shop_id, item_id, or comment_id. Can retrieve up to 1000 comments.

      Parameters

      • params: GetCommentParams

        The parameters for getting comments

        Parameters for getting product comments Use this API to get comments by shop_id, item_id, or comment_id, up to 1000 comments.

        • Optionalcomment_id?: number

          The identity of comment

        • cursor: string

          Specifies the starting entry of data to return in the current call. Default is empty string

        • Optionalitem_id?: number

          The identity of product item

        • page_size: number

          Maximum number of entries to return per page (between 1 and 100)

      Returns Promise<GetCommentResponse>

      A promise that resolves to the comment response containing:

      • request_id: The identifier for API request tracking
      • error: Error type if any error occurred
      • message: Error details if any error occurred
      • response: The response data containing comment list, pagination info

      When the API request fails or returns an error

    • Use this API to get basic info of items by a list of item_ids.

      Parameters

      • params: GetItemBaseInfoParams

        Parameters for getting item base info

        Parameters for getting item base information

        • item_id_list: number[]

          List of item IDs. Limit [0,50]

        • Optionalneed_complaint_policy?: boolean

          If true, response will include complaint_policy

        • Optionalneed_tax_info?: boolean

          If true, response will include tax_info

      Returns Promise<GetItemBaseInfoResponse>

      A promise that resolves to the item base info response containing:

      • item_list: List of detailed item base information including:
        • item_id, category_id, item_name, description, item_sku, create_time, update_time
        • attribute_list: Item attributes
        • price_info: Pricing details (if no models)
        • image: Image URLs and IDs
        • weight, dimension: Physical characteristics
        • logistic_info: Enabled logistics channels and fees
        • pre_order: Pre-order status and days to ship
        • wholesales: Wholesale pricing tiers
        • condition, size_chart, item_status, deboost, has_model, promotion_id
        • video_info: Video URLs, thumbnails, and duration
        • brand: Brand ID and name
        • item_dangerous: Dangerous goods status
        • gtin_code, size_chart_id, promotion_image, compatibility_info, scheduled_publish_time
        • authorised_brand_id, ssp_id, is_fulfillment_by_shopee
        • complaint_policy: (If requested and applicable)
        • tax_info: (If requested)
        • description_info, description_type: Normal or extended description details
        • stock_info_v2: Detailed stock information (summary, seller, Shopee, advance)
        • certification_info: Product certifications
      • warning: Optional warning message
      • Note: The top-level complaint_policy and tax_info in the response object seem redundant as they are also part of each item in item_list if requested.

      When the API request fails or returns an error:

      • error_item_not_found: Item ID not found
      • error_param_shop_id_not_found: Shop ID not found
      • error_invalid_language: Invalid language
      • error_query_over_itemid_size: Too many item_ids in list
    • Use this call to get a list of items.

      Parameters

      • params: GetItemListParams

        Parameters for getting item list

        Parameters for getting item list

        • item_status: ItemStatus[]

          Item status filter. If multiple, use separate parameters (e.g. item_status=NORMAL&item_status=BANNED)

        • offset: number

          Specifies the starting entry of data to return in the current call. Default is 0.

        • page_size: number

          The size of one page. Max=100

        • Optionalupdate_time_from?: number

          The starting date range for retrieving orders (based on the item update time)

        • Optionalupdate_time_to?: number

          The ending date range for retrieving orders (based on the item update time)

      Returns Promise<GetItemListResponse>

      A promise that resolves to the item list response containing:

      • item: List of item details (item_id, item_status, update_time, tag)
      • total_count: Total number of items matching the filter
      • has_next_page: Boolean indicating if there are more items
      • next_offset: Offset for the next page if has_next_page is true
      • warning: Optional warning message

      When the API request fails or returns an error:

      • error_update_time_range: update_time_to before update_time_from
      • error_param_item_status: Invalid item status
      • error_param_shop_id_not_found: Shop ID not found
      • error_param: Offset over limit
      • error_item_not_found: Product not found
    • Get model list of an item

      Use this API to get model list of an item.

      Parameters

      • params: GetModelListParams

        The parameters for getting the model list

        Parameters for getting model list of an item

        • item_id: number

          The ID of the item

      Returns Promise<GetModelListResponse>

      A promise that resolves to the model list response containing:

      • tier_variation: Variation config of item with option_list and name
      • model: List of model information including price_info, model_id, tier_index, model_sku, model_status, etc.
      • standardise_tier_variation: Standardise variation config of item (if available)

      When the API request fails or returns an error:

      • error_item_not_found: Item_id is not found
      • error_param_shop_id_not_found: Shop_id is not found
      • error_item_not_found: Product not found
    • Reply to buyer comments in batch

      Use this API to reply to comments from buyers in batch. You can reply to multiple comments at once.

      Parameters

      • params: ReplyCommentParams

        The parameters for replying to comments

        Parameters for replying to comments in batch

        • comment_list: ReplyCommentItem[]

          The list of comments to reply to (between 1 and 100 items)

      Returns Promise<ReplyCommentResponse>

      A promise that resolves to the reply response containing:

      • request_id: The identifier for API request tracking
      • error: Error type if any error occurred
      • message: Error details if any error occurred
      • response: The response data containing result list and warnings

      When the API request fails or returns an error

      • product.duplicate_request: You have already replied to this comment
      • product.comment_length_invalid: Comment length should be between 1 and 500
      • product.error_permission: Reply comment failed due to invalid shop token
      • product.error_not_exist: The comment you replied to does not exist
      • product.duplicate_comment_id: Duplicate comment id in the request
    • Unlist or list items

      Use this API to unlist or list items. Can process up to 50 items in one call.

      Parameters

      • params: UnlistItemParams

        Parameters for unlisting/listing items

        Parameters for unlisting/listing items

        • item_list: UnlistItemInfo[]

          List of items to unlist/list. Length should be between 1 to 50

      Returns Promise<UnlistItemResponse>

      A promise that resolves to the unlist response containing:

      • result: List of operation results with success status and error messages

      When the API request fails or returns an error:

      • error_item_not_found: Item_id is not found
      • error_param_shop_id_not_found: Shop_id is not found
      • error_param: Invalid parameters
    • Update price of items

      Use this API to update item price. Can update up to 50 models in one call.

      Parameters

      • params: UpdatePriceParams

        Parameters for updating price

        Parameters for updating product price

        • item_id: number

          Item ID

        • price_list: PriceListItem[]

          List of prices to update. Length should be between 1 to 50

      Returns Promise<UpdatePriceResponse>

      A promise that resolves to the update price response containing:

      • success_list: List of successfully updated prices
      • failure_list: List of failed updates with reasons

      When the API request fails or returns an error:

      • error_item_not_found: Item_id is not found
      • error_param_shop_id_not_found: Shop_id is not found
      • error_param: Invalid parameters
    • Update stock of items

      Use this API to update item stock. Can update up to 50 models in one call. This API updates only "seller_stock".

      Parameters

      • params: UpdateStockParams

        Parameters for updating stock

        Parameters for updating product stock

        • item_id: number

          Item ID

        • stock_list: StockListItem[]

          List of stock updates. Length should be between 1 to 50

      Returns Promise<UpdateStockResponse>

      A promise that resolves to the update stock response containing:

      • success_list: List of successfully updated stock
      • failure_list: List of failed updates with reasons

      When the API request fails or returns an error:

      • error_item_not_found: Item_id is not found
      • error_param_shop_id_not_found: Shop_id is not found
      • error_param: Invalid parameters