Endpoints: raw platform data
These endpoints expose DataGlass's normalized, per-platform records — the raw rows behind the analytics. RT ("real-time") is the latest snapshot of an entity; Fact is the historical, daily-versioned record. See Getting started for auth and Conventions for pagination. All read-only.
datadate parameters are integers in YYYYMMDD form.Shopee — products (raw)
POST/api/shopee/product/internal/fact/fetch-full-product
Retrieves historical (Fact) snapshots of Shopee products over a date range, searched by shop, region, and optional item id. Use for time-series analysis and historical comparisons.
Request body
Array of FactShopeeProductSearchRequest
| Field | Type | Required | Description |
|---|---|---|---|
shopId | integer | yes | Shop ID |
region | string | yes | Region code |
itemId | integer | no | Item ID filter |
datadateStart | integer | yes | Start date (YYYYMMDD) |
datadateEnd | integer | yes | End date (YYYYMMDD) |
Response — Array of FactShopeeProductFull — historical product snapshots: name, SKU, category, brand, images, engagement (views/likes/rating/sales), stock (in-transit, sellable, reserved, available), pricing, and tax fields. …and more — see the full schema in the OpenAPI spec.
POST/api/shopee/product/internal/rt/fetch-full-product
Retrieves the latest (RT) snapshot of Shopee products for a shop/region, with optional item-id and status filters.
Request body
Array of RtShopeeProductSearchRequest
| Field | Type | Required | Description |
|---|---|---|---|
shopId | integer | yes | Shop ID |
region | string | yes | Region code |
itemId | integer | no | Item ID filter |
itemStatuses | array | no | Status filter (e.g. ["NORMAL","UNLIST"]) |
Response — Array of RtShopeeProductFull — current product records (name, SKU, category, brand, images, engagement, stock, pricing, fulfillment flag, promotion id, tax fields) with a nested models array of variant data. …and more — see the full schema in the OpenAPI spec.
POST/api/shopee/product/internal/rt/fetch-full-product/paginated
Cursor-paginated RT products with advanced filtering (product/SKU search, numeric filters on sale/margin/COGS/units) and custom sort.
Request body
RtShopeeProductPaginatedFetchRequest
| Field | Type | Required | Description |
|---|---|---|---|
userId | integer | yes | Must match the authenticated user |
shopId | integer | yes | Shop ID |
region | string | yes | Region code |
productSearch | string | no | Product name search |
itemSkuSearch | string | no | Item SKU search |
filters | array | no | Numeric field filters (gt, gte, lt, lte, between…) |
sortBy | string | no | Sort field (sale, views, likes, rating…) |
sortDirection | string | no | asc or desc |
cursorRtProductId | integer | no | Pagination cursor |
cursorSortValue | number | no | Last-seen sort value |
pageSize | integer | no | Rows per page (default 200) |
Response — CursorPaginatedResult<RtShopeeProductCursor, RtShopeeProductFull> — product rows (with nested models) plus the next cursor. …and more — see the full schema in the OpenAPI spec.
POST/api/shopee/product/internal/fetch-product-dashboard/paginated
Cursor-paginated RT product dashboard rows for the products UI, with search, filtering, and sort. Returns margin percentiles and variant counts per product.
Request body — RtShopeeProductPaginatedFetchRequest (same fields as the RT paginated endpoint above).
Response — CursorPaginatedResult<RtShopeeProductCursor, ShopeeProductDashboard> — dashboard rows (name, SKU, status, images, margin, sale, 180-day units, COGS, variant count, margin percentiles min/Q1/median/Q3/max/mean).
POST/api/shopee/product/internal/fetch-product-dashboard/margin-stats
Computes aggregated margin statistics (min, max, median, Q1, Q3) over the filtered product-dashboard set. No pagination — a single stats response.
Request body — RtShopeeProductPaginatedV2FetchRequest (unified column filters; pagination fields ignored).
Response — ProductMarginStats — margin percentiles: minimum, Q1, median, Q3, maximum.
POST/api/shopee/product/internal/fetch-product-dashboard/paginated/v2
Cursor-paginated dashboard with the unified column-filter syntax (name, SKU, COGS, sale, 180-day units, margin) and custom sort.
Request body
RtShopeeProductPaginatedV2FetchRequest
| Field | Type | Required | Description |
|---|---|---|---|
userId | integer | yes | Authenticated user id |
shopId | integer | yes | Shop ID |
region | string | yes | Region code |
productSearch | string | no | Product name search |
itemSkuSearch | string | no | Item SKU search |
filters | array | no | Unified column filters (name/sku/number/margin operators) |
sortBy | string | no | Sort field |
sortDirection | string | no | asc or desc |
cursorRtProductId | integer | no | Pagination cursor |
cursorSortValue | number | no | Sort value cursor |
pageSize | integer | no | Rows per page |
Response — CursorPaginatedResult<RtShopeeProductCursor, ShopeeProductDashboard> — dashboard rows with margin percentiles.
POST/api/shopee/product/internal/fetch-product-dashboard/paginated/v3
Offset-paginated dashboard (page/pageSize) with unified column filters and custom sort.
Request body
RtShopeeProductPaginatedV3FetchRequest
| Field | Type | Required | Description |
|---|---|---|---|
userId | integer | yes | Authenticated user id |
shopId | integer | yes | Shop ID |
region | string | yes | Region code |
filters | array | no | Unified column filters |
sortBy | string | no | Sort field (sale, margin, cogs, units_sold_180d) |
sortDirection | string | no | asc or desc |
page | integer | no | 0-based page (default 0) |
pageSize | integer | no | Rows per page (default 200) |
Response — OffsetPaginatedResult<ShopeeProductDashboard> — page metadata (page, pageSize, totalItems, totalPages) plus dashboard rows.
POST/api/shopee/product/internal/product-lifecycle/fetch
Analyzes one item's lifecycle across all its models, aggregated to a time resolution (DAY/WEEK/MONTH) — sales trends, peak periods, and per-model breakdown.
Request body
ShopeeProductLifecycleRequest
| Field | Type | Required | Description |
|---|---|---|---|
shopId | integer | yes | Shop ID |
itemId | integer | yes | Item ID |
resolution | string | yes | Time resolution: DAY, WEEK, or MONTH |
Response — ShopeeProductLifecycleData — aggregate lifecycle statistics and per-model trend data at the requested resolution.
Shopee — orders (raw)
POST/api/shopee/order/internal/fact/order-full/fetch
Retrieves historical (Fact) Shopee order snapshots over a date range, searched by shop, region, and optional order SN.
Request body
Array of FactShopeeOrderSearchRequest
| Field | Type | Required | Description |
|---|---|---|---|
shopId | integer | yes | Shop ID |
region | string | yes | Region code |
orderSn | string | no | Order SN filter |
datadateStart | integer | yes | Start date (YYYYMMDD) |
datadateEnd | integer | yes | End date (YYYYMMDD) |
Response — Array of FactShopeeOrderFull — order snapshots (order SN, status, currency, buyer, total amount, shipping, fulfillment, payment method, COD flag, timestamps, and shipping/handling/tax details). …and more — see the full schema in the OpenAPI spec.
POST/api/shopee/order/internal/rt/order-full/count
Counts RT orders matching the criteria (shop/region/optional order SN).
Request body — Array of RtShopeeOrderSearchRequest (shopId, region required; orderSn optional).
Response — integer — total count of matching RT orders.
POST/api/shopee/order/internal/rt/order-full/fetch
Retrieves the latest (RT) Shopee order snapshots for a shop/region, with optional order-SN filter.
Request body — Array of RtShopeeOrderSearchRequest (shopId, region required; orderSn optional).
Response — Array of RtShopeeOrderFull — current order records (order SN, status, buyer, amounts, shipping, payment, timestamps, fee/tax fields). …and more — see the full schema in the OpenAPI spec.
POST/api/shopee/order/internal/rt/order-full/fetch-paginated
Cursor-paginated RT orders; supports multiple shop/region search criteria at once.
Request body
RtShopeeOrderPaginatedFetchRequest
| Field | Type | Required | Description |
|---|---|---|---|
searches | array | yes | Array of RtShopeeOrderSearchRequest (shop, region, optional order SN) |
cursor | integer | no | Pagination cursor (rt_order_id) |
pageSize | integer | no | Rows per page (default 200) |
Response — CursorPaginatedResult<Long, RtShopeeOrderFull> — current order rows plus the next cursor.
Shopee — ads (raw)
POST/api/shopee/ads/internal/fact/ad-campaign-full/fetch
Retrieves historical (Fact) Shopee ad-campaign snapshots over a date range, with optional campaign id / shop / region filters.
Request body
Array of FactShopeeAdCampaignSearchRequest
| Field | Type | Required | Description |
|---|---|---|---|
campaignId | integer | no | Campaign ID filter |
shopId | integer | no | Shop ID filter |
region | string | no | Region code filter |
datadateStart | integer | yes | Start date (YYYYMMDD) |
datadateEnd | integer | yes | End date (YYYYMMDD) |
Response — Array of FactShopeeAdCampaignFull — campaign records (id, name, ad type, placement, active flag, datadate/datahour, metrics: spend/impressions/clicks/GMV/orders/ROAS, plus settings). …and more — see the full schema in the OpenAPI spec.
POST/api/shopee/ads/internal/fact/ad-campaign-full/fetch-paginated
Cursor-paginated Fact ad campaigns; supports multiple search criteria.
Request body
FactShopeeAdCampaignPaginatedFetchRequest
| Field | Type | Required | Description |
|---|---|---|---|
searches | array | yes | Array of FactShopeeAdCampaignSearchRequest |
cursorDatadate | integer | no | Cursor datadate (YYYYMMDD) |
cursorDatahour | integer | no | Cursor datahour (0–23) |
cursorCampaignId | integer | no | Cursor campaign id |
pageSize | integer | no | Rows per page (default 200) |
Response — CursorPaginatedResult<FactShopeeAdCampaignCursor, FactShopeeAdCampaignFull> — campaign records plus the next cursor. …and more — see the full schema in the OpenAPI spec.
POST/api/shopee/ads/internal/fact/ad-campaign-full/{shopId}/{region}/fetch-daily-grouped
Fact ad campaigns grouped by campaign per date, with hourly sub-rows. Cursor-paginated.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
shopId | integer | yes | Shop ID |
region | string | yes | Region code |
Request body
FactShopeeAdCampaignGroupedFetchRequest (optional)
| Field | Type | Required | Description |
|---|---|---|---|
searches | array | no | Filter by campaign id and/or date range |
cursorDatadate | integer | no | Cursor datadate (YYYYMMDD) |
cursorCampaignId | integer | no | Cursor campaign id |
pageSize | integer | no | Max grouped rows (default 50) |
Response — CursorPaginatedResult<FactShopeeAdCampaignDailyCursor, FactShopeeAdCampaignDailyGrouped> — grouped campaign-per-date records with hourly sub-rows.
POST/api/shopee/ads/internal/fact/ad-campaign-full/{shopId}/{region}/fetch-active-campaigns-dashboard
Active (ongoing) campaigns with the latest day's aggregated metrics, with optional name/id/ad-type filters and custom sort. Cursor-paginated.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
shopId | integer | yes | Shop ID |
region | string | yes | Region code |
Request body
FactShopeeAdCampaignActiveSummaryFetchRequest (optional)
| Field | Type | Required | Description |
|---|---|---|---|
datadate | integer | no | Filter to an exact datadate (YYYYMMDD) |
activeOnly | boolean | no | Only active campaigns (null = all) |
searchCampaign | string | no | Fuzzy search by campaign/ad name |
searchCampaignId | integer | no | Search by campaign id |
filters | array | no | Numeric filters on campaign metrics |
adTypeFilter | array | no | Filter by ad type (auto, manual) |
sortBy | string | no | Sort field (expense, broadRoi, datadate…) |
sortDirection | string | no | asc or desc |
cursorDatadate | integer | no | Cursor datadate |
cursorCampaignId | integer | no | Cursor campaign id |
cursorSortValue | number | no | Cursor sort value |
pageSize | integer | no | Max campaigns (default 50) |
Response — CursorPaginatedResult<FactShopeeAdCampaignDailyCursor, FactShopeeAdCampaignSummary> — active campaigns with latest-day metrics. …and more — see the full schema in the OpenAPI spec.
POST/api/shopee/ads/internal/fact/ad-campaign-full/{shopId}/{region}/fetch-active-campaigns
Same active-campaign selection as the dashboard variant, but returned as grouped campaign-per-date rows with hourly sub-rows.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
shopId | integer | yes | Shop ID |
region | string | yes | Region code |
Request body — FactShopeeAdCampaignActiveSummaryFetchRequest (optional; same fields as above).
Response — CursorPaginatedResult<FactShopeeAdCampaignDailyCursor, FactShopeeAdCampaignDailyGrouped> — grouped daily campaign records with hourly sub-rows.
POST/api/shopee/ads/internal/fact/ad-campaign-full/{shopId}/{region}/campaigns/{campaignId}/fetch-daily-summary
Daily summary rows for a single campaign. Cursor-paginated.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
shopId | integer | yes | Shop ID |
region | string | yes | Region code |
campaignId | integer | yes | Campaign ID |
Request body
FactShopeeAdCampaignDailySummaryFetchRequest (optional)
| Field | Type | Required | Description |
|---|---|---|---|
cursorDatadate | integer | no | Cursor datadate (YYYYMMDD) |
cursorCampaignId | integer | no | Cursor campaign id |
pageSize | integer | no | Max daily rows (default 50) |
Response — CursorPaginatedResult<FactShopeeAdCampaignDailyCursor, FactShopeeAdCampaignDailyGrouped> — daily records with hourly sub-rows and metrics.
GET/api/shopee/ads/internal/fact/ad-campaign-full/{shopId}/{region}/campaigns/{campaignId}/dates/{datadate}/fetch-hourly-detail
Hourly performance data for a single campaign on a specific date.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
shopId | integer | yes | Shop ID |
region | string | yes | Region code |
campaignId | integer | yes | Campaign ID |
datadate | integer | yes | Date (YYYYMMDD) |
Response — Array of FactShopeeAdCampaignHourlyEntry — hourly snapshots (datahour 0–23, spend, impressions, clicks, GMV, orders, ROAS).
POST/api/shopee/ads/internal/fact/ad-cancellation-dedup/{shopId}/{datadateStart}/{datadateEnd}
Dedup amounts for cancelled ads within a date range, optionally filtered to specific campaigns.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
shopId | integer | yes | Shop ID |
datadateStart | integer | yes | Start date (YYYYMMDD) |
datadateEnd | integer | yes | End date (YYYYMMDD) |
Request body — ShopeeAdCancellationDedupFetchRequest (optional) — campaignIds (null = all campaigns).
Response — ShopeeAdCancellationDedupResponse — dedup amounts by campaign plus totals.
POST/api/shopee/ads/internal/fact/ad-total-cancel-dedup/{shopId}/{datadateStart}/{datadateEnd}
Total dedup amounts for all cancelled ads (no rebuy check) within a date range, optionally filtered to specific campaigns.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
shopId | integer | yes | Shop ID |
datadateStart | integer | yes | Start date (YYYYMMDD) |
datadateEnd | integer | yes | End date (YYYYMMDD) |
Request body — ShopeeAdCancellationDedupFetchRequest (optional) — campaignIds.
Response — ShopeeAdTotalCancelDedupResponse — total cancel dedup amounts by campaign and aggregated totals.
GET/api/shopee/ads/internal/analytics-summary/{shopId}/{datadateFrom}/{datadateTo}
Precomputed hourly shop-analytics summary across a date range — product, ads, order, return, and engagement stats with a computedAt timestamp.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
shopId | integer | yes | Shop ID |
datadateFrom | integer | yes | Start date (YYYYMMDD) |
datadateTo | integer | yes | End date (YYYYMMDD) |
Response — Array of ShopeeShopAnalyticsSummary — per-date rows: product counts, avg price, total stock, ad metrics (impressions/clicks/spend/GMV/orders/ROAS/CTR), order stats (count/units/revenue/AOV), return stats, and engagement (views/likes/rating/sales), with computedAt.
Lazada — products (raw)
POST/api/lazada/product/internal/fact/fetch-full-product
Retrieves historical (Fact) Lazada product snapshots on a specific date, searched by seller, region, and optional item id.
Request body
Array of FactLazadaProductSearchRequest
| Field | Type | Required | Description |
|---|---|---|---|
sellerId | integer | yes | Seller (shop) ID |
region | string | yes | Region code |
itemId | integer | no | Item ID filter |
datadate | integer | yes | Date (YYYYMMDD) |
Response — Array of FactLazadaProduct — historical snapshots (item id, name, SKU, category, brand, images, status, stock, pricing, rating). …and more — see the full schema in the OpenAPI spec.
POST/api/lazada/product/internal/rt/fetch-full-product
Retrieves the latest (RT) Lazada product snapshots for a seller/region, with optional item-id and updated-after filters.
Request body
Array of RtLazadaProductSearchRequest
| Field | Type | Required | Description |
|---|---|---|---|
sellerId | integer | yes | Seller (shop) ID |
region | string | yes | Region code |
itemId | integer | no | Item ID filter |
updatedTimeAfter | string (date) | no | Only rows updated at/after this instant |
Response — Array of RtLazadaProduct — current product records (item id, name, SKU, category, brand, images, status, stock, pricing, rating). …and more — see the full schema in the OpenAPI spec.
POST/api/lazada/product/internal/rt/fetch-full-product/paginated
Cursor-paginated RT products with product/SKU search, numeric filters, and custom sort.
Request body
RtLazadaProductPaginatedFetchRequest
| Field | Type | Required | Description |
|---|---|---|---|
sellerId | integer | yes | Seller (shop) ID |
region | string | yes | Region code |
productSearch | string | no | Product name search |
itemSkuSearch | string | no | Item SKU search |
filters | array | no | Numeric field filters |
sortBy | string | no | Sort field (sale, margin, cogs) |
sortDirection | string | no | asc or desc |
cursorRtProductId | integer | no | Pagination cursor |
cursorSortValue | number | no | Last-seen sort value |
pageSize | integer | no | Rows per page (default 200) |
Response — CursorPaginatedResult<RtLazadaProductCursor, RtLazadaProduct> — product rows plus the next cursor. …and more — see the full schema in the OpenAPI spec.
POST/api/lazada/product/internal/rt/fetch-product-dashboard/paginated
Cursor-paginated RT product dashboard rows with search, filters, sort, margin percentiles, and variant counts.
Request body — RtLazadaProductPaginatedFetchRequest (same fields as the RT paginated endpoint above).
Response — CursorPaginatedResult<RtLazadaProductCursor, LazadaProductDashboard> — dashboard rows (id, name, SKU, status, images, margin, sale, 180-day units, COGS, variant count, margin percentiles).
POST/api/lazada/product/internal/rt/fetch-product-dashboard/margin-stats
Aggregated margin statistics (min, max, median, Q1, Q3) over the filtered Lazada dashboard set.
Request body — RtLazadaProductPaginatedV2FetchRequest (unified column filters; pagination fields ignored).
Response — ProductMarginStats — margin percentiles: minimum, Q1, median, Q3, maximum.
POST/api/lazada/product/internal/rt/fetch-product-dashboard/paginated/v2
Cursor-paginated dashboard with the unified column-filter syntax (name, SKU, COGS, sale, margin) and custom sort.
Request body
RtLazadaProductPaginatedV2FetchRequest
| Field | Type | Required | Description |
|---|---|---|---|
sellerId | integer | yes | Seller (shop) ID |
region | string | yes | Region code |
productSearch | string | no | Product name search |
itemSkuSearch | string | no | Item SKU search |
filters | array | no | Unified column filters (name/sku/number/margin operators) |
sortBy | string | no | Sort field |
sortDirection | string | no | asc or desc |
cursorRtProductId | integer | no | Pagination cursor |
cursorSortValue | number | no | Sort value cursor |
pageSize | integer | no | Rows per page |
Response — CursorPaginatedResult<RtLazadaProductCursor, LazadaProductDashboard> — dashboard rows with margin percentiles.
POST/api/lazada/product/internal/rt/fetch-product-dashboard/paginated/v3
Offset-paginated dashboard (page/pageSize) with unified column filters and custom sort.
Request body
RtLazadaProductPaginatedV3FetchRequest
| Field | Type | Required | Description |
|---|---|---|---|
sellerId | integer | yes | Seller (shop) ID |
region | string | yes | Region code |
filters | array | no | Unified column filters |
sortBy | string | no | Sort field (sale, margin, cogs) |
sortDirection | string | no | asc or desc |
page | integer | no | 0-based page (default 0) |
pageSize | integer | no | Rows per page (default 200) |
Response — OffsetPaginatedResult<LazadaProductDashboard> — page metadata plus dashboard rows.
TikTok — orders (raw)
POST/api/tiktok/order/internal/rt/order-full/count
Counts RT TikTok orders matching the criteria (shop and optional order id).
Request body — Array of RtTikTokOrderSearchRequest (shopId required; orderId optional).
Response — integer — total count of matching RT orders.
POST/api/tiktok/order/internal/rt/order-full/fetch
Retrieves the latest (RT) TikTok order snapshots for a shop, with optional order-id filter.
Request body — Array of RtTikTokOrderSearchRequest (shopId required; orderId optional).
Response — Array of RtTikTokOrder — current order records (order id, status, currency, buyer, total amount, shipping, COD, payment method, recipient address, timestamps, fee/tax fields) with nested itemList, itemTaxList, packageList. …and more — see the full schema in the OpenAPI spec.
POST/api/tiktok/order/internal/rt/order-full/fetch-paginated
Cursor-paginated RT orders; supports multiple shop/order-id search criteria.
Request body
RtTikTokOrderPaginatedFetchRequest
| Field | Type | Required | Description |
|---|---|---|---|
searches | array | yes | Array of RtTikTokOrderSearchRequest (shop id, optional order id) |
cursor | integer | no | Pagination cursor (rt_order_id) |
pageSize | integer | no | Rows per page (default 200) |
Response — CursorPaginatedResult<Long, RtTikTokOrder> — current order rows plus the next cursor.
POST/api/tiktok/order/internal/fact/order-full/fetch
Retrieves historical (Fact) TikTok order snapshots over a date range, searched by shop and region.
Request body
Array of FactTikTokOrderSearchRequest
| Field | Type | Required | Description |
|---|---|---|---|
shopId | integer | yes | Shop ID |
region | string | yes | Region code |
datadateStart | integer | yes | Start date (YYYYMMDD) |
datadateEnd | integer | yes | End date (YYYYMMDD) |
Response — Array of FactTikTokOrder — historical order snapshots (order id, status, buyer, amounts, shipping, fees, payment, recipient address, timestamps incl. datadate/datahour/datamonth) with nested item/tax/package arrays. …and more — see the full schema in the OpenAPI spec.
POST/api/tiktok/order/internal/fact/order-full/fetch-paginated
Cursor-paginated Fact orders; supports multiple shop/region/date-range search criteria.
Request body
FactTikTokOrderPaginatedFetchRequest
| Field | Type | Required | Description |
|---|---|---|---|
searches | array | yes | Array of FactTikTokOrderSearchRequest (shop id, region, date range) |
cursor | integer | no | Pagination cursor (fact_order_id) |
pageSize | integer | no | Rows per page (default 200) |
Response — CursorPaginatedResult<Long, FactTikTokOrder> — historical order rows (with nested item/tax/package arrays) plus the next cursor. …and more — see the full schema in the OpenAPI spec.