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

    Interface GetPrincipalLivestreamPerformanceParams

    Parameters for get_principal_livestream_performance

    interface GetPrincipalLivestreamPerformanceParams {
        end_date: string;
        granularity: string;
        region_list?: PrincipalRegionListItem[];
        start_date: string;
        timezone: string;
    }
    Index

    Properties

    end_date: string

    End date of the requested period in YYYY-MM-DD format.

    Limitations:

    • Must use the YYYY-MM-DD format.

    • Must be a valid calendar date.

    • Must not be earlier than start_date.

    • Validation is based on the requested timezone.

    • For customize, end_date must not be later than the day before the current day in the requested timezone. The inclusive date range from start_date to end_date must not exceed 366 days.

    • For day, end_date must equal start_date.

    • For week, end_date must be within the selected week range: from start_date (Sunday) to the end of that Sunday-to-Saturday week, or to the latest selectable day if the week extends beyond today. Formally: startDate ≤ endDate ≤ min(startDate + 6 days, today - 1 day).

    • For month, end_date must be within the selected month: from the 1st day of the month to the last calendar day of that month, or to the latest selectable day for the current month. Formally: startDate ≤ endDate ≤ min(month end, today - 1 day).

    • For quarter, end_date must be within the selected quarter: from the 1st day of the quarter to the last calendar day of that quarter, or to the latest selectable day for the current quarter. Formally: startDate ≤ endDate ≤ min(quarter end, today - 1 day).

    • For year, end_date must be within the selected year: from January 1st to December 31st of that year, or to the latest selectable day for the current year. Formally: startDate ≤ endDate ≤ min(Dec 31, today - 1 day).

    granularity: string

    Aggregation granularity that determines the validation rules for the requested date range and the reporting period. Limitations:- Supported values are customize, day, week, month, quarter, and year.- customize is validated as a free date range and is internally queried with the affiliate-compatible livestream granularity.- day represents a single calendar day.- week requires a Sunday-based calendar week.- month requires a calendar month range.- quarter requires a calendar quarter range.- year requires a calendar year range.- Any other value is rejected as invalid_parameter.

    region_list?: PrincipalRegionListItem[]

    Optional list of principal regions to be queried. Limitations:- When omitted or empty, the API queries all regions belonging to the specified principal_id except the aggregate regional bucket.- Must contain at most 100 region objects.- Every region must belong to the specified principal_id.- Duplicate region values are merged for filtering purposes.- Currency defaults to USD when omitted.- When the same region appears multiple times, the first provided currency is used.

    start_date: string

    Start date of the requested period in YYYY-MM-DD format.

    Limitations:- Must use the YYYY-MM-DD format.- Must be a valid calendar date.- Must not be later than end_date.- Validation is based on the requested timezone.- The earliest selectable date is calculated as: current day in timezone - 1 day - 2 years.- The exact boundary rules depend on granularity:-- For customize, start_date must not be earlier than the earliest selectable date.-- For day, start_date must equal end_date.-- For week, start_date must be a Sunday.-- For month, start_date must be the first day of the month.-- For quarter, start_date must be the first day of the quarter.-- For year, start_date must be the first day of the year.

    timezone: string

    Timezone used for date boundary calculation, selectable date validation, and timestamp conversion.

    Limitations:- Enum values: ["GMT+7", "GMT+8", "GMT-3"]- The API internally normalizes the open API timezone value for livestream metric queries.- All date validation rules are evaluated in the requested timezone.