> ## Documentation Index
> Fetch the complete documentation index at: https://growi.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Sales channel mix

> Breaks the shop's GMV down by sales channel for a date window: seller video, seller LIVE, seller product card, affiliate video, affiliate LIVE and affiliate product card. The six `channels` don't overlap and add up to `total.gmv`. Each has `gmv`, `gmvShare` (0 to 1), `impressions` and `clicks`; SKU orders and items sold exist for seller channels only. `bySource` sums seller and affiliate. `shopTab` is reported alongside because it overlaps the channels.

`start_date` is inclusive and `end_date` is exclusive (YYYY-MM-DD, shop timezone). Data lags 1 to 2 days (`latestAvailableDate`). Totals are summed over the shop's products, 100 per page in GMV order, and `max_pages` (1 to 10, default 5) caps how many pages are read. When `products.truncated` is true, the numbers cover only the top products. `currency` is `USD` or `LOCAL` (TikTok's default).

US shops with an active Seller Center login also get `productCard`: product card GMV split into shop tab, search and other. When it can't be served it's null and `productCardReason` says why.



## OpenAPI

````yaml api-reference/tik-tok-shop-openapi.json GET /tik_tok_shop/analytics/channel_mix
openapi: 3.0.3
info:
  title: 'Growi API: TikTok Shop'
  version: 1.0.0
  description: >-
    Generated by scripts/gen_tik_tok_shop.rb from Growi's TikTok Shop route
    table.
servers:
  - url: https://api.growi.io/api/public/v1
security:
  - bearerAuth: []
paths:
  /tik_tok_shop/analytics/channel_mix:
    get:
      summary: Sales channel mix
      description: >-
        Breaks the shop's GMV down by sales channel for a date window: seller
        video, seller LIVE, seller product card, affiliate video, affiliate LIVE
        and affiliate product card. The six `channels` don't overlap and add up
        to `total.gmv`. Each has `gmv`, `gmvShare` (0 to 1), `impressions` and
        `clicks`; SKU orders and items sold exist for seller channels only.
        `bySource` sums seller and affiliate. `shopTab` is reported alongside
        because it overlaps the channels.


        `start_date` is inclusive and `end_date` is exclusive (YYYY-MM-DD, shop
        timezone). Data lags 1 to 2 days (`latestAvailableDate`). Totals are
        summed over the shop's products, 100 per page in GMV order, and
        `max_pages` (1 to 10, default 5) caps how many pages are read. When
        `products.truncated` is true, the numbers cover only the top products.
        `currency` is `USD` or `LOCAL` (TikTok's default).


        US shops with an active Seller Center login also get `productCard`:
        product card GMV split into shop tab, search and other. When it can't be
        served it's null and `productCardReason` says why.
      parameters:
        - name: start_date
          in: query
          required: true
          schema:
            type: string
          description: Window start, YYYY-MM-DD inclusive (shop timezone).
        - name: end_date
          in: query
          required: true
          schema:
            type: string
          description: >-
            Window end, YYYY-MM-DD EXCLUSIVE (TikTok's end_date_lt semantics).
            Must be after start_date.
        - name: max_pages
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 10
            default: 5
          description: >-
            Cap on product pages walked (100 products each, one TikTok call
            each, a few seconds each).
        - name: currency
          in: query
          required: false
          schema:
            type: string
            enum:
              - USD
              - LOCAL
          description: >-
            USD for US dollars or LOCAL for the shop's own currency. TikTok
            defaults to LOCAL.
        - name: organization_id
          in: query
          required: false
          schema:
            type: integer
          description: >-
            Use the TikTok Shop of this child brand (organization id) of your
            API key's organization
      responses:
        '200':
          description: Channel totals and shares for the window.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChannelMix'
              example:
                shopId: '7494000000000000123'
                startDate: '2026-09-01'
                endDate: '2026-09-08'
                currency: USD
                total:
                  gmv: '1000.00'
                  skuOrders: 40
                  itemsSold: 44
                  impressions: 52000
                  clicks: 1900
                channels:
                  - channel: seller_video
                    source: seller
                    contentType: video
                    gmv: '100.00'
                    gmvShare: 0.1
                    skuOrders: 4
                    itemsSold: 4
                    impressions: 6000
                    clicks: 210
                  - channel: seller_live
                    source: seller
                    contentType: live
                    gmv: '50.00'
                    gmvShare: 0.05
                    skuOrders: 2
                    itemsSold: 2
                    impressions: 1500
                    clicks: 60
                  - channel: seller_product_card
                    source: seller
                    contentType: product_card
                    gmv: '350.00'
                    gmvShare: 0.35
                    skuOrders: 14
                    itemsSold: 16
                    impressions: 20000
                    clicks: 800
                  - channel: affiliate_video
                    source: affiliate
                    contentType: video
                    gmv: '300.00'
                    gmvShare: 0.3
                    skuOrders: null
                    itemsSold: null
                    impressions: 18000
                    clicks: 600
                  - channel: affiliate_live
                    source: affiliate
                    contentType: live
                    gmv: '100.00'
                    gmvShare: 0.1
                    skuOrders: null
                    itemsSold: null
                    impressions: 6500
                    clicks: 230
                  - channel: affiliate_product_card
                    source: affiliate
                    contentType: product_card
                    gmv: '100.00'
                    gmvShare: 0.1
                    skuOrders: null
                    itemsSold: null
                    impressions: null
                    clicks: null
                bySource:
                  seller:
                    gmv: '500.00'
                    gmvShare: 0.5
                    skuOrders: 20
                    itemsSold: 22
                  affiliate:
                    gmv: '500.00'
                    gmvShare: 0.5
                    skuOrders: 20
                    itemsSold: 22
                shopTab:
                  gmv: '120.00'
                  gmvShare: 0.12
                  itemsSold: 5
                  impressions: 4000
                  clicks: 150
                  estimatedCustomers: 5
                products:
                  counted: 42
                  totalCount: 42
                  pages: 1
                  maxPages: 5
                  truncated: false
                latestAvailableDate: '2026-09-27'
                productCard: null
                productCardReason: no_seller_session
        '400':
          description: 'Invalid params: dates or max_pages'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TikTokShopError'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TikTokShopError'
        '404':
          description: >-
            `organization_id` isn't an active child brand of your organization,
            or the record you asked for doesn't exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TikTokShopError'
        '422':
          description: >-
            No TikTok Shop is connected for this organization. A parent
            organization whose shops sit on its child brands has to pass
            `organization_id`. Also returned when the shop isn't connected
            through TikTok's official API (`code: unsupported_on_web_only_shop`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TikTokShopError'
        '429':
          description: >-
            Rate limited: one call every 2 seconds and an hourly cap per API
            key. See `Retry-After` and the `X-RateLimit-*` headers
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TikTokShopError'
        '502':
          description: >-
            TikTok refused or failed. `error` is a fixed message and `code`
            names the failure when there is one
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TikTokShopError'
components:
  schemas:
    ChannelMix:
      type: object
      required:
        - shopId
        - startDate
        - endDate
        - currency
        - total
        - channels
        - bySource
        - shopTab
        - products
        - latestAvailableDate
        - productCard
        - productCardReason
      properties:
        shopId:
          type: string
        startDate:
          type: string
        endDate:
          type: string
          description: Exclusive, as requested.
        currency:
          type: string
          nullable: true
          description: >-
            null when products came back in more than one currency, or when
            there were no products. Every amount and share is then null too.
        total:
          type: object
          properties:
            gmv:
              type: string
              nullable: true
            skuOrders:
              type: integer
              nullable: true
              description: >-
                Summed per product, so an order with two products counts twice
                (it matches the shop's SKU orders, not its orders).
            itemsSold:
              type: integer
              nullable: true
            impressions:
              type: integer
              nullable: true
            clicks:
              type: integer
              nullable: true
        channels:
          type: array
          description: >-
            Always the six channels, in a fixed order. They do not overlap and
            their gmv adds up to total.gmv.
          items:
            $ref: '#/components/schemas/ChannelMixEntry'
        bySource:
          type: object
          properties:
            seller:
              $ref: '#/components/schemas/ChannelMixSource'
            affiliate:
              $ref: '#/components/schemas/ChannelMixSource'
        shopTab:
          type: object
          description: >-
            Shop tab sales and traffic. Overlaps the channels, so its share is
            not part of their sum.
          properties:
            gmv:
              type: string
              nullable: true
            gmvShare:
              type: number
              nullable: true
            itemsSold:
              type: integer
              nullable: true
            impressions:
              type: integer
              nullable: true
            clicks:
              type: integer
              nullable: true
            estimatedCustomers:
              type: integer
              nullable: true
        products:
          type: object
          required:
            - counted
            - totalCount
            - pages
            - maxPages
            - truncated
          properties:
            counted:
              type: integer
              description: Products summed.
            totalCount:
              type: integer
              nullable: true
              description: Products TikTok has for the window.
            pages:
              type: integer
              description: TikTok calls made.
            maxPages:
              type: integer
            truncated:
              type: boolean
              description: >-
                true when the page cap stopped the walk. Numbers then cover only
                the top products by GMV.
        latestAvailableDate:
          type: string
          nullable: true
          description: Freshness marker. TikTok's analytics lag is typically T+1 to T+2.
        productCard:
          type: object
          nullable: true
          description: >-
            Product card GMV by entry point, from TikTok Seller Center (TikTok's
            official API has no search channel). US shops only, and only while
            the shop's Seller Center session is active. Same window as the rest
            of the response, in US Pacific days. Seller Center has intraday
            values for today and yesterday, so a window past latestAvailableDate
            can show product card GMV the channels don't. Cached per shop and
            window for about 5 minutes. null when it can't be served
            (productCardReason says why); the rest of the response is
            unaffected.
          required:
            - source
            - currency
            - total
            - shopTab
            - search
            - other
          properties:
            source:
              type: string
              enum:
                - seller_center_web
            currency:
              type: string
              nullable: true
            total:
              type: string
              nullable: true
              description: >-
                Product card GMV, exact decimal string with at least 2 places
                (Seller Center's 338.6 comes back as 338.60). null when Seller
                Center sent no amount.
            shopTab:
              type: string
              nullable: true
              description: Product card GMV from the shop tab.
            search:
              type: string
              nullable: true
              description: Product card GMV from search.
            other:
              type: string
              nullable: true
              description: Product card GMV from every other entry point.
        productCardReason:
          type: string
          nullable: true
          enum:
            - no_seller_session
            - region_not_supported
            - session_expired
            - captcha
            - unexpected_response
            - upstream_error
            - timeout
            - null
          description: >-
            Why productCard is null; null when it is present. no_seller_session:
            no seller web cookie on file, or no official token (the block needs
            both). region_not_supported: not a US shop (not called).
            session_expired: TikTok answered 98001002, the seller must log in
            again. captcha: TikTok challenged the call and one retry did not
            clear it. unexpected_response: the answer did not carry the expected
            metrics. upstream_error: any other failure, including an HTML or
            block page. timeout: Seller Center did not answer within about 8
            seconds; the response went out without the block, and the late
            result is cached for the next request. A failure is remembered for
            about 2 minutes, so retrying sooner gets the same reason.
    TikTokShopError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: What went wrong
        code:
          type: string
          description: Machine-readable reason, when there is one
    ChannelMixEntry:
      type: object
      required:
        - channel
        - source
        - contentType
        - gmv
        - gmvShare
        - skuOrders
        - itemsSold
        - impressions
        - clicks
      properties:
        channel:
          type: string
          enum:
            - seller_video
            - seller_live
            - seller_product_card
            - affiliate_video
            - affiliate_live
            - affiliate_product_card
        source:
          type: string
          enum:
            - seller
            - affiliate
        contentType:
          type: string
          enum:
            - video
            - live
            - product_card
        gmv:
          type: string
          nullable: true
          description: >-
            Decimal string in the response currency. affiliate_product_card has
            no TikTok block of its own: it is affiliate total minus affiliate
            video and LIVE, floored at 0 because TikTok may round each block on
            its own.
        gmvShare:
          type: number
          nullable: true
          description: >-
            Share of total GMV, 0 to 1, rounded to 4 places, so the six may sum
            to 0.9999 to 1.0001. null when total GMV is 0 or unknown.
        skuOrders:
          type: integer
          nullable: true
          description: >-
            Seller channels only. TikTok gives affiliate orders only as a total
            (bySource.affiliate).
        itemsSold:
          type: integer
          nullable: true
          description: Seller channels only, same as skuOrders.
        impressions:
          type: integer
          nullable: true
        clicks:
          type: integer
          nullable: true
    ChannelMixSource:
      type: object
      properties:
        gmv:
          type: string
          nullable: true
        gmvShare:
          type: number
          nullable: true
        skuOrders:
          type: integer
          nullable: true
        itemsSold:
          type: integer
          nullable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.