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

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    config: ShopeeConfig

    Methods

    • Use this API to get the address list of the shop.

      Returns Promise<GetAddressListResponse>

      A promise that resolves to the address list response containing:

      • show_pickup_address: Whether to show pickup address
      • address_list: Array of shop addresses with full details

      When the API request fails or returns an error:

      • error_auth: Invalid access_token
      • error_permission: No permission
      • error_server: System error
      const response = await sdk.logistics.getAddressList();
      response.address_list.forEach((addr) => {
      console.log('Address ID:', addr.address_id);
      console.log('Address:', addr.full_address);
      console.log('Flags:', addr.address_flag);
      });
    • Use this API to get all supported logistic channels.

      Returns Promise<GetChannelListResponse>

      A promise that resolves to the channel list response containing:

      • logistics_channel_list: Array of available logistics channels with:
        • logistics_channel_id: Channel identifier
        • logistics_channel_name: Channel name
        • enabled: Whether channel is enabled
        • cod_enabled: Whether COD is supported
        • fee_type: Fee calculation type
        • weight_limit: Weight restrictions
        • item_max_dimension: Size restrictions
        • and more channel details

      When the API request fails or returns an error:

      • error_auth: Invalid access_token
      • error_permission: No permission
      • error_server: System error
    • Use this API to get the parameters required for initializing logistics for an order. This is also known as getParameterForInit in the documentation.

      Parameters

      Returns Promise<GetShippingParameterResponse>

      A promise that resolves to the shipping parameter response containing:

      • info_needed: Required parameters based on the specific order
      • dropoff: Logistics information for dropoff mode (if applicable)
      • pickup: Logistics information for pickup mode (if applicable)

      When the API request fails or returns an error:

      • error_auth: Invalid access_token
      • error_param: Wrong parameters
      • error_permission: No permission
      • error_server: System error
    • Use this API to get the logistics tracking information of an order.

      Parameters

      Returns Promise<GetTrackingInfoResponse>

      A promise that resolves to the tracking info response containing:

      • order_sn: Order identifier
      • package_number: Package identifier
      • logistics_status: Current logistics status
      • tracking_info: Array of tracking events with:
        • update_time: Time of status update
        • description: Description of the tracking event
        • logistics_status: Status code for the event

      When the API request fails or returns an error:

      • logistics.error_param: Order allocation in progress
      • error_not_found: Wrong parameters
      • error_permission: No permission
      • error_server: System error
      • logistics.invalid_error: Order does not exist
      • logistics.error_status_limit: Invalid order status
      • logistics.package_not_exist: Package does not exist
      • logistics.package_number_not_exist: Package number required for split order
    • Use this API to get the tracking number of a shipped order.

      Parameters

      Returns Promise<GetTrackingNumberResponse>

      A promise that resolves to the tracking number response containing:

      • tracking_number: The tracking number of the order
      • plp_number: Package identifier for BR correios (optional)
      • first_mile_tracking_number: First mile tracking (Cross Border only)
      • last_mile_tracking_number: Last mile tracking (Cross Border BR only)
      • hint: Hint information for special scenarios
      • pickup_code: Quick identification code (ID local orders only)

      When the API request fails or returns an error:

      • error_auth: Invalid access_token
      • error_param: Wrong parameters
      • error_permission: No permission
      • error_server: System error
    • Use this API to initiate logistics including arranging pickup, dropoff or shipment for non-integrated channels. This is also known as "Init" in the Shopee API documentation.

      Parameters

      Returns Promise<ShipOrderResponse>

      A promise that resolves to the ship order response

      When the API request fails or returns an error:

      • error_auth: Invalid access_token
      • error_param: Wrong parameters
      • error_permission: No permission
      • error_server: System error
      // For pickup mode
      await sdk.logistics.shipOrder({
      order_sn: 'ORDER123',
      pickup: {
      address_id: 234,
      pickup_time_id: 'slot_123',
      },
      });

      // For dropoff mode
      await sdk.logistics.shipOrder({
      order_sn: 'ORDER456',
      dropoff: {
      branch_id: 101,
      },
      });