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

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    config: ShopeeConfig

    Methods

    • Get authorised reseller brand

      Get the authorised reseller brand list for the shop.

      Parameters

      • params: GetAuthorisedResellerBrandParams

        The parameters for getting authorised reseller brand

        Parameters for getting authorised reseller brand Get the authorised reseller brand list for the shop.

        • page_no: number

          Specifies the page number of data to return in the current call. Starting from 1. if data is more than one page, the page_no can be some entry to start next call.

        • page_size: number

          Each result set is returned as a page of entries. Use the "page_size" filters to control the maximum number of entries to retrieve per page (i.e., per call), and the "page_no" to start next call. This integer value is used to specify the maximum number of entries to return in a single "page" of data. The limit of page_size if between 1 and 30.

      Returns Promise<GetAuthorisedResellerBrandResponse>

      A promise that resolves to the authorised reseller brand response containing:

      • is_authorised_reseller: Whether the shop is authorised reseller
      • total_count: Number of authorised brands linked with the shop
      • more: Whether there are more pages
      • authorised_brand_list: List of authorised brands with brand_id and brand_name

      When the API request fails or returns an error

      const brands = await sdk.shop.getAuthorisedResellerBrand({
      page_no: 1,
      page_size: 10
      });
      console.log('Is authorised reseller:', brands.response.is_authorised_reseller);
      console.log('Total brands:', brands.response.total_count);
      brands.response.authorised_brand_list.forEach(brand => {
      console.log('Brand:', brand.brand_name);
      });
    • Get shop profile

      This API support to get information of shop.

      Parameters

      Returns Promise<GetProfileResponse>

      A promise that resolves to the profile response containing:

      • shop_logo: The Image URL of the shop logo
      • description: The content of the shop description
      • shop_name: The content of the shop name
      • invoice_issuer: The invoice issuer information for BR CNPJ seller only

      When the API request fails or returns an error

      const profile = await sdk.shop.getProfile();
      console.log('Shop name:', profile.response.shop_name);
      console.log('Shop logo:', profile.response.shop_logo);
    • Get shop information

      Use this call to get information of shop

      Parameters

      Returns Promise<GetShopInfoResponse>

      A promise that resolves to the shop info response containing:

      • shop_name: Name of the shop
      • region: Shop's area
      • status: Shop status (BANNED, FROZEN, NORMAL)
      • is_cb: Whether the shop is a cross-border shop
      • auth_time: Timestamp when shop was authorized
      • expire_time: Expiration date for shop authorization
      • is_sip: Whether it's a SIP primary/affiliate shop
      • Additional fields for merchant info, fulfillment type, etc.

      When the API request fails or returns an error

      const shopInfo = await sdk.shop.getShopInfo();
      console.log('Shop name:', shopInfo.shop_name);
      console.log('Region:', shopInfo.region);
      console.log('Status:', shopInfo.status);
    • Get shop notification

      Get Seller Center notification, the permission is controlled by App type

      Parameters

      • Optionalparams: GetShopNotificationParams

        The parameters for getting shop notification

        Parameters for getting shop notification Get Seller Center notification, the permission is controlled by App type

        • Optionalcursor?: number

          The last notification_id returned on the page. When using the cursor, notifications will start with the one following this cursor notification. If no cursor is provided, the latest message from the shop will be returned.

        • Optionalpage_size?: number

          Default 10; maximum 50

      Returns Promise<GetShopNotificationResponse>

      A promise that resolves to the notification response containing:

      • cursor: Last notification_id returned in the page
      • data: Notification data with create_time, content, title, and url

      When the API request fails or returns an error

      const notifications = await sdk.shop.getShopNotification({
      page_size: 10
      });
      console.log('Title:', notifications.data.title);
      console.log('Content:', notifications.data.content);
      console.log('Cursor:', notifications.cursor);
    • Get warehouse detail

      For given shop id and region, return warehouse info including warehouse id, address id and location id

      Parameters

      • Optionalparams: GetWarehouseDetailParams

        The parameters for getting warehouse detail

        Parameters for getting warehouse detail For given shop id and region, return warehouse info including warehouse id, address id and location id

        • Optionalwarehouse_type?: number

          Type of warehouse. Applicable values: 1: Pickup Warehouse, 2: Return Warehouse. Default value is 1 (Pickup Warehouse)

      Returns Promise<GetWarehouseDetailResponse>

      A promise that resolves to the warehouse detail response containing:

      • warehouse_id: Warehouse address identifier
      • warehouse_name: The warehouse name
      • warehouse_type: Type of warehouse
      • location_id: Location identifier for stocks
      • address_id: Identity of address
      • region, state, city, address: Location details
      • zipcode, district, town, state_code: Additional location info
      • holiday_mode_state: Holiday mode status

      When the API request fails or returns an error:

      • warehouse.error_can_not_find_warehouse: No legal warehouse address for given shop id
      • warehouse.error_not_in_whitelist: Shop has no permission to access multi-warehouse
      • warehouse.error_region_can_not_blank: Region is missing
      • warehouse.error_region_not_valid: Region is not valid
      const warehouses = await sdk.shop.getWarehouseDetail({
      warehouse_type: 1 // Pickup warehouse
      });
      warehouses.response.forEach(wh => {
      console.log('Warehouse:', wh.warehouse_name);
      console.log('Location ID:', wh.location_id);
      });
    • Update shop profile

      This API support to let sellers to update the shop name, shop logo, and shop description.

      Parameters

      • params: UpdateProfileParams

        The parameters for updating profile

        Parameters for updating shop profile This API support to let sellers to update the shop name, shop logo, and shop description.

        • Optionaldescription?: string

          The new shop description

        • The new shop logo url. Recommend to use images

        • Optionalshop_name?: string

          The new shop name

      Returns Promise<UpdateProfileResponse>

      A promise that resolves to the updated profile response

      When the API request fails or returns an error:

      • error_data_check: Failed to change shop name (changed within 30 days, invalid length, etc.)
      • error_data_check: Failed to change shop logo (invalid URL, wrong format, etc.)
      • error_data_check: Failed to change description (exceeds 500 characters, etc.)
      const result = await sdk.shop.updateProfile({
      shop_name: 'New Shop Name',
      description: 'Welcome to our shop. Quality products at great prices!'
      });
      console.log('Updated shop:', result.response.shop_name);